diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-04-24 19:53:50 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-04-24 19:53:50 +0000 |
| commit | 0116d82463197bea2890230d71a69e4b92489166 (patch) | |
| tree | a257b7c2447dbc857587395fbfdda863ab0d6e7c /openbox/client.c | |
| parent | ca8665e3093108d5b148916de69ffd9a13be88e4 (diff) | |
don't activate and change desktops if the client's not on the current desktop and its user_time is older than the last time you changed desktops
Diffstat (limited to 'openbox/client.c')
| -rw-r--r-- | openbox/client.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/openbox/client.c b/openbox/client.c index 8098b3dc..2ca9b518 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -385,10 +385,18 @@ void client_manage(Window window) ob_debug("Want to focus new window 0x%x with time %u (last time %u)\n", self->window, self->user_time, last_time); + /* if it's on another desktop */ + if (!(self->desktop == screen_desktop || self->desktop == DESKTOP_ALL) + && /* the timestamp is from before you changed desktops */ + self->user_time && screen_desktop_user_time && + !event_time_after(self->user_time, screen_desktop_user_time)) + { + activate = FALSE; + } /* If nothing is focused, or a parent was focused, then focus this always */ - if (!focus_client || client_search_focus_parent(self) != NULL) + else if (!focus_client || client_search_focus_parent(self) != NULL) activate = TRUE; else { |
