mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-14 00:04:17 +09:00
Add intellihide option to disable panel reveal with the pointer
gh-2123
This commit is contained in:
@@ -116,7 +116,8 @@ export const Intellihide = class {
|
||||
)
|
||||
}
|
||||
|
||||
this._setRevealMechanism()
|
||||
if (SETTINGS.get_boolean('intellihide-use-pointer'))
|
||||
this._setRevealMechanism()
|
||||
|
||||
let lastState = SETTINGS.get_int('intellihide-persisted-state')
|
||||
|
||||
@@ -238,6 +239,7 @@ export const Intellihide = class {
|
||||
[
|
||||
SETTINGS,
|
||||
[
|
||||
'changed::intellihide-use-pointer',
|
||||
'changed::intellihide-use-pressure',
|
||||
'changed::intellihide-hide-from-windows',
|
||||
'changed::intellihide-hide-from-monitor-windows',
|
||||
@@ -307,7 +309,10 @@ export const Intellihide = class {
|
||||
}
|
||||
|
||||
_removeRevealMechanism() {
|
||||
PointerWatcher.getPointerWatcher()._removeWatch(this._pointerWatch)
|
||||
if (this._pointerWatch) {
|
||||
PointerWatcher.getPointerWatcher()._removeWatch(this._pointerWatch)
|
||||
this._pointerWatch = 0
|
||||
}
|
||||
|
||||
if (this._pressureBarrier) {
|
||||
this._pressureBarrier.destroy()
|
||||
|
||||
27
src/prefs.js
27
src/prefs.js
@@ -1592,6 +1592,25 @@ const Preferences = class {
|
||||
Gio.SettingsBindFlags.DEFAULT,
|
||||
)
|
||||
|
||||
this._settings.bind(
|
||||
'intellihide-use-pointer',
|
||||
this._builder.get_object('intellihide_use_pointer_switch'),
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT,
|
||||
)
|
||||
|
||||
this._settings.connect('changed::intellihide-use-pointer', () => {
|
||||
if (!this._settings.get_boolean('intellihide-use-pointer'))
|
||||
this._settings.set_boolean('intellihide-use-pressure', false)
|
||||
})
|
||||
|
||||
this._settings.bind(
|
||||
'intellihide-use-pointer',
|
||||
this._builder.get_object('intellihide_use_pressure_options'),
|
||||
'sensitive',
|
||||
Gio.SettingsBindFlags.DEFAULT,
|
||||
)
|
||||
|
||||
this._settings.bind(
|
||||
'intellihide-use-pressure',
|
||||
this._builder.get_object('intellihide_use_pressure_switch'),
|
||||
@@ -1601,14 +1620,14 @@ const Preferences = class {
|
||||
|
||||
this._settings.bind(
|
||||
'intellihide-use-pressure',
|
||||
this._builder.get_object('intellihide_use_pressure_options'),
|
||||
this._builder.get_object('intellihide_use_pressure_options2'),
|
||||
'sensitive',
|
||||
Gio.SettingsBindFlags.DEFAULT,
|
||||
)
|
||||
|
||||
this._settings.bind(
|
||||
'intellihide-use-pressure',
|
||||
this._builder.get_object('intellihide_use_pressure_options2'),
|
||||
this._builder.get_object('intellihide_use_pressure_options3'),
|
||||
'sensitive',
|
||||
Gio.SettingsBindFlags.DEFAULT,
|
||||
)
|
||||
@@ -1766,6 +1785,10 @@ const Preferences = class {
|
||||
'intellihide-behaviour',
|
||||
this._settings.get_default_value('intellihide-behaviour'),
|
||||
)
|
||||
this._settings.set_value(
|
||||
'intellihide-use-pointer',
|
||||
this._settings.get_default_value('intellihide-use-pointer'),
|
||||
)
|
||||
this._settings.set_value(
|
||||
'intellihide-use-pressure',
|
||||
this._settings.get_default_value('intellihide-use-pressure'),
|
||||
|
||||
Reference in New Issue
Block a user