[gnome-shell/gnome-3-34] switcherPopup: Use roundtrip time when the popup is modifier-less
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gnome-3-34] switcherPopup: Use roundtrip time when the popup is modifier-less
- Date: Sat, 23 Nov 2019 00:00:39 +0000 (UTC)
commit a6e4ef862c6a314c8028dcc59dd2e0881eebc988
Author: Jonas Dreßler <verdre v0yd nl>
Date: Fri Nov 22 20:56:30 2019 +0100
switcherPopup: Use roundtrip time when the popup is modifier-less
The noModsTimeout obviously finishes inside a timeout callback, which
means `global.get_current_time()` might return Clutter.CURRENT_TIME (ie.
0) when called inside it, because it's not called while handling an
event. This means when switching apps or activating a window, the
timestamp passed to `activate_window` may be 0, which is the reason why
the altTab switcher is currently broken when using modifier-less
keybindings.
Fix that by using `meta_display_get_current_time_roundtrip`, which
always return a valid timestamp, instead of
`shell_global_get_current_time`.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/847
js/ui/switcherPopup.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/js/ui/switcherPopup.js b/js/ui/switcherPopup.js
index 9bb690c6eb..c956eea435 100644
--- a/js/ui/switcherPopup.js
+++ b/js/ui/switcherPopup.js
@@ -270,7 +270,7 @@ var SwitcherPopup = GObject.registerClass({
GLib.PRIORITY_DEFAULT,
NO_MODS_TIMEOUT,
() => {
- this._finish(global.get_current_time());
+ this._finish(global.display.get_current_time_roundtrip());
this._noModsTimeoutId = 0;
return GLib.SOURCE_REMOVE;
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]