messageTray: Hide from picks during DND operations
As it is impossible to interact with notification banners while a DND operation is ongoing, we can temporarily hide the banner container from picks so that DND works as expected even while a banner is showing. https://bugzilla.gnome.org/show_bug.cgi?id=744912
This commit is contained in:
parent
b3a96f2f6c
commit
d56411729b
@ -1555,6 +1555,25 @@ const MessageTray = new Lang.Class({
|
|||||||
|
|
||||||
Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
|
Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
|
||||||
|
|
||||||
|
Main.overview.connect('window-drag-begin',
|
||||||
|
Lang.bind(this, this._onDragBegin));
|
||||||
|
Main.overview.connect('window-drag-cancelled',
|
||||||
|
Lang.bind(this, this._onDragEnd));
|
||||||
|
Main.overview.connect('window-drag-end',
|
||||||
|
Lang.bind(this, this._onDragEnd));
|
||||||
|
|
||||||
|
Main.overview.connect('item-drag-begin',
|
||||||
|
Lang.bind(this, this._onDragBegin));
|
||||||
|
Main.overview.connect('item-drag-cancelled',
|
||||||
|
Lang.bind(this, this._onDragEnd));
|
||||||
|
Main.overview.connect('item-drag-end',
|
||||||
|
Lang.bind(this, this._onDragEnd));
|
||||||
|
|
||||||
|
Main.xdndHandler.connect('drag-begin',
|
||||||
|
Lang.bind(this, this._onDragBegin));
|
||||||
|
Main.xdndHandler.connect('drag-end',
|
||||||
|
Lang.bind(this, this._onDragEnd));
|
||||||
|
|
||||||
Main.wm.addKeybinding('focus-active-notification',
|
Main.wm.addKeybinding('focus-active-notification',
|
||||||
new Gio.Settings({ schema_id: SHELL_KEYBINDINGS_SCHEMA }),
|
new Gio.Settings({ schema_id: SHELL_KEYBINDINGS_SCHEMA }),
|
||||||
Meta.KeyBindingFlags.NONE,
|
Meta.KeyBindingFlags.NONE,
|
||||||
@ -1571,6 +1590,14 @@ const MessageTray = new Lang.Class({
|
|||||||
this._updateState();
|
this._updateState();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_onDragBegin: function() {
|
||||||
|
Shell.util_set_hidden_from_pick(this.actor, true);
|
||||||
|
},
|
||||||
|
|
||||||
|
_onDragEnd: function() {
|
||||||
|
Shell.util_set_hidden_from_pick(this.actor, false);
|
||||||
|
},
|
||||||
|
|
||||||
_onNotificationKeyRelease: function(actor, event) {
|
_onNotificationKeyRelease: function(actor, event) {
|
||||||
if (event.get_key_symbol() == Clutter.KEY_Escape && event.get_state() == 0) {
|
if (event.get_key_symbol() == Clutter.KEY_Escape && event.get_state() == 0) {
|
||||||
this._expireNotification();
|
this._expireNotification();
|
||||||
|
Loading…
Reference in New Issue
Block a user