Browse Source

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.
J?rgen P. Tjern? 11 years ago
parent
commit
2efa2dc227
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/video/x11/SDL_x11messagebox.c

+ 4 - 0
src/video/x11/SDL_x11messagebox.c

@@ -560,7 +560,11 @@ X11_MessageBoxLoop( SDL_MessageBoxDataX11 *data )
         case MotionNotify:
         case MotionNotify:
             if ( has_focus ) {
             if ( has_focus ) {
                 /* Mouse moved... */
                 /* Mouse moved... */
+                int previndex = data->mouse_over_index;
                 data->mouse_over_index = GetHitButtonIndex( data, e.xbutton.x, e.xbutton.y );
                 data->mouse_over_index = GetHitButtonIndex( data, e.xbutton.x, e.xbutton.y );
+                if (data->mouse_over_index == previndex) {
+                    draw = SDL_FALSE;
+                }
             }
             }
             break;
             break;