diff --git a/ChangeLog b/ChangeLog index 8526146a6..c786faabb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2005-01-28 Elijah Newren + + Patch from RHEL-3 (Havoc doesn't remember how it got there) that + Havoc posted in bug 156511 to fix the problem with fullscreen + windows on a different xinerama monitor not staying on top. I + updated to HEAD. Should fix #156511. + + * src/stack.c: (windows_on_different_xinerama): new function, + (get_standalone_layer): let windows on a different screen than the + one with the focus window stay in the fullscreen layer + 2005-01-28 Elijah Newren * src/metacity-dialog.c: (warn_about_no_sm_support): make this diff --git a/src/stack.c b/src/stack.c index c49861a90..7fb02b16e 100644 --- a/src/stack.c +++ b/src/stack.c @@ -251,6 +251,17 @@ is_focused_foreach (MetaWindow *window, return TRUE; } +static gboolean +windows_on_different_xinerama (MetaWindow *a, + MetaWindow *b) +{ + if (a->screen != b->screen) + return TRUE; + + return meta_screen_get_xinerama_for_window (a->screen, a) != + meta_screen_get_xinerama_for_window (b->screen, b); +} + /* Get layer ignoring any transient or group relationships */ static MetaStackLayer get_standalone_layer (MetaWindow *window) @@ -279,9 +290,13 @@ get_standalone_layer (MetaWindow *window) if (window->wm_state_below) layer = META_LAYER_BOTTOM; - else if ((window->has_focus || focused_transient || - (window == window->display->expected_focus_window)) && - (window->fullscreen || window_is_fullscreen_size (window))) + else if ((window->fullscreen || window_is_fullscreen_size (window)) && + (window->has_focus || focused_transient || + window == window->display->expected_focus_window || + window->display->focus_window == NULL || + (window->display->focus_window != NULL && + windows_on_different_xinerama (window, + window->display->focus_window)))) layer = META_LAYER_FULLSCREEN; else if (window->wm_state_above) layer = META_LAYER_DOCK;