diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-08-04 12:57:34 -0400 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-08-04 12:57:34 -0400 |
| commit | ac59dd4fe53330d717a12f55f6bfc17467ad2ae2 (patch) | |
| tree | d1b9dfc7b706556065fb4aefa39e0e9238083690 /openbox/client.c | |
| parent | a5c6eb81adb67756848b4b5fa053eea302d06225 (diff) | |
don't focus new windows if they appear on another desktop and a relative is not focused
Diffstat (limited to 'openbox/client.c')
| -rw-r--r-- | openbox/client.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/openbox/client.c b/openbox/client.c index cc721830..abb9e2af 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -471,10 +471,10 @@ void client_manage(Window window) /* 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; @@ -526,6 +526,15 @@ void client_manage(Window window) "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 "); + } } if (!activate) { |
