Mercurial > MadButterfly
comparison src/X_main.c @ 37:943acee7f346
update exposed area
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Wed, 06 Aug 2008 10:14:45 +0800 |
parents | 581a03196093 |
children | db2aa914e14b |
comparison
equal
deleted
inserted
replaced
36:51a20f240ce3 | 37:943acee7f346 |
---|---|
36 int r; | 36 int r; |
37 co_aix x, y; | 37 co_aix x, y; |
38 shape_t *shape = NULL; | 38 shape_t *shape = NULL; |
39 int in_stroke; | 39 int in_stroke; |
40 | 40 |
41 XSelectInput(display, win, PointerMotionMask); | 41 XSelectInput(display, win, PointerMotionMask | ExposureMask); |
42 while((r = XNextEvent(display, &evt)) == 0) { | 42 while((r = XNextEvent(display, &evt)) == 0) { |
43 switch(evt.type) { | 43 switch(evt.type) { |
44 case MotionNotify: | 44 case MotionNotify: |
45 mevt = (XMotionEvent *)&evt; | 45 mevt = (XMotionEvent *)&evt; |
46 x = mevt->x; | 46 x = mevt->x; |
47 y = mevt->y; | 47 y = mevt->y; |
48 shape = find_shape_at_pos(rdman, x, y, &in_stroke); | 48 shape = find_shape_at_pos(rdman, x, y, &in_stroke); |
49 hint_shape(rdman, shape); | 49 hint_shape(rdman, shape); |
50 break; | |
51 case Expose: | |
52 rdman_redraw_all(rdman); | |
53 /* rdman_redraw_area(rdman, evt.xexpose.x, evt.xexpose.y, | |
54 evt.xexpose.width, evt.xexpose.height); */ | |
50 break; | 55 break; |
51 } | 56 } |
52 } | 57 } |
53 } | 58 } |
54 | 59 |