mirror of
https://github.com/brl/mutter.git
synced 2024-11-30 12:00:44 -05:00
stack: Allow promoting transient windows to their parent's layer
When a window that should be stacked above another one is placed in a lower layer than the other window, we currently allow promoting it to the higher layer when it has a "transient type". We should do the same when the window is an actual transient of the other window. This is particularly relevant for wayland windows, where types play a much smaller role: Transient windows like non-modal dialogs (and since commit666bef7a
, popup windows as well) currently end up underneath their always-on-top parent. https://gitlab.gnome.org/GNOME/mutter/issues/587 (cherry picked from commit1c89fce30e
)
This commit is contained in:
parent
1b75d78c72
commit
c0e76186da
@ -858,8 +858,11 @@ static void
|
|||||||
ensure_above (MetaWindow *above,
|
ensure_above (MetaWindow *above,
|
||||||
MetaWindow *below)
|
MetaWindow *below)
|
||||||
{
|
{
|
||||||
if (WINDOW_HAS_TRANSIENT_TYPE(above) &&
|
gboolean is_transient;
|
||||||
above->layer < below->layer)
|
|
||||||
|
is_transient = WINDOW_HAS_TRANSIENT_TYPE (above) ||
|
||||||
|
above->transient_for == below;
|
||||||
|
if (is_transient && above->layer < below->layer)
|
||||||
{
|
{
|
||||||
meta_topic (META_DEBUG_STACK,
|
meta_topic (META_DEBUG_STACK,
|
||||||
"Promoting window %s from layer %u to %u due to contraint\n",
|
"Promoting window %s from layer %u to %u due to contraint\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user