[Xfce4-commits] <xfce4-weather-plugin:master> Summary window: Delay clock update a bit to avoid jerkiness (bug #9933).

Harald Judt noreply at xfce.org
Thu Mar 21 14:28:01 CET 2013


Updating branch refs/heads/master
         to 72fdfaec8c9b4c65af6ec9123d7ef910df755f99 (commit)
       from 0b1c2da51ce14962bca36bff174d332c29148e43 (commit)

commit 72fdfaec8c9b4c65af6ec9123d7ef910df755f99
Author: Harald Judt <h.judt at gmx.at>
Date:   Thu Mar 21 14:17:44 2013 +0100

    Summary window: Delay clock update a bit to avoid jerkiness (bug #9933).
    
    For whatever reason, on some machines the clock seems not to update in
    appropriate regular intervals which results in updates that seem to be
    2 seconds apart. Surprisingly, adding a small delay of 10ms seems to solve
    this. While this is a strange solution, it is also easy and effective,
    so let's simply do it this way.

 panel-plugin/weather-summary.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/panel-plugin/weather-summary.c b/panel-plugin/weather-summary.c
index 15cf546..641d077 100644
--- a/panel-plugin/weather-summary.c
+++ b/panel-plugin/weather-summary.c
@@ -1017,10 +1017,10 @@ update_summary_subtitle(plugin_data *data)
     now_ms = ((gint64) now.tv_sec * 1000) + ((gint64) now.tv_usec / 1000);
 #ifdef HAVE_UPOWER_GLIB
     if (data->upower_on_battery || data->upower_lid_closed)
-        update_interval = 60000 - (now_ms % 60000) + 1;
+        update_interval = 60000 - (now_ms % 60000) + 10;
     else
 #endif
-        update_interval = 1000 - (now_ms % 1000) + 1;
+        update_interval = 1000 - (now_ms % 1000) + 10;
     data->summary_update_timer =
         g_timeout_add(update_interval, (GSourceFunc) update_summary_subtitle,
                       data);


More information about the Xfce4-commits mailing list