diff options
author | Florian Müllner <fmuellner@gnome.org> | 2017-06-08 17:07:56 +0200 |
---|---|---|
committer | Florian Müllner <fmuellner@gnome.org> | 2018-02-23 11:35:35 +0100 |
commit | 7d58bcd8a44cec5f62546621569fb164ae5ec4e9 (patch) | |
tree | 77e699f171c4093ab8f402f24d3b76293e42740f | |
parent | 822875d5c30632efd90cb97ec2be6ec83da22385 (diff) | |
download | gnome-shell-wip/fmuellner/optional-hot-corner.tar.gz |
layout: Make the hot corner optionalwip/fmuellner/optional-hot-corner
Whether people love or hate the hot corner depends in large extents
on hardware sensitivity and habits, which is hard to get right
universally. So bite the bullet and add an option to enable or
disable hot corners ...
https://bugzilla.gnome.org/show_bug.cgi?id=688320
-rw-r--r-- | data/org.gnome.shell.gschema.xml.in | 8 | ||||
-rw-r--r-- | js/ui/layout.js | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/data/org.gnome.shell.gschema.xml.in b/data/org.gnome.shell.gschema.xml.in index 63a19032d..8ec1d2683 100644 --- a/data/org.gnome.shell.gschema.xml.in +++ b/data/org.gnome.shell.gschema.xml.in @@ -38,6 +38,14 @@ load all extensions regardless of the versions they claim to support. </description> </key> + <key name="enable-hot-corners" type="b"> + <default>true</default> + <summary>Enable hot corners</summary> + <description> + If true, the overview can be accessed by moving the mouse to the + top-left corner. + </description> + </key> <key name="favorite-apps" type="as"> <default>[ 'epiphany.desktop', 'evolution.desktop', 'rhythmbox.desktop', 'shotwell.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Software.desktop' ]</default> <summary>List of desktop file IDs for favorite applications</summary> diff --git a/js/ui/layout.js b/js/ui/layout.js index 6f810395d..f79d181b4 100644 --- a/js/ui/layout.js +++ b/js/ui/layout.js @@ -268,6 +268,9 @@ var LayoutManager = new Lang.Class({ this._backgroundGroup.lower_bottom(); this._bgManagers = []; + global.settings.connect('changed::enable-hot-corners', + this._updateHotCorners.bind(this)); + // Need to update struts on new workspaces when they are added global.screen.connect('notify::n-workspaces', this._queueUpdateRegions.bind(this)); @@ -364,6 +367,11 @@ var LayoutManager = new Lang.Class({ }); this.hotCorners = []; + if (!global.settings.get_boolean('enable-hot-corners')) { + this.emit('hot-corners-changed'); + return; + } + let size = this.panelBox.height; // build new hot corners |