bug-gnubg
[Top][All Lists]
Advanced

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

[PATCH] Fix slide animation on 2D board


From: Nikolas Nyby
Subject: [PATCH] Fix slide animation on 2D board
Date: Mon, 13 May 2024 14:38:53 -0400

Restored the deprecated gdk_window_process_updates() call in
board_drag() for now, until we figure out a replacement. This
seems to address bug: https://savannah.gnu.org/bugs/?65733

Using gdk_display_sync() instead doesn't seem to quite address the
problem, as process_updates() is doing more which may be necessary for
proper display update here.
https://gitlab.gnome.org/GNOME/gtk/-/blob/gtk-3-24/gdk/gdkwindow.c#L3956
---
 gtkboard.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gtkboard.c b/gtkboard.c
index 48cecf36..780d4e19 100644
--- a/gtkboard.c
+++ b/gtkboard.c
@@ -988,9 +988,10 @@ board_drag(GtkWidget * UNUSED(widget), BoardData * bd, int 
x, int y)
     }
 #endif
 
-#if !GTK_CHECK_VERSION(3,22,0)
+    // gdk_window_process_updates is deprecated since GTK
+    // 3.22, but necessary on the 2D board for smooth
+    // animation.
     gdk_window_process_updates(gtk_widget_get_window(bd->drawing_area), FALSE);
-#endif
 
     if (s == 0)
         return;
@@ -2831,6 +2832,7 @@ board_slide_timeout(gpointer p)
             bd->drag_point = -1;
             slide_phase = 0;
             slide_move += 2;
+
 #if !GTK_CHECK_VERSION(3,22,0)
             
gdk_window_process_updates(gtk_widget_get_window(bd->drawing_area), FALSE);
 #endif
-- 
2.45.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]