Blame SOURCES/0001-layout-Make-the-hot-corner-optional.patch

35159f
From 35cbad572120125d3b823f37d2100b2beee4c1d8 Mon Sep 17 00:00:00 2001
35159f
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
35159f
Date: Thu, 8 Jun 2017 17:07:56 +0200
35159f
Subject: [PATCH] layout: Make the hot corner optional
35159f
35159f
Whether people love or hate the hot corner depends in large extents
35159f
on hardware sensitivity and habits, which is hard to get right
35159f
universally. So bite the bullet and support an option to enable or
35159f
disable hot corners ...
35159f
35159f
https://bugzilla.gnome.org/show_bug.cgi?id=688320
35159f
---
35159f
 js/ui/layout.js | 14 +++++++++++++-
35159f
 1 file changed, 13 insertions(+), 1 deletion(-)
35159f
35159f
diff --git a/js/ui/layout.js b/js/ui/layout.js
35159f
index 2b3bb7442..beb4c0a5d 100644
35159f
--- a/js/ui/layout.js
35159f
+++ b/js/ui/layout.js
35159f
@@ -1,6 +1,6 @@
35159f
 // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
35159f
 
35159f
-const { Clutter, GLib, GObject, Meta, Shell, St } = imports.gi;
35159f
+const { Clutter, Gio, GLib, GObject, Meta, Shell, St } = imports.gi;
35159f
 const Signals = imports.signals;
35159f
 
35159f
 const Background = imports.ui.background;
35159f
@@ -267,6 +267,13 @@ var LayoutManager = GObject.registerClass({
35159f
         this._backgroundGroup.lower_bottom();
35159f
         this._bgManagers = [];
35159f
 
35159f
+        this._interfaceSettings = new Gio.Settings({
35159f
+            schema_id: 'org.gnome.desktop.interface'
35159f
+        });
35159f
+
35159f
+       this._interfaceSettings.connect('changed::enable-hot-corners',
35159f
+                                       this._updateHotCorners.bind(this));
35159f
+
35159f
         // Need to update struts on new workspaces when they are added
35159f
         let workspaceManager = global.workspace_manager;
35159f
         workspaceManager.connect('notify::n-workspaces',
35159f
@@ -358,6 +365,11 @@ var LayoutManager = GObject.registerClass({
35159f
         });
35159f
         this.hotCorners = [];
35159f
 
35159f
+        if (!this._interfaceSettings.get_boolean('enable-hot-corners')) {
35159f
+            this.emit('hot-corners-changed');
35159f
+            return;
35159f
+        }
35159f
+
35159f
         let size = this.panelBox.height;
35159f
 
35159f
         // build new hot corners
35159f
-- 
35159f
2.21.0
35159f