Don't try to reveal panel with a shortcut timeout of 0

This commit is contained in:
Charles Gagnon
2025-02-27 14:09:39 -05:00
parent 6a0fbbe12a
commit ab06e3f605
2 changed files with 7 additions and 10 deletions

View File

@@ -879,8 +879,7 @@
</key>
<key type="i" name="shortcut-timeout">
<default>2000</default>
<summary>Timeout to hide the dock, in seconds</summary>
<description>Sets the time duration before the dock is hidden again.</description>
<summary>Timeout to hide the panel after showing the overlay using the shortcut, in seconds</summary>
</key>
<key type="i" name="overlay-timeout">
<default>750</default>

View File

@@ -468,20 +468,18 @@ export const Overview = class {
// Restart the counting if the shortcut is pressed again
let hotkey_option = SETTINGS.get_string('hotkeys-overlay-combo')
let temporarily = hotkey_option === 'TEMPORARILY'
let timeout = SETTINGS.get_int(
overlayFromShortcut ? 'shortcut-timeout' : 'overlay-timeout',
)
if (hotkey_option === 'NEVER') return
if (hotkey_option === 'NEVER' || (!timeout && temporarily)) return
if (hotkey_option === 'TEMPORARILY' || overlayFromShortcut)
if (temporarily || overlayFromShortcut)
this._toggleHotkeysNumberOverlay(true)
this._panel.intellihide.revealAndHold(Intellihide.Hold.TEMPORARY)
let timeout = SETTINGS.get_int('overlay-timeout')
if (overlayFromShortcut) {
timeout = SETTINGS.get_int('shortcut-timeout')
}
// Hide the overlay/dock after the timeout
this._timeoutsHandler.add([
T2,