[mutter/gnome-3-34] stack: Allow promoting transient windows to their parent's layer
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gnome-3-34] stack: Allow promoting transient windows to their parent's layer
- Date: Fri, 29 Nov 2019 14:19:19 +0000 (UTC)
commit c0e76186da5b7baf7c8804c0ffa80232a5a6bf98
Author: Florian Müllner <fmuellner gnome org>
Date: Wed Nov 27 01:00:00 2019 +0000
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
commit 666bef7a, popup windows as well) currently end up underneath their
always-on-top parent.
https://gitlab.gnome.org/GNOME/mutter/issues/587
(cherry picked from commit 1c89fce30e0f478f11f90221ddb6b831d7f0f5e8)
src/core/stack.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/core/stack.c b/src/core/stack.c
index 7d144ee7d..49fb43779 100644
--- a/src/core/stack.c
+++ b/src/core/stack.c
@@ -858,8 +858,11 @@ static void
ensure_above (MetaWindow *above,
MetaWindow *below)
{
- if (WINDOW_HAS_TRANSIENT_TYPE(above) &&
- above->layer < below->layer)
+ gboolean is_transient;
+
+ is_transient = WINDOW_HAS_TRANSIENT_TYPE (above) ||
+ above->transient_for == below;
+ if (is_transient && above->layer < below->layer)
{
meta_topic (META_DEBUG_STACK,
"Promoting window %s from layer %u to %u due to contraint\n",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]