kill enter events without using pointer grabs
Dana Jansens danakj@orodu.net
4 files changed,
16 insertions(+),
22 deletions(-)
M
openbox/client.c
→
openbox/client.c
@@ -3272,10 +3272,6 @@ }
} } - /* Grab pointer across these, so it is the same as actions. Enter events - won't be generated by the windows moving around */ - grab_pointer(FALSE, FALSE, OB_CURSOR_NONE); - if (max_horz != self->max_horz || max_vert != self->max_vert) { if (max_horz != self->max_horz && max_vert != self->max_vert) { /* toggling both */@@ -3313,19 +3309,11 @@ /* when a window changes modality, then its stacking order with its
transients needs to change */ stacking_raise(CLIENT_AS_WINDOW(self)); - /* These things below can change focus so we can't grab pointer for - them. Note how we have two ungrab_pointers.. */ - ungrab_pointer(); - /* it also may get focused. if something is focused that shouldn't be focused anymore, then move the focus */ if (focus_client && client_focus_target(focus_client) != focus_client) client_focus(focus_client); } - else - /* These things below can change focus so we can't grab pointer for - them. Note how we have two ungrab_pointers.. */ - ungrab_pointer(); if (iconic != self->iconic) client_iconify(self, iconic, FALSE, FALSE);
M
openbox/event.c
→
openbox/event.c
@@ -1082,11 +1082,10 @@ }
if (config) { 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(client, x, y, w, h, FALSE, TRUE); - ungrab_pointer(); + /* ignore enter events caused by these like ob actions do */ + event_ignore_queued_enters(); } break; }@@ -1180,6 +1179,9 @@ e->xclient.data.l[1], e->xclient.data.l[2],
client->window); client_set_state(client, e->xclient.data.l[0], e->xclient.data.l[1], e->xclient.data.l[2]); + + /* ignore enter events caused by these like ob actions do */ + event_ignore_queued_enters(); } else if (msgtype == prop_atoms.net_close_window) { ob_debug("net_close_window for 0x%lx\n", client->window); client_close(client);@@ -1264,10 +1266,10 @@ 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); - /* don't create enter events from clients moving themselves */ - grab_pointer(FALSE, FALSE, OB_CURSOR_NONE); client_configure(client, x, y, w, h, FALSE, TRUE); - ungrab_pointer(); + + /* ignore enter events caused by these like ob actions do */ + event_ignore_queued_enters(); } else if (msgtype == prop_atoms.net_restack_window) { if (e->xclient.data.l[0] != 2) { ob_debug_type(OB_DEBUG_APP_BUGS,
M
openbox/event.h
→
openbox/event.h
@@ -51,7 +51,4 @@ /*! Compare t1 and t2, taking into account wraparound. True if t1
comes at the same time or later than t2. */ gboolean event_time_after(Time t1, Time t2); -/*! Used with XCheckIfEvent to find a focusin event on a client window */ -Bool event_look_for_focusin_client(Display *d, XEvent *e, XPointer arg); - #endif