MessageTray: escape the tray when a legacy icon is clicked
Legacy tray icons may want to take a pointer grab to show a popup menu, and this is incompatible with message tray modality. To solve this, escape the tray when forwarding clicks to the tray icons, and wait for the input mode change to actually synthetize the X event. https://bugzilla.gnome.org/show_bug.cgi?id=682244
This commit is contained in:
parent
43caace1b6
commit
eb351b1882
@ -1740,7 +1740,7 @@ const MessageTray = new Lang.Class({
|
|||||||
|
|
||||||
_onSummaryItemClicked: function(summaryItem, button) {
|
_onSummaryItemClicked: function(summaryItem, button) {
|
||||||
if (summaryItem.source.handleSummaryClick()) {
|
if (summaryItem.source.handleSummaryClick()) {
|
||||||
this._setClickedSummaryItem(null);
|
this._escapeTray();
|
||||||
} else {
|
} else {
|
||||||
if (!this._setClickedSummaryItem(summaryItem, button))
|
if (!this._setClickedSummaryItem(summaryItem, button))
|
||||||
this._setClickedSummaryItem(null);
|
this._setClickedSummaryItem(null);
|
||||||
|
@ -583,18 +583,12 @@ const Source = new Lang.Class({
|
|||||||
this.notifications.length > 0)
|
this.notifications.length > 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (Main.overview.visible) {
|
let id = global.connect('notify::stage-input-mode', Lang.bind(this, function () {
|
||||||
// We can't just connect to Main.overview's 'hidden' signal,
|
|
||||||
// because it's emitted *before* it calls popModal()...
|
|
||||||
let id = global.connect('notify::stage-input-mode', Lang.bind(this,
|
|
||||||
function () {
|
|
||||||
global.disconnect(id);
|
global.disconnect(id);
|
||||||
this.trayIcon.click(event);
|
this.trayIcon.click(event);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
Main.overview.hide();
|
Main.overview.hide();
|
||||||
} else {
|
|
||||||
this.trayIcon.click(event);
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user