From bb8daaeb2f1f1e0d11c0221e665dca2e892da22d Mon Sep 17 00:00:00 2001 From: Sebastian Keller Date: Thu, 22 Jul 2021 17:24:30 +0200 Subject: [PATCH] keyboard: Use microseconds for notify_keyval() ClutterVirtualInputDevice::notify_keyval() expects time to be in microseconds but Clutter::get_current_event_time() returns the time in milliseconds. On Wayland the generated event triggers all the warnings in MetaDisplay::sanity_check_timestamps() due to the event time seemingly being in the past. Part-of: --- js/ui/keyboard.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js index bc72d77f3..d0dde5b23 100644 --- a/js/ui/keyboard.js +++ b/js/ui/keyboard.js @@ -2125,12 +2125,12 @@ var KeyboardController = class { } keyvalPress(keyval) { - this._virtualDevice.notify_keyval(Clutter.get_current_event_time(), + this._virtualDevice.notify_keyval(Clutter.get_current_event_time() * 1000, keyval, Clutter.KeyState.PRESSED); } keyvalRelease(keyval) { - this._virtualDevice.notify_keyval(Clutter.get_current_event_time(), + this._virtualDevice.notify_keyval(Clutter.get_current_event_time() * 1000, keyval, Clutter.KeyState.RELEASED); } };