diff options
author | Jonas Ådahl <jadahl@gmail.com> | 2020-07-12 12:12:03 +0200 |
---|---|---|
committer | Jonas Ådahl <jadahl@gmail.com> | 2020-07-12 12:12:03 +0200 |
commit | 31f279d7905c33c4ce3b98aa18f47a13ed65a31d (patch) | |
tree | ff15ccbc20e2383a67b5b9388b77748973217a9d | |
parent | 777c1faaf9e1400b668ec002f987dddcc0efd07b (diff) | |
download | gtk+-wip/high-res-server-time-really-isnt-system-time.tar.gz |
x11: Pass display_x11 where neededwip/high-res-server-time-really-isnt-system-time
-rw-r--r-- | gdk/x11/gdkdisplay-x11.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c index 2f8801f705..2d464c4120 100644 --- a/gdk/x11/gdkdisplay-x11.c +++ b/gdk/x11/gdkdisplay-x11.c @@ -1306,7 +1306,8 @@ get_high_res_server_time (void) } static void -compute_server_time_offset_from_monotonic_time (gint64 high_res_time) +compute_server_time_offset_from_monotonic_time (GdkX11Display *display_x11, + gint64 high_res_time) { gint64 now, offset_candidate_1, offset_candidate_2; @@ -1336,7 +1337,8 @@ compute_server_time_offset_from_round_trip (GdkX11Display *display_x11) if (ABS (remote_high_res_time - local_high_res_time) < (1 * G_USEC_PER_SEC)) { display_x11->server_time_uses_monotonic_time = TRUE; - compute_server_time_offset_from_monotonic_time (); + compute_server_time_offset_from_monotonic_time (display_x11, + remote_high_res_time); return; } @@ -1371,9 +1373,9 @@ server_time_to_monotonic_time (GdkX11Display *display_x11, gint64 server_time) { if (display_x11->server_time_uses_monotonic_time) - compute_server_time_offset_from_monotonic_time (server_time); + compute_server_time_offset_from_monotonic_time (display_x11, server_time); else if (server_time_offset_is_stale (display_x11, server_time)) - compute_server_time_offset_from_round_trip (); + compute_server_time_offset_from_round_trip (display_x11); return server_time - display_x11->server_time_offset; } |