X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=openbox%2Fclient.c;h=daa65379f3d50e4201a60c7ea0f91976c3ed7126;hb=0fb1d4d5079d96c857990b27f1d005568817c0f9;hp=e10ce1dd4c4293c45efe04fd4f58c4bdf2846270;hpb=3c4e59d59733fb72e5b5f089b3eaabbee8ff9e7e;p=chaz%2Fopenbox diff --git a/openbox/client.c b/openbox/client.c index e10ce1dd..daa65379 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -629,6 +629,7 @@ void client_unmanage(ObClient *self) { guint j; GSList *it; + gulong ignore_start; ob_debug("Unmanaging window: 0x%x plate 0x%x (%s) (%s)\n", self->window, self->frame->window, @@ -640,13 +641,16 @@ void client_unmanage(ObClient *self) don't generate more events */ XSelectInput(ob_display, self->window, NoEventMask); + /* ignore enter events from the unmap so it doesnt mess with the focus */ + if (!client_focused(self) || !config_focus_under_mouse) + ignore_start = event_start_ignore_all_enters(); + frame_hide(self->frame); /* flush to send the hide to the server quickly */ XFlush(ob_display); - /* ignore enter events from the unmap so it doesnt mess with the - focus */ - event_ignore_all_queued_enters(); + if (!client_focused(self) || !config_focus_under_mouse) + event_end_ignore_all_enters(ignore_start); mouse_grab_for_client(self, FALSE); @@ -3246,8 +3250,7 @@ void client_set_desktop_recursive(ObClient *self, client_set_desktop_recursive(it->data, target, donthide); } -void client_set_desktop(ObClient *self, guint target, - gboolean donthide) +void client_set_desktop(ObClient *self, guint target, gboolean donthide) { self = client_search_top_normal_parent(self); client_set_desktop_recursive(self, target, donthide); @@ -3877,13 +3880,12 @@ ObClient *client_search_transient(ObClient *self, ObClient *search) } #define WANT_EDGE(cur, c) \ - if(cur == c) \ - continue; \ - if(!client_normal(cur)) \ + if (cur == c) \ continue; \ - if(screen_desktop != cur->desktop && cur->desktop != DESKTOP_ALL) \ + if (c->desktop != cur->desktop && cur->desktop != DESKTOP_ALL && \ + cur->desktop != screen_desktop) \ continue; \ - if(cur->iconic) \ + if (cur->iconic) \ continue; #define HIT_EDGE(my_edge_start, my_edge_end, his_edge_start, his_edge_end) \