[gnome-shell/wip/rstrode/login-screen-extensions: 74/134] layout: Make the hot corner optional
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/rstrode/login-screen-extensions: 74/134] layout: Make the hot corner optional
- Date: Thu, 26 Aug 2021 19:31:00 +0000 (UTC)
commit f7dfd1e358290e5e32ddfdca93de1d5acda3d0d1
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 support an option to enable or
disable hot corners ...
https://bugzilla.gnome.org/show_bug.cgi?id=688320
js/ui/layout.js | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/layout.js b/js/ui/layout.js
index 30e750dc5f..6137d60af8 100644
--- a/js/ui/layout.js
+++ b/js/ui/layout.js
@@ -1,6 +1,6 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
-const { Clutter, GLib, GObject, Meta, Shell, St } = imports.gi;
+const { Clutter, Gio, GLib, GObject, Meta, Shell, St } = imports.gi;
const Signals = imports.signals;
const Background = imports.ui.background;
@@ -267,6 +267,13 @@ var LayoutManager = GObject.registerClass({
this._backgroundGroup.lower_bottom();
this._bgManagers = [];
+ this._interfaceSettings = new Gio.Settings({
+ schema_id: 'org.gnome.desktop.interface'
+ });
+
+ this._interfaceSettings.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',
@@ -370,6 +377,11 @@ var LayoutManager = GObject.registerClass({
});
this.hotCorners = [];
+ if (!this._interfaceSettings.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]