comparison src/balloon_help.c @ 380:8626e4521993 r21-2-5

Import from CVS: tag r21-2-5
author cvs
date Mon, 13 Aug 2007 11:07:10 +0200
parents c5d627a313b1
children 6719134a07c2
comparison
equal deleted inserted replaced
379:76b7d63099ad 380:8626e4521993
30 * 30 *
31 */ 31 */
32 32
33 #include <config.h> 33 #include <config.h>
34 #include <string.h> 34 #include <string.h>
35 #include <stdio.h>
36 #include <stdlib.h> 35 #include <stdlib.h>
37 #include <assert.h> 36 #include <assert.h>
38 37
39 #include <X11/Xlib.h> 38 #include <X11/Xlib.h>
40 #include <X11/Xutil.h> 39 #include <X11/Xutil.h>
83 static int b_maskWidth, b_maskHeight; 82 static int b_maskWidth, b_maskHeight;
84 static GC b_maskGC; 83 static GC b_maskGC;
85 84
86 static CONST char* b_text; 85 static CONST char* b_text;
87 static int b_width, b_height; 86 static int b_width, b_height;
88
89 static int b_lastX, b_lastY;
90 87
91 static XtIntervalId b_timer; 88 static XtIntervalId b_timer;
92 static unsigned long b_delay; 89 static unsigned long b_delay;
93 90
94 static int b_screenWidth, b_screenHeight; 91 static int b_screenWidth, b_screenHeight;
362 y += (shape & SHAPE_CONE_TOP) ? POINTER_OFFSET : -POINTER_OFFSET; 359 y += (shape & SHAPE_CONE_TOP) ? POINTER_OFFSET : -POINTER_OFFSET;
363 360
364 /* make sure it is still ok with offset */ 361 /* make sure it is still ok with offset */
365 shape = get_shape (shape, x, y, b_width, b_height, b_screenWidth, b_screenHeight); 362 shape = get_shape (shape, x, y, b_width, b_height, b_screenWidth, b_screenHeight);
366 363
367 b_lastX = x;
368 b_lastY = y;
369 b_lastShape = shape; 364 b_lastShape = shape;
370
371 365
372 make_mask (shape, x, y, b_width, b_height); 366 make_mask (shape, x, y, b_width, b_height);
373 367
374 XShapeCombineMask (b_dpy, b_win, ShapeBounding, 0, 0, b_mask, ShapeSet); 368 XShapeCombineMask (b_dpy, b_win, ShapeBounding, 0, 0, b_mask, ShapeSet);
375 369
596 590
597 shape = get_shape (shape, x, y, b_width, b_height, b_screenWidth, b_screenHeight); 591 shape = get_shape (shape, x, y, b_width, b_height, b_screenWidth, b_screenHeight);
598 592
599 if (shape == b_lastShape) 593 if (shape == b_lastShape)
600 { 594 {
601 b_lastX = x;
602 b_lastY = y;
603
604 XMoveWindow (b_dpy, b_win, 595 XMoveWindow (b_dpy, b_win,
605 shape & SHAPE_CONE_LEFT ? x : x - b_width, 596 shape & SHAPE_CONE_LEFT ? x : x - b_width,
606 shape & SHAPE_CONE_TOP ? y : y - b_height); 597 shape & SHAPE_CONE_TOP ? y : y - b_height);
607 } 598 }
608 else 599 else