X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fclient.c;h=a1deded5a06fcb790e2a7bdc7d3a4d41ef42cd1d;hb=888c3d1f6ae80c3e2d8ab37ebead8a96a8d0a565;hp=81eafa7d0110b0e9d6775e65230dba69f8f7fcf0;hpb=f4979de3f5257bf70591d4ccf0ecab7da567b27d;p=chaz%2Fopenbox diff --git a/openbox/client.c b/openbox/client.c index 81eafa7d..a1deded5 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -2533,16 +2533,19 @@ void client_unfocus(ObClient *self) focus_fallback(OB_FOCUS_FALLBACK_UNFOCUSING); } -void client_activate(ObClient *self) +void client_activate(ObClient *self, gboolean here) { if (client_normal(self) && screen_showing_desktop) screen_show_desktop(FALSE); if (self->iconic) client_iconify(self, FALSE, FALSE); if (self->desktop != DESKTOP_ALL && - self->desktop != screen_desktop) - screen_set_desktop(self->desktop); - else if (!self->frame->visible) + self->desktop != screen_desktop) { + if (here) + client_set_desktop(self, screen_desktop, FALSE); + else + screen_set_desktop(self->desktop); + } else if (!self->frame->visible) /* if its not visible for other reasons, then don't mess with it */ return; @@ -2796,11 +2799,11 @@ int client_directional_edge_search(ObClient *c, ObDirection dir) his_edge_end = cur->frame->area.x + cur->frame->area.width; his_offset = cur->frame->area.y + cur->frame->area.height; - if(his_offset + c->size_inc.height > my_offset) + if(his_offset + 1 > my_offset) continue; if(his_offset < dest) - continue; + continue; if(his_edge_start >= my_edge_start && his_edge_start <= my_edge_end) @@ -2837,11 +2840,11 @@ int client_directional_edge_search(ObClient *c, ObDirection dir) his_offset = cur->frame->area.y; - if(his_offset - c->size_inc.height < my_offset) + if(his_offset - 1 < my_offset) continue; if(his_offset > dest) - continue; + continue; if(his_edge_start >= my_edge_start && his_edge_start <= my_edge_end) @@ -2877,11 +2880,11 @@ int client_directional_edge_search(ObClient *c, ObDirection dir) his_edge_end = cur->frame->area.y + cur->frame->area.height; his_offset = cur->frame->area.x + cur->frame->area.width; - if(his_offset + c->size_inc.width > my_offset) + if(his_offset + 1 > my_offset) continue; if(his_offset < dest) - continue; + continue; if(his_edge_start >= my_edge_start && his_edge_start <= my_edge_end) @@ -2918,11 +2921,11 @@ int client_directional_edge_search(ObClient *c, ObDirection dir) his_edge_end = cur->frame->area.y + cur->frame->area.height; his_offset = cur->frame->area.x; - if(his_offset - c->size_inc.width < my_offset) + if(his_offset - 1 < my_offset) continue; if(his_offset > dest) - continue; + continue; if(his_edge_start >= my_edge_start && his_edge_start <= my_edge_end)