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: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1926>
This commit is contained in:
parent
8edd6aef64
commit
bb8daaeb2f
@ -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);
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user