From 55b84316bb699fa530efe78d75ae8e1d57c1b57f Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Wed, 28 Apr 2010 12:57:51 -0400 Subject: make an event queue for X events. the queue's min size is 16 XEvents (~3k) --- openbox/moveresize.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'openbox/moveresize.c') 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); -- cgit v1.2.3