quickSettings: Make parent StWidget have a 0x0 size

The quick settings menu is child of an actor at 0,0 coordinates,
simply transformed to look in place. However the parent actor stays
at 0,0, and gets a width/height that is able to contain the child
menu (even though the transform will push it outside the parent
actor).

This makes the parent actor (not meant to handle pointer/touch
input) to cover parts of the shell. Since this actor is also where
the Clutter grab happens, the menu is not dismissed either.

Make this parent actor have a 0x0 size, so that it can still act
as the parent for the quick settings menu, but does not actually
cover any area. This makes clicks around the top left corner work
again while the quick settings menu is opened.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5887
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2535>
This commit is contained in:
Carlos Garnacho 2022-11-10 12:06:36 +01:00 committed by Marge Bot
parent 5d390d9899
commit bcafa512e3

View File

@ -582,7 +582,7 @@ var QuickSettingsMenu = class extends PopupMenu.PopupMenu {
constructor(sourceActor, nColumns = 1) { constructor(sourceActor, nColumns = 1) {
super(sourceActor, 0, St.Side.TOP); super(sourceActor, 0, St.Side.TOP);
this.actor = new St.Widget({reactive: true}); this.actor = new St.Widget({reactive: true, width: 0, height: 0});
this.actor.add_child(this._boxPointer); this.actor.add_child(this._boxPointer);
this.actor._delegate = this; this.actor._delegate = this;