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
This commit is contained in:
parent
df7fea3407
commit
8853408748
@ -38,6 +38,14 @@
|
|||||||
load all extensions regardless of the versions they claim to support.
|
load all extensions regardless of the versions they claim to support.
|
||||||
</description>
|
</description>
|
||||||
</key>
|
</key>
|
||||||
|
<key name="enable-hot-corners" type="b">
|
||||||
|
<default>false</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">
|
<key name="favorite-apps" type="as">
|
||||||
<default>[ 'epiphany.desktop', 'evolution.desktop', 'rhythmbox.desktop', 'shotwell.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Software.desktop' ]</default>
|
<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>
|
<summary>List of desktop file IDs for favorite applications</summary>
|
||||||
|
@ -267,6 +267,9 @@ var LayoutManager = GObject.registerClass({
|
|||||||
this._backgroundGroup.lower_bottom();
|
this._backgroundGroup.lower_bottom();
|
||||||
this._bgManagers = [];
|
this._bgManagers = [];
|
||||||
|
|
||||||
|
global.settings.connect('changed::enable-hot-corners',
|
||||||
|
this._updateHotCorners.bind(this));
|
||||||
|
|
||||||
// Need to update struts on new workspaces when they are added
|
// Need to update struts on new workspaces when they are added
|
||||||
let workspaceManager = global.workspace_manager;
|
let workspaceManager = global.workspace_manager;
|
||||||
workspaceManager.connect('notify::n-workspaces',
|
workspaceManager.connect('notify::n-workspaces',
|
||||||
@ -370,6 +373,11 @@ var LayoutManager = GObject.registerClass({
|
|||||||
});
|
});
|
||||||
this.hotCorners = [];
|
this.hotCorners = [];
|
||||||
|
|
||||||
|
if (!global.settings.get_boolean('enable-hot-corners')) {
|
||||||
|
this.emit('hot-corners-changed');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let size = this.panelBox.height;
|
let size = this.panelBox.height;
|
||||||
|
|
||||||
// build new hot corners
|
// build new hot corners
|
||||||
|
Loading…
Reference in New Issue
Block a user