From 2ca83f67137c41ecd7d2cc2742b79aa8b2d7c8a8 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Thu, 17 May 2007 01:38:01 +0000 Subject: grab the pointer when windows move them selves so no enter events happen. i wonder if this will cause but reports. it still does for restacking though.. little cleanup in client.c, and remove client_configure macro which was now redundant --- openbox/event.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'openbox/event.c') diff --git a/openbox/event.c b/openbox/event.c index b1e61f77..15902a6a 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -28,6 +28,7 @@ #include "config.h" #include "screen.h" #include "frame.h" +#include "grab.h" #include "menu.h" #include "menuframe.h" #include "keyboard.h" @@ -1081,7 +1082,11 @@ static void event_handle_client(ObClient *client, XEvent *e) if (config) { client_find_onscreen(client, &x, &y, w, h, FALSE); + + /* don't create enter events from clients moving themselves */ + grab_pointer(FALSE, FALSE, OB_CURSOR_NONE); client_configure_full(client, x, y, w, h, FALSE, TRUE); + ungrab_pointer(); } break; } @@ -1258,7 +1263,11 @@ static void event_handle_client(ObClient *client, XEvent *e) e->xclient.data.l[0] & 1 << 9, y); client_convert_gravity(client, grav, &x, &y, w, h); client_find_onscreen(client, &x, &y, w, h, FALSE); - client_configure(client, x, y, w, h, FALSE, TRUE); + + /* don't create enter events from clients moving themselves */ + grab_pointer(FALSE, FALSE, OB_CURSOR_NONE); + client_configure_full(client, x, y, w, h, FALSE, TRUE); + ungrab_pointer(); } else if (msgtype == prop_atoms.net_restack_window) { if (e->xclient.data.l[0] != 2) { ob_debug_type(OB_DEBUG_APP_BUGS, -- cgit v1.2.3