[gnome-shell/eos3.8: 69/255] Allow opening the background menu popup from the APPS view
- From: Matthew Leeds <mwleeds src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/eos3.8: 69/255] Allow opening the background menu popup from the APPS view
- Date: Wed, 10 Jun 2020 19:03:45 +0000 (UTC)
commit 6c3334dcd087d3b4adf044700e033d43bd81376a
Author: Mario Sanchez Prada <mario endlessm com>
Date: Thu Jun 15 14:37:57 2017 +0100
Allow opening the background menu popup from the APPS view
This allows opening the menu from the icon grid view, as long
as no folder is open (which disables the click action).
* 2020-03-19:
+ Fix reentrancy in Overview
+ Release the background action on DnD
js/ui/appDisplay.js | 15 ++++++++++++++-
js/ui/overview.js | 3 +++
2 files changed, 17 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index e3d71ebe05..1b0fb4b0cf 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -6,6 +6,7 @@ const Signals = imports.signals;
const AppActivation = imports.ui.appActivation;
const AppFavorites = imports.ui.appFavorites;
+const BackgroundMenu = imports.ui.backgroundMenu;
const DND = imports.ui.dnd;
const GrabHelper = imports.ui.grabHelper;
const IconGrid = imports.ui.iconGrid;
@@ -358,7 +359,18 @@ class AppDisplay extends BaseAppView {
if (!this._currentDialog.contains(actor))
this._currentDialog.popdown();
});
- this._eventBlocker.add_action(this._clickAction);
+ Main.overview.addAction(this._clickAction, false);
+ this._eventBlocker.bind_property('reactive', this._clickAction,
+ 'enabled', GObject.BindingFlags.SYNC_CREATE);
+
+ this._bgAction = new Clutter.ClickAction();
+ Main.overview.addAction(this._bgAction);
+ BackgroundMenu.addBackgroundMenuForAction(this._bgAction, Main.layoutManager);
+ this._clickAction.bind_property('enabled', this._bgAction,
+ 'enabled',
+ GObject.BindingFlags.SYNC_CREATE | GObject.BindingFlags.INVERT_BOOLEAN);
+ this.bind_property('mapped', this._bgAction,
+ 'enabled', GObject.BindingFlags.SYNC_CREATE);
this._currentDialog = null;
this._displayingDialog = false;
@@ -818,6 +830,7 @@ class AppDisplay extends BaseAppView {
};
DND.addDragMonitor(this._dragMonitor);
+ this._bgAction.release();
this._eventBlocker.visible = false;
}
diff --git a/js/ui/overview.js b/js/ui/overview.js
index 589526aa50..b59f3f77a6 100644
--- a/js/ui/overview.js
+++ b/js/ui/overview.js
@@ -159,7 +159,9 @@ class OverviewActor extends St.BoxLayout {
accessible_name: _("Overview"),
vertical: true,
});
+ }
+ init() {
this.add_constraint(new LayoutManager.MonitorConstraint({ primary: true }));
this._searchEntry = new St.Entry({
@@ -331,6 +333,7 @@ var Overview = class {
});
this._overview = new OverviewActor();
+ this._overview.init();
this._overview._delegate = this;
this._allMonitorsGroup.add_actor(this._overview);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]