[mutter/wip/wayland-work: 21/25] wayland: use the timestamps from events
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/wayland-work: 21/25] wayland: use the timestamps from events
- Date: Thu, 5 Sep 2013 08:42:56 +0000 (UTC)
commit cd36da2c66453c98f987a5c5f71063da33da9581
Author: Giovanni Campagna <gcampagn redhat com>
Date: Wed Sep 4 15:23:11 2013 +0200
wayland: use the timestamps from events
Clutter has learned to use monotonic times for the events, and
so does X (at least Xwayland, which is an implementation we know
and we can rely upon), so the values are directly comparable.
https://bugzilla.gnome.org/show_bug.cgi?id=707466
src/wayland/meta-wayland-keyboard.c | 4 +---
src/wayland/meta-wayland.c | 7 +------
2 files changed, 2 insertions(+), 9 deletions(-)
---
diff --git a/src/wayland/meta-wayland-keyboard.c b/src/wayland/meta-wayland-keyboard.c
index 34ce390..4f7056f 100644
--- a/src/wayland/meta-wayland-keyboard.c
+++ b/src/wayland/meta-wayland-keyboard.c
@@ -446,9 +446,7 @@ process_keybinding (MetaWaylandKeyboard *keyboard,
memcpy (&device_event, &generic_event, sizeof (XGenericEvent));
- /* Can't use clutter_event_get_time() here, because evdev timestamps
- have nothing to do with X timestamps */
- device_event.time = meta_display_get_current_time_roundtrip (display);
+ device_event.time = clutter_event_get_time (event);
device_event.deviceid = clutter_event_get_device_id (event);
device_event.sourceid = 0; /* not used, not sure what this should be */
device_event.detail = clutter_event_get_key_code (event);
diff --git a/src/wayland/meta-wayland.c b/src/wayland/meta-wayland.c
index e95250d..88dc758 100644
--- a/src/wayland/meta-wayland.c
+++ b/src/wayland/meta-wayland.c
@@ -695,12 +695,7 @@ event_cb (ClutterActor *stage,
if (surface && surface->window &&
surface->window->client_type == META_WINDOW_CLIENT_TYPE_WAYLAND)
- {
- MetaDisplay *display = meta_get_display ();
- guint32 timestamp = meta_display_get_current_time_roundtrip (display);
-
- meta_window_focus (surface->window, timestamp);
- }
+ meta_window_focus (surface->window, clutter_event_get_time (event));
}
if (seat->cursor_tracker)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]