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
This commit is contained in:
Jonas Dreßler 2019-02-12 13:04:55 +01:00 committed by Florian Müllner
parent 8ffea9d5c5
commit 3094f86334

View File

@ -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() {