diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-07-21 23:11:42 -0400 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-07-21 23:11:42 -0400 |
| commit | 84cdb2be99b4e399f913b8557e8a84a0386a3ae1 (patch) | |
| tree | 15d0146a106df58255c9d3057a080ae2e6597491 /openbox | |
| parent | 1c98d2e3a6c721e9b2c7ce9a4343d06e4f714261 (diff) | |
don't focus new windows when the user is in a menu or move/resizing a window
Diffstat (limited to 'openbox')
| -rw-r--r-- | openbox/client.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/openbox/client.c b/openbox/client.c index 0392ee35..a7b616d2 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -452,9 +452,18 @@ void client_manage(Window window) "(last time %u)\n", self->window, self->user_time, last_time); + if (menu_frame_visible || moveresize_in_progress) { + activate = FALSE; + ob_debug_type(OB_DEBUG_FOCUS, + "Not focusing the window because the user is inside " + "an Openbox menu or is move/resizing a window and " + "we don't want to interrupt them\n"); + } + /* if it's on another desktop */ - if (!(self->desktop == screen_desktop || self->desktop == DESKTOP_ALL) - && /* the timestamp is from before you changed desktops */ + else 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)) { |
