]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Our handling of timers in Gtk was truncating times on 64-bit systems; one
authorJacob Nevins <jacobn@chiark.greenend.org.uk>
Sat, 23 Jan 2010 12:25:31 +0000 (12:25 +0000)
committerJacob Nevins <jacobn@chiark.greenend.org.uk>
Sat, 23 Jan 2010 12:25:31 +0000 (12:25 +0000)
symptom was that the terminal window would not update until a focus-change
event. Spotted and patched by Max Kellermann.

[originally from svn r8854]

unix/gtkwin.c

index ff6e80c84b65be62991419ea09c2c47c42067fb9..2fbe4b735cf8a44df6dfca542bda8a65794070f8 100644 (file)
@@ -1291,14 +1291,14 @@ void notify_remote_exit(void *frontend)
 
 static gint timer_trigger(gpointer data)
 {
-    long now = GPOINTER_TO_INT(data);
+    long now = GPOINTER_TO_SIZE(data);
     long next;
     long ticks;
 
     if (run_timers(now, &next)) {
        ticks = next - GETTICKCOUNT();
        timer_id = gtk_timeout_add(ticks > 0 ? ticks : 1, timer_trigger,
-                                  GINT_TO_POINTER(next));
+                                  GSIZE_TO_POINTER(next));
     }
 
     /*