[gtk/wip/high-res-server-time-really-isnt-system-time] x11: Pass display_x11 where needed



commit 31f279d7905c33c4ce3b98aa18f47a13ed65a31d
Author: Jonas Ådahl <jadahl gmail com>
Date:   Sun Jul 12 12:12:03 2020 +0200

    x11: Pass display_x11 where needed

 gdk/x11/gdkdisplay-x11.c | 10 ++++++----
 1 file 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;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]