mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
window: Add get_default_layer() helper
Most of the layer computation that the stack does actually depends on the windowing backend, so we will move it to a vfunc. However before we do that, split out the bit that will be shared. https://gitlab.gnome.org/GNOME/mutter/merge_requests/949
This commit is contained in:
parent
599d8e3287
commit
b753213f9b
@ -480,12 +480,7 @@ get_standalone_layer (MetaWindow *window)
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (window->wm_state_below)
|
||||
layer = META_LAYER_BOTTOM;
|
||||
else if (window->wm_state_above && !META_WINDOW_MAXIMIZED (window))
|
||||
layer = META_LAYER_TOP;
|
||||
else
|
||||
layer = META_LAYER_NORMAL;
|
||||
layer = meta_window_get_default_layer (window);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -737,6 +737,7 @@ void meta_window_update_keyboard_resize (MetaWindow *window,
|
||||
gboolean update_cursor);
|
||||
void meta_window_update_keyboard_move (MetaWindow *window);
|
||||
|
||||
MetaStackLayer meta_window_get_default_layer (MetaWindow *window);
|
||||
void meta_window_update_layer (MetaWindow *window);
|
||||
|
||||
void meta_window_recalc_features (MetaWindow *window);
|
||||
|
@ -6946,6 +6946,17 @@ meta_window_update_keyboard_move (MetaWindow *window)
|
||||
&x, &y);
|
||||
}
|
||||
|
||||
MetaStackLayer
|
||||
meta_window_get_default_layer (MetaWindow *window)
|
||||
{
|
||||
if (window->wm_state_below)
|
||||
return META_LAYER_BOTTOM;
|
||||
else if (window->wm_state_above && !META_WINDOW_MAXIMIZED (window))
|
||||
return META_LAYER_TOP;
|
||||
else
|
||||
return META_LAYER_NORMAL;
|
||||
}
|
||||
|
||||
void
|
||||
meta_window_update_layer (MetaWindow *window)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user