X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fclient.c;h=ee8001c9cda89b77e395a1a816c361a2e344beec;hb=8772b46b56172e35506f21d626aa89bd649615c6;hp=973cbc7980c0bc26a5736a49728482a5aa89e42f;hpb=10f79f4daea0cf4e904a9f85783cd40e0bfb8af5;p=chaz%2Fopenbox diff --git a/openbox/client.c b/openbox/client.c index 973cbc79..ee8001c9 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); @@ -1148,6 +1152,9 @@ static void client_get_desktop(ObClient *self) for (it = self->group->members; it; it = g_slist_next(it)) { ObClient *c = it->data; + + if (c->desktop == DESKTOP_ALL) continue; + if (c != self) { if (first) { all = c->desktop; @@ -3515,10 +3522,6 @@ gboolean client_focus(ObClient *self) self = client_focus_target(self); if (!client_can_focus(self)) { - if (!self->frame->visible) { - /* update the focus lists */ - focus_order_to_top(self); - } ob_debug_type(OB_DEBUG_FOCUS, "Client %s can't be focused\n", self->title); return FALSE; @@ -3876,12 +3879,12 @@ ObClient *client_search_transient(ObClient *self, ObClient *search) } #define WANT_EDGE(cur, c) \ - if(cur == c) \ + if (cur == c) \ continue; \ - if(c->desktop != cur->desktop && cur->desktop != DESKTOP_ALL && \ - c->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) \