Added XFlush() so changes happen immediately instead of waiting for the next event loop.
authorSam Lantinga
Wed, 19 Jan 2011 10:14:11 -0800
changeset 50315e3291605ad0
parent 5030 6a0803e47c7b
child 5032 6ccfbaef0c0a
Added XFlush() so changes happen immediately instead of waiting for the next event loop.
src/video/x11/SDL_x11window.c
     1.1 --- a/src/video/x11/SDL_x11window.c	Wed Jan 19 00:07:43 2011 -0800
     1.2 +++ b/src/video/x11/SDL_x11window.c	Wed Jan 19 10:14:11 2011 -0800
     1.3 @@ -746,6 +746,8 @@
     1.4      }
     1.5  #endif
     1.6  
     1.7 +    XFlush(display);
     1.8 +
     1.9      return 0;
    1.10  }
    1.11  
    1.12 @@ -858,6 +860,7 @@
    1.13          }
    1.14  #endif
    1.15      }
    1.16 +    XFlush(display);
    1.17  }
    1.18  
    1.19  void
    1.20 @@ -906,6 +909,7 @@
    1.21      } else {
    1.22          XDeleteProperty(display, data->xwindow, _NET_WM_ICON);
    1.23      }
    1.24 +    XFlush(display);
    1.25  }
    1.26  
    1.27  void
    1.28 @@ -934,6 +938,7 @@
    1.29          y = window->y;
    1.30      }
    1.31      XMoveWindow(display, data->xwindow, x, y);
    1.32 +    XFlush(display);
    1.33  }
    1.34  
    1.35  void
    1.36 @@ -945,6 +950,7 @@
    1.37      if (SDL_IsShapedWindow(window))
    1.38          X11_ResizeWindowShape(window);
    1.39      XResizeWindow(display, data->xwindow, window->w, window->h);
    1.40 +    XFlush(display);
    1.41  }
    1.42  
    1.43  void
    1.44 @@ -954,6 +960,7 @@
    1.45      Display *display = data->videodata->display;
    1.46  
    1.47      XMapRaised(display, data->xwindow);
    1.48 +    XFlush(display);
    1.49  }
    1.50  
    1.51  void
    1.52 @@ -963,6 +970,7 @@
    1.53      Display *display = data->videodata->display;
    1.54  
    1.55      XUnmapWindow(display, data->xwindow);
    1.56 +    XFlush(display);
    1.57  }
    1.58  
    1.59  void
    1.60 @@ -972,6 +980,7 @@
    1.61      Display *display = data->videodata->display;
    1.62  
    1.63      XRaiseWindow(display, data->xwindow);
    1.64 +    XFlush(display);
    1.65  }
    1.66  
    1.67  static void
    1.68 @@ -1020,6 +1029,7 @@
    1.69              XDeleteProperty(display, data->xwindow, _NET_WM_STATE);
    1.70          }
    1.71      }
    1.72 +    XFlush(display);
    1.73  }
    1.74  
    1.75  void
    1.76 @@ -1037,6 +1047,7 @@
    1.77      Display *display = data->videodata->display;
    1.78   
    1.79      XIconifyWindow(display, data->xwindow, displaydata->screen);
    1.80 +    XFlush(display);
    1.81  }
    1.82  
    1.83  void
    1.84 @@ -1111,6 +1122,7 @@
    1.85  #endif
    1.86          if (data->created) {
    1.87              XDestroyWindow(display, data->xwindow);
    1.88 +            XFlush(display);
    1.89          }
    1.90          SDL_free(data);
    1.91      }