[gnome-shell/wip/fmuellner/optional-hot-corner: 91/91] layout: Make the hot corner optional
- From: Florian MĂźllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/fmuellner/optional-hot-corner: 91/91] layout: Make the hot corner optional
- Date: Wed, 12 Jun 2019 19:33:56 +0000 (UTC)
commit 6fd5fbc0de28732da1ca5182a3656fa2a0b2393b
Author: Florian MĂźllner <fmuellner gnome org>
Date: Thu Jun 8 17:07:56 2017 +0200
layout: Make the hot corner optional
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
data/org.gnome.shell.gschema.xml.in | 8 ++++++++
js/ui/layout.js | 8 ++++++++
2 files changed, 16 insertions(+)
---
diff --git a/data/org.gnome.shell.gschema.xml.in b/data/org.gnome.shell.gschema.xml.in
index 24e2a75b0..2a5432a36 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 90385e82c..7d66994a2 100644
--- a/js/ui/layout.js
+++ b/js/ui/layout.js
@@ -272,6 +272,9 @@ var LayoutManager = GObject.registerClass({
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
let workspaceManager = global.workspace_manager;
workspaceManager.connect('notify::n-workspaces',
@@ -375,6 +378,11 @@ var LayoutManager = GObject.registerClass({
});
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]