[gnome-shell/T27795: 79/138] Allow going back to the icon grid clicking outside any window
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/T27795: 79/138] Allow going back to the icon grid clicking outside any window
- Date: Tue, 1 Oct 2019 23:35:58 +0000 (UTC)
commit fd43899094e7613925e0559397228e4e7a660225
Author: Mario Sanchez Prada <mario endlessm com>
Date: Fri Jun 9 13:31:46 2017 +0100
Allow going back to the icon grid clicking outside any window
This enables the behaviour that takes you back to the APPs view
by clicking in the desktop, outside any open window.
js/ui/layout.js | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/layout.js b/js/ui/layout.js
index f57011a2a6..ca5bd8630b 100644
--- a/js/ui/layout.js
+++ b/js/ui/layout.js
@@ -1,7 +1,7 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
/* exported MonitorConstraint, LayoutManager */
-const { Clutter, Gio, GLib, GObject, Meta, Shell, St } = imports.gi;
+const { Clutter, Gdk, Gio, GLib, GObject, Meta, Shell, St } = imports.gi;
const Signals = imports.signals;
const Background = imports.ui.background;
@@ -347,7 +347,16 @@ var LayoutManager = GObject.registerClass({
}
_addBackgroundMenu(bgManager) {
- BackgroundMenu.addBackgroundMenu(bgManager.backgroundActor, this);
+ let clickAction = new Clutter.ClickAction();
+ bgManager.backgroundActor.add_action(clickAction);
+
+ BackgroundMenu.addBackgroundMenuForAction(clickAction, this);
+
+ clickAction.connect('clicked', action => {
+ let button = action.get_button();
+ if (button == Gdk.BUTTON_PRIMARY)
+ Main.overview.showApps();
+ });
}
_createBackgroundManager(monitorIndex) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]