boxpointer: Disable unredirection while visible
Some popovers like the ibus candidate popover may be requested while showing an unredirected fullscreen window. Disable unredirection while the popover is visible so that it can actually be shown. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1900>
This commit is contained in:
parent
f5259a5ce4
commit
54a71944ba
@ -1,7 +1,7 @@
|
|||||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||||
/* exported BoxPointer */
|
/* exported BoxPointer */
|
||||||
|
|
||||||
const { Clutter, GObject, St } = imports.gi;
|
const { Clutter, GObject, Meta, St } = imports.gi;
|
||||||
|
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
|
|
||||||
@ -48,6 +48,13 @@ var BoxPointer = GObject.registerClass({
|
|||||||
this._sourceAlignment = 0.5;
|
this._sourceAlignment = 0.5;
|
||||||
this._muteInput = true;
|
this._muteInput = true;
|
||||||
|
|
||||||
|
this.connect('notify::visible', () => {
|
||||||
|
if (this.visible)
|
||||||
|
Meta.disable_unredirect_for_display(global.display);
|
||||||
|
else
|
||||||
|
Meta.enable_unredirect_for_display(global.display);
|
||||||
|
});
|
||||||
|
|
||||||
this.connect('destroy', this._onDestroy.bind(this));
|
this.connect('destroy', this._onDestroy.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user