mirror of
https://github.com/brl/mutter.git
synced 2025-02-23 16:34:10 +00:00
core: Remove META_LAYER_FULLSCREEN
This layer isn't really being used and in fact, it causes meta_stack_get_default_focus_window() to return a fullscreen window even if the naturally topmost window in the stack isn't a fullscreen one. Note that commit a3bf9b01aa7019798924b618160fcb184e096a3c changed how we choose the default focus window from the MRU to the topmost in the stack. https://bugzilla.gnome.org/show_bug.cgi?id=768221
This commit is contained in:
parent
492854e14d
commit
fcc7501eb8
@ -273,34 +273,11 @@ meta_stack_update_window_tile_matches (MetaStack *stack,
|
|||||||
g_list_free (windows);
|
g_list_free (windows);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
|
||||||
is_focused_foreach (MetaWindow *window,
|
|
||||||
void *data)
|
|
||||||
{
|
|
||||||
if (window->has_focus)
|
|
||||||
{
|
|
||||||
*((gboolean*) data) = TRUE;
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
|
||||||
windows_on_different_monitor (MetaWindow *a,
|
|
||||||
MetaWindow *b)
|
|
||||||
{
|
|
||||||
if (a->screen != b->screen)
|
|
||||||
return TRUE;
|
|
||||||
|
|
||||||
return a->monitor != b->monitor;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Get layer ignoring any transient or group relationships */
|
/* Get layer ignoring any transient or group relationships */
|
||||||
static MetaStackLayer
|
static MetaStackLayer
|
||||||
get_standalone_layer (MetaWindow *window)
|
get_standalone_layer (MetaWindow *window)
|
||||||
{
|
{
|
||||||
MetaStackLayer layer;
|
MetaStackLayer layer;
|
||||||
gboolean focused_transient = FALSE;
|
|
||||||
|
|
||||||
switch (window->type)
|
switch (window->type)
|
||||||
{
|
{
|
||||||
@ -325,20 +302,8 @@ get_standalone_layer (MetaWindow *window)
|
|||||||
layer = META_LAYER_OVERRIDE_REDIRECT;
|
layer = META_LAYER_OVERRIDE_REDIRECT;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
meta_window_foreach_transient (window,
|
|
||||||
is_focused_foreach,
|
|
||||||
&focused_transient);
|
|
||||||
|
|
||||||
if (window->wm_state_below)
|
if (window->wm_state_below)
|
||||||
layer = META_LAYER_BOTTOM;
|
layer = META_LAYER_BOTTOM;
|
||||||
else if (window->fullscreen &&
|
|
||||||
(focused_transient ||
|
|
||||||
window == window->display->focus_window ||
|
|
||||||
window->display->focus_window == NULL ||
|
|
||||||
(window->display->focus_window != NULL &&
|
|
||||||
windows_on_different_monitor (window,
|
|
||||||
window->display->focus_window))))
|
|
||||||
layer = META_LAYER_FULLSCREEN;
|
|
||||||
else if (window->wm_state_above && !META_WINDOW_MAXIMIZED (window))
|
else if (window->wm_state_above && !META_WINDOW_MAXIMIZED (window))
|
||||||
layer = META_LAYER_TOP;
|
layer = META_LAYER_TOP;
|
||||||
else
|
else
|
||||||
@ -393,8 +358,6 @@ get_maximum_layer_in_group (MetaWindow *window)
|
|||||||
static void
|
static void
|
||||||
compute_layer (MetaWindow *window)
|
compute_layer (MetaWindow *window)
|
||||||
{
|
{
|
||||||
MetaStackLayer old_layer = window->layer;
|
|
||||||
|
|
||||||
window->layer = get_standalone_layer (window);
|
window->layer = get_standalone_layer (window);
|
||||||
|
|
||||||
/* We can only do promotion-due-to-group for dialogs and other
|
/* We can only do promotion-due-to-group for dialogs and other
|
||||||
@ -429,10 +392,6 @@ compute_layer (MetaWindow *window)
|
|||||||
meta_topic (META_DEBUG_STACK, "Window %s on layer %u type = %u has_focus = %d\n",
|
meta_topic (META_DEBUG_STACK, "Window %s on layer %u type = %u has_focus = %d\n",
|
||||||
window->desc, window->layer,
|
window->desc, window->layer,
|
||||||
window->type, window->has_focus);
|
window->type, window->has_focus);
|
||||||
|
|
||||||
if (window->layer != old_layer &&
|
|
||||||
(old_layer == META_LAYER_FULLSCREEN || window->layer == META_LAYER_FULLSCREEN))
|
|
||||||
meta_screen_queue_check_fullscreen (window->screen);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Front of the layer list is the topmost window,
|
/* Front of the layer list is the topmost window,
|
||||||
@ -990,6 +949,8 @@ stack_do_resort (MetaStack *stack)
|
|||||||
stack->sorted = g_list_sort (stack->sorted,
|
stack->sorted = g_list_sort (stack->sorted,
|
||||||
(GCompareFunc) compare_window_position);
|
(GCompareFunc) compare_window_position);
|
||||||
|
|
||||||
|
meta_screen_queue_check_fullscreen (stack->screen);
|
||||||
|
|
||||||
stack->need_resort = FALSE;
|
stack->need_resort = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3180,7 +3180,6 @@ meta_window_make_fullscreen_internal (MetaWindow *window)
|
|||||||
window->fullscreen = TRUE;
|
window->fullscreen = TRUE;
|
||||||
|
|
||||||
meta_stack_freeze (window->screen->stack);
|
meta_stack_freeze (window->screen->stack);
|
||||||
meta_window_update_layer (window);
|
|
||||||
|
|
||||||
meta_window_raise (window);
|
meta_window_raise (window);
|
||||||
meta_stack_thaw (window->screen->stack);
|
meta_stack_thaw (window->screen->stack);
|
||||||
@ -3265,7 +3264,7 @@ meta_window_unmake_fullscreen (MetaWindow *window)
|
|||||||
window, META_SIZE_CHANGE_UNFULLSCREEN,
|
window, META_SIZE_CHANGE_UNFULLSCREEN,
|
||||||
&old_frame_rect, &old_buffer_rect);
|
&old_frame_rect, &old_buffer_rect);
|
||||||
|
|
||||||
meta_window_update_layer (window);
|
meta_screen_queue_check_fullscreen (window->screen);
|
||||||
|
|
||||||
g_object_notify_by_pspec (G_OBJECT (window), obj_props[PROP_FULLSCREEN]);
|
g_object_notify_by_pspec (G_OBJECT (window), obj_props[PROP_FULLSCREEN]);
|
||||||
}
|
}
|
||||||
|
@ -519,7 +519,6 @@ void meta_frame_borders_clear (MetaFrameBorders *self);
|
|||||||
* @META_LAYER_NORMAL: Normal layer
|
* @META_LAYER_NORMAL: Normal layer
|
||||||
* @META_LAYER_TOP: Top layer
|
* @META_LAYER_TOP: Top layer
|
||||||
* @META_LAYER_DOCK: Dock layer
|
* @META_LAYER_DOCK: Dock layer
|
||||||
* @META_LAYER_FULLSCREEN: Fullscreen layer
|
|
||||||
* @META_LAYER_OVERRIDE_REDIRECT: Override-redirect layer
|
* @META_LAYER_OVERRIDE_REDIRECT: Override-redirect layer
|
||||||
* @META_LAYER_LAST: Marks the end of the #MetaStackLayer enumeration
|
* @META_LAYER_LAST: Marks the end of the #MetaStackLayer enumeration
|
||||||
*
|
*
|
||||||
@ -533,7 +532,6 @@ typedef enum
|
|||||||
META_LAYER_NORMAL = 2,
|
META_LAYER_NORMAL = 2,
|
||||||
META_LAYER_TOP = 4, /* Same as DOCK; see EWMH and bug 330717 */
|
META_LAYER_TOP = 4, /* Same as DOCK; see EWMH and bug 330717 */
|
||||||
META_LAYER_DOCK = 4,
|
META_LAYER_DOCK = 4,
|
||||||
META_LAYER_FULLSCREEN = 5,
|
|
||||||
META_LAYER_OVERRIDE_REDIRECT = 7,
|
META_LAYER_OVERRIDE_REDIRECT = 7,
|
||||||
META_LAYER_LAST = 8
|
META_LAYER_LAST = 8
|
||||||
} MetaStackLayer;
|
} MetaStackLayer;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user