From 1409f549eed35a745b07455a384f203d309b5031 Mon Sep 17 00:00:00 2001 From: rpm-build Date: Jan 15 2021 06:11:27 +0000 Subject: 0001-layout-Make-the-hot-corner-optional.patch patch_name: 0001-layout-Make-the-hot-corner-optional.patch present_in_specfile: true location_in_specfile: 26 --- diff --git a/js/ui/layout.js b/js/ui/layout.js index 30e750d..6137d60 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