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;
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)
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)
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)
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)