summaryrefslogtreecommitdiff
path: root/openbox/moveresize.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2010-04-28 12:57:51 -0400
committerDana Jansens <danakj@orodu.net>2010-04-28 12:58:42 -0400
commit55b84316bb699fa530efe78d75ae8e1d57c1b57f (patch)
tree4991974287c7adfdea0680b5d96d42a01c40a97a /openbox/moveresize.c
parent029628087fa0090e7c3b1598786a1bf1712e0db9 (diff)
make an event queue for X events. the queue's min size is 16 XEvents (~3k)
Diffstat (limited to 'openbox/moveresize.c')
-rw-r--r--openbox/moveresize.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/openbox/moveresize.c b/openbox/moveresize.c
index cb0d2101..8ee88fcf 100644
--- a/openbox/moveresize.c
+++ b/openbox/moveresize.c
@@ -32,6 +32,7 @@
#include "obrender/render.h"
#include "obrender/theme.h"
#include "obt/display.h"
+#include "obt/xqueue.h"
#include "obt/prop.h"
#include "obt/keyboard.h"
@@ -672,7 +673,8 @@ static void move_with_keys(KeySym sym, guint state)
XSync(obt_display, FALSE);
{
XEvent ce;
- while (XCheckTypedEvent(obt_display, MotionNotify, &ce));
+ while (xqueue_remove_local(&ce, xqueue_match_type,
+ GINT_TO_POINTER(MotionNotify)));
}
screen_pointer_pos(&px, &py);
@@ -831,7 +833,8 @@ static void resize_with_keys(KeySym sym, guint state)
XSync(obt_display, FALSE);
{
XEvent ce;
- while (XCheckTypedEvent(obt_display, MotionNotify, &ce));
+ while (xqueue_remove_local(&ce, xqueue_match_type,
+ GINT_TO_POINTER(MotionNotify)));
}
screen_pointer_pos(&px, &py);