diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-07-23 16:35:53 -0400 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-07-24 14:51:59 -0400 |
| commit | bca44f9d204500c4caf220141a638e0340915be6 (patch) | |
| tree | 965448aff845ac67673c67ab573cfe54cb457bc6 /openbox/client.c | |
| parent | 2dcdad6a58bd01d0e94c6ff7ff1916bdde9c5c55 (diff) | |
raise new windows when they aren't getting activated in a couple cases
1. when we're not activating it because the user has a menu open or is moving/resizing a window
2. when we're not activating it because it's opening on another desktop
Diffstat (limited to 'openbox/client.c')
| -rw-r--r-- | openbox/client.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/openbox/client.c b/openbox/client.c index a7b616d2..6d2b11f2 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -443,6 +443,7 @@ void client_manage(Window window) client_apply_startup_state(self, placex, placey, placew, placeh); if (activate) { + gboolean raise = FALSE; guint32 last_time = focus_client ? focus_client->user_time : CurrentTime; @@ -454,6 +455,7 @@ void client_manage(Window window) if (menu_frame_visible || moveresize_in_progress) { activate = FALSE; + raise = TRUE; 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 " @@ -468,6 +470,7 @@ void client_manage(Window window) !event_time_after(self->user_time, screen_desktop_user_time)) { activate = FALSE; + raise = TRUE; ob_debug_type(OB_DEBUG_FOCUS, "Not focusing the window because its on another " "desktop\n"); @@ -512,6 +515,7 @@ void client_manage(Window window) anyway */ else if (client_focus_target(self) != self) { activate = FALSE; + raise = TRUE; ob_debug_type(OB_DEBUG_FOCUS, "Not focusing the window because another window " "would get the focus anyway\n"); @@ -526,6 +530,9 @@ void client_manage(Window window) /* if the client isn't focused, then hilite it so the user knows it is there */ client_hilite(self, TRUE); + /* we may want to raise it even tho we're not activating it */ + if (raise && !client_restore_session_stacking(self)) + stacking_raise(CLIENT_AS_WINDOW(self)); } } else { |
