X11: Don't redraw dialog box when mouse moves.
authorJørgen P. Tjernø <jorgen@valvesoftware.com>
Mon, 27 Jan 2014 13:43:04 -0800
changeset 8132 06922987b6ff
parent 8131 311302021bc9
child 8133 f24acf2403c0
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.
src/video/x11/SDL_x11messagebox.c
--- a/src/video/x11/SDL_x11messagebox.c	Mon Jan 27 16:13:13 2014 -0500
+++ b/src/video/x11/SDL_x11messagebox.c	Mon Jan 27 13:43:04 2014 -0800
@@ -560,7 +560,11 @@
         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;