all repos — openbox @ 888c3d1f6ae80c3e2d8ab37ebead8a96a8d0a565

openbox fork - make it a bit more like ryudo

make activate take a here parameter
Dana Jansens danakj@orodu.net
commit

888c3d1f6ae80c3e2d8ab37ebead8a96a8d0a565

parent

90861d60f73c87e9459dd84b92e83993c4520366

4 files changed, 14 insertions(+), 8 deletions(-)

jump to
M openbox/client.copenbox/client.c

@@ -2533,16 +2533,19 @@ #endif

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;
M openbox/client.hopenbox/client.h

@@ -395,8 +395,11 @@ /*! Remove focus from the client window */

void client_unfocus(ObClient *self); /*! Activates the client for use, focusing, uniconifying it, etc. To be used - when the user deliberately selects a window for use. */ -void client_activate(ObClient *self); + when the user deliberately selects a window for use. + @param here If true, then the client is brought to the current desktop; + otherwise, the desktop is changed to where the client lives. +*/ +void client_activate(ObClient *self, gboolean here); /*! Calculates the stacking layer for the client window */ void client_calc_layer(ObClient *self);
M openbox/event.copenbox/event.c

@@ -939,7 +939,7 @@ ob_debug("net_close_window for 0x%lx\n", client->window);

client_close(client); } else if (msgtype == prop_atoms.net_active_window) { ob_debug("net_active_window for 0x%lx\n", client->window); - client_activate(client); + client_activate(client, FALSE); } else if (msgtype == prop_atoms.net_wm_moveresize) { ob_debug("net_wm_moveresize for 0x%lx\n", client->window); if ((Atom)e->xclient.data.l[2] ==
M openbox/focus.copenbox/focus.c

@@ -278,7 +278,7 @@ frame_adjust_focus(focus_client->frame, TRUE);

goto done_cycle; } else if (done) { if (focus_cycle_target) - client_activate(focus_cycle_target); + client_activate(focus_cycle_target, FALSE); goto done_cycle; }