lookingGlass: Take separate grab for object inspector
The object inspector is not a child of the main looking glass dialog, so it no longer receives pointer/touch events with the new grab API. Fix this by pushing/popping a separate grab. https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5150 Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2218>
This commit is contained in:
parent
eeabdd150c
commit
cff09617f3
@ -451,6 +451,14 @@ class ObjInspector extends St.ScrollView {
|
|||||||
open(sourceActor) {
|
open(sourceActor) {
|
||||||
if (this._open)
|
if (this._open)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
const grab = Main.pushModal(this, { actionMode: Shell.ActionMode.LOOKING_GLASS });
|
||||||
|
if (grab.get_seat_state() === Clutter.GrabState.NONE) {
|
||||||
|
Main.popModal(grab);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this._grab = grab;
|
||||||
this._previousObj = null;
|
this._previousObj = null;
|
||||||
this._open = true;
|
this._open = true;
|
||||||
this.show();
|
this.show();
|
||||||
@ -470,6 +478,8 @@ class ObjInspector extends St.ScrollView {
|
|||||||
close() {
|
close() {
|
||||||
if (!this._open)
|
if (!this._open)
|
||||||
return;
|
return;
|
||||||
|
Main.popModal(this._grab);
|
||||||
|
this._grab = null;
|
||||||
this._open = false;
|
this._open = false;
|
||||||
this.hide();
|
this.hide();
|
||||||
this._previousObj = null;
|
this._previousObj = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user