[gnome-shell] workspace: Reset idle hide timeout for overlays on reentry
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] workspace: Reset idle hide timeout for overlays on reentry
- Date: Wed, 18 Sep 2019 16:09:04 +0000 (UTC)
commit 3094f8633466c8b1cf7646b832c5cd497fc71afa
Author: Jonas Dreßler <verdre v0yd nl>
Date: Tue Feb 12 13:04:55 2019 +0100
workspace: Reset idle hide timeout for overlays on reentry
Instead of returning and waiting until the old timeout is finished,
start a new idle hide timeout for the overlay when the pointer enters a
window clone. This makes sure the timeout for hiding the overlay after
the pointer left the clone mostly stays the same (except when leaving
the clone via the title or the close button).
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/683
js/ui/workspace.js | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/workspace.js b/js/ui/workspace.js
index 4d1f651152..b80aa6c9e7 100644
--- a/js/ui/workspace.js
+++ b/js/ui/workspace.js
@@ -686,10 +686,11 @@ var WindowOverlay = class {
}
_onHideChrome() {
- if (this._idleHideOverlayId == 0) {
- this._idleHideOverlayId = GLib.timeout_add(GLib.PRIORITY_DEFAULT,
WINDOW_OVERLAY_IDLE_HIDE_TIMEOUT, this._idleHideOverlay.bind(this));
- GLib.Source.set_name_by_id(this._idleHideOverlayId, '[gnome-shell] this._idleHideOverlay');
- }
+ if (this._idleHideOverlayId == 0)
+ GLib.source_remove(this._idleHideOverlayId);
+
+ this._idleHideOverlayId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, WINDOW_OVERLAY_IDLE_HIDE_TIMEOUT,
this._idleHideOverlay.bind(this));
+ GLib.Source.set_name_by_id(this._idleHideOverlayId, '[gnome-shell] this._idleHideOverlay');
}
_idleHideOverlay() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]