This is an automated email from the git hooks/post-receive script. o l i v i e r p u s h e d a c o m m i t t o b r a n c h x f c e - 4 . 1 4 in repository xfce/xfwm4.
commit ec7158498cba0305805c64fdbe6a10810b7157fb Author: Andre Miranda <andre...@xfce.org> Date: Tue Apr 7 20:06:00 2020 +0200 Fix GTimeVal deprecation Bug: 16644 GTimeVal is deprecated, use the GDK API du jour instead. (cherry picked from commit af7db8ee2dc75c77dbd1011bdf8b970c452eca8d) --- src/display.c | 10 ++++------ src/startup_notification.c | 9 ++++----- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/display.c b/src/display.c index 40ee24f..d9cca8e 100644 --- a/src/display.c +++ b/src/display.c @@ -901,7 +901,7 @@ gboolean myDisplayTestXrender (DisplayInfo *display, gdouble min_time) { #ifdef HAVE_RENDER - GTimeVal t1, t2; + gint64 t1, t2; gdouble dt; Display *dpy; Picture picture1, picture2, picture3; @@ -971,7 +971,7 @@ myDisplayTestXrender (DisplayInfo *display, gdouble min_time) DefaultRootWindow(dpy), 1, 1, 8); - g_get_current_time (&t1); + t1 = g_get_monotonic_time (); pa.repeat = TRUE; picture1 = XRenderCreatePicture (dpy, @@ -1011,10 +1011,8 @@ myDisplayTestXrender (DisplayInfo *display, gdouble min_time) XDestroyWindow (dpy, output); - g_get_current_time (&t2); - - dt = (gdouble) (t2.tv_sec - t1.tv_sec) * G_USEC_PER_SEC + - (gdouble) (t2.tv_usec - t1.tv_usec) / 1000.0; + t2 = g_get_monotonic_time (); + dt = (gdouble) (t2 - t1) / 1000.0; if (dt < min_time) { diff --git a/src/startup_notification.c b/src/startup_notification.c index 4fc9e6a..ece84ee 100644 --- a/src/startup_notification.c +++ b/src/startup_notification.c @@ -52,7 +52,7 @@ static SnDisplay *sn_display = NULL; typedef struct { GSList *list; - GTimeVal now; + gint64 now; } CollectTimedOutData; @@ -139,9 +139,8 @@ sn_collect_timed_out_foreach (void *element, void *data) sn_startup_sequence_get_last_active_time (sequence, &l_sec, &l_usec); tv_sec = l_sec; tv_usec = l_sec; - elapsed = - ((((double) ctod->now.tv_sec - tv_sec) * G_USEC_PER_SEC + - (ctod->now.tv_usec - tv_usec))) / 1000.0; + elapsed = ((double) ctod->now - (tv_sec * G_USEC_PER_SEC) - tv_usec) + / 1000.0; if (elapsed > STARTUP_TIMEOUT) { @@ -160,7 +159,7 @@ sn_startup_sequence_timeout (void *data) g_return_val_if_fail (screen_info != NULL, FALSE); ctod.list = NULL; - g_get_current_time (&ctod.now); + ctod.now = g_get_real_time (); g_slist_foreach (screen_info->startup_sequences, sn_collect_timed_out_foreach, &ctod); tmp = ctod.list; -- To stop receiving notification emails like this one, please contact the administrator of this repository. _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits