Skip to content

Commit 33df064

Browse files
authored
Put menu windows on top (#2591)
Fixes #2071
1 parent cec55d9 commit 33df064

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/WindowManager.vala

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ namespace Gala {
4949
*/
5050
public Clutter.Actor shell_group { get; private set; }
5151

52+
private Clutter.Actor menu_group { get; set; }
53+
5254
/**
5355
* {@inheritDoc}
5456
*/
@@ -221,6 +223,7 @@ namespace Gala {
221223
* +-- window switcher
222224
* +-- window overview
223225
* +-- shell group
226+
* +-- menu group
224227
* +-- feedback group (e.g. DND icons)
225228
* +-- pointer locator
226229
* +-- dwell click timer
@@ -289,6 +292,9 @@ namespace Gala {
289292
shell_group = new Clutter.Actor ();
290293
ui_group.add_child (shell_group);
291294

295+
menu_group = new Clutter.Actor ();
296+
ui_group.add_child (menu_group);
297+
292298
var feedback_group = display.get_compositor ().get_feedback_group ();
293299
stage.remove_child (feedback_group);
294300
ui_group.add_child (feedback_group);
@@ -1012,6 +1018,15 @@ namespace Gala {
10121018
notification_stack.show_notification (actor);
10131019
}
10141020

1021+
// Workaround for X11 bug: https://github.com/elementary/gala/issues/2071
1022+
if (window.window_type == MENU ||
1023+
window.window_type == DROPDOWN_MENU ||
1024+
window.window_type == POPUP_MENU ||
1025+
window.window_type == TOOLTIP
1026+
) {
1027+
InternalUtils.clutter_actor_reparent (actor, menu_group);
1028+
}
1029+
10151030
// Workaround for X11 bug: https://github.com/elementary/dock/issues/479
10161031
if (!Meta.Util.is_wayland_compositor () && window.window_type == DND) {
10171032
InternalUtils.clutter_actor_reparent (actor, get_display ().get_compositor ().get_feedback_group ());

0 commit comments

Comments
 (0)