all repos — openbox @ ac59dd4fe53330d717a12f55f6bfc17467ad2ae2

openbox fork - make it a bit more like ryudo

don't focus new windows if they appear on another desktop and a relative is not focused
Dana Jansens danakj@orodu.net
commit

ac59dd4fe53330d717a12f55f6bfc17467ad2ae2

parent

a5c6eb81adb67756848b4b5fa053eea302d06225

1 files changed, 13 insertions(+), 4 deletions(-)

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

@@ -471,10 +471,10 @@ }

/* if it's on another desktop */ else if (!(self->desktop == screen_desktop || - self->desktop == DESKTOP_ALL) && - /* the timestamp is from before you changed desktops */ - launch_time && screen_desktop_user_time && - !event_time_after(launch_time, screen_desktop_user_time)) + self->desktop == DESKTOP_ALL) && + /* the timestamp is from before you changed desktops */ + launch_time && screen_desktop_user_time && + !event_time_after(launch_time, screen_desktop_user_time)) { activate = FALSE; raise = TRUE;

@@ -525,6 +525,15 @@ raise = TRUE;

ob_debug_type(OB_DEBUG_FOCUS, "Not focusing the window because another window " "would get the focus anyway\n"); + } + else if (!(self->desktop == screen_desktop || + self->desktop == DESKTOP_ALL)) + { + activate = FALSE; + raise = TRUE; + ob_debug_type(OB_DEBUG_FOCUS, + "Not focusing the window because it is on " + "another desktop and no relatives are focused "); } }