Commit 2efa2dc227fe0c55e4a327b44aea21127d13c41c

J?rgen P. Tjern? 2014-01-27T13:43:04

X11: Don't redraw dialog box when mouse moves. This fixes bug #2343. (https://bugzilla.libsdl.org/show_bug.cgi?id=2343) Thanks to Melker Narikka for the patch.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/src/video/x11/SDL_x11messagebox.c b/src/video/x11/SDL_x11messagebox.c
index a3dcc65..7d0cb25 100644
--- a/src/video/x11/SDL_x11messagebox.c
+++ b/src/video/x11/SDL_x11messagebox.c
@@ -560,7 +560,11 @@ X11_MessageBoxLoop( SDL_MessageBoxDataX11 *data )
         case MotionNotify:
             if ( has_focus ) {
                 /* Mouse moved... */
+                int previndex = data->mouse_over_index;
                 data->mouse_over_index = GetHitButtonIndex( data, e.xbutton.x, e.xbutton.y );
+                if (data->mouse_over_index == previndex) {
+                    draw = SDL_FALSE;
+                }
             }
             break;