[mutter] core: Remove META_LAYER_FULLSCREEN
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] core: Remove META_LAYER_FULLSCREEN
- Date: Wed, 6 Jul 2016 17:11:43 +0000 (UTC)
commit fcc7501eb8dab5c1749e5421e31311fd14fd73f0
Author: Rui Matos <tiagomatos gmail com>
Date: Tue Jul 5 19:57:57 2016 +0200
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
src/core/stack.c | 43 ++-----------------------------------------
src/core/window.c | 3 +--
src/meta/common.h | 2 --
3 files changed, 3 insertions(+), 45 deletions(-)
---
diff --git a/src/core/stack.c b/src/core/stack.c
index 1064e72..1375f26 100644
--- a/src/core/stack.c
+++ b/src/core/stack.c
@@ -273,34 +273,11 @@ meta_stack_update_window_tile_matches (MetaStack *stack,
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 */
static MetaStackLayer
get_standalone_layer (MetaWindow *window)
{
MetaStackLayer layer;
- gboolean focused_transient = FALSE;
switch (window->type)
{
@@ -325,20 +302,8 @@ get_standalone_layer (MetaWindow *window)
layer = META_LAYER_OVERRIDE_REDIRECT;
break;
default:
- meta_window_foreach_transient (window,
- is_focused_foreach,
- &focused_transient);
-
if (window->wm_state_below)
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))
layer = META_LAYER_TOP;
else
@@ -393,8 +358,6 @@ get_maximum_layer_in_group (MetaWindow *window)
static void
compute_layer (MetaWindow *window)
{
- MetaStackLayer old_layer = window->layer;
-
window->layer = get_standalone_layer (window);
/* 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",
window->desc, window->layer,
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,
@@ -990,6 +949,8 @@ stack_do_resort (MetaStack *stack)
stack->sorted = g_list_sort (stack->sorted,
(GCompareFunc) compare_window_position);
+ meta_screen_queue_check_fullscreen (stack->screen);
+
stack->need_resort = FALSE;
}
diff --git a/src/core/window.c b/src/core/window.c
index 7395149..cdd6360 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -3180,7 +3180,6 @@ meta_window_make_fullscreen_internal (MetaWindow *window)
window->fullscreen = TRUE;
meta_stack_freeze (window->screen->stack);
- meta_window_update_layer (window);
meta_window_raise (window);
meta_stack_thaw (window->screen->stack);
@@ -3265,7 +3264,7 @@ meta_window_unmake_fullscreen (MetaWindow *window)
window, META_SIZE_CHANGE_UNFULLSCREEN,
&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]);
}
diff --git a/src/meta/common.h b/src/meta/common.h
index 181c3d6..ba98756 100644
--- a/src/meta/common.h
+++ b/src/meta/common.h
@@ -519,7 +519,6 @@ void meta_frame_borders_clear (MetaFrameBorders *self);
* @META_LAYER_NORMAL: Normal layer
* @META_LAYER_TOP: Top layer
* @META_LAYER_DOCK: Dock layer
- * @META_LAYER_FULLSCREEN: Fullscreen layer
* @META_LAYER_OVERRIDE_REDIRECT: Override-redirect layer
* @META_LAYER_LAST: Marks the end of the #MetaStackLayer enumeration
*
@@ -533,7 +532,6 @@ typedef enum
META_LAYER_NORMAL = 2,
META_LAYER_TOP = 4, /* Same as DOCK; see EWMH and bug 330717 */
META_LAYER_DOCK = 4,
- META_LAYER_FULLSCREEN = 5,
META_LAYER_OVERRIDE_REDIRECT = 7,
META_LAYER_LAST = 8
} MetaStackLayer;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]