src/video/x11/SDL_x11modes.c
changeset 9319 ad4f430cc9f5
parent 9167 3d2c0f659ad3
child 9619 b94b6d0bff0f
     1.1 --- a/src/video/x11/SDL_x11modes.c	Mon Jan 26 22:27:27 2015 +0100
     1.2 +++ b/src/video/x11/SDL_x11modes.c	Mon Jan 26 17:46:39 2015 -0500
     1.3 @@ -24,6 +24,7 @@
     1.4  
     1.5  #include "SDL_hints.h"
     1.6  #include "SDL_x11video.h"
     1.7 +#include "SDL_timer.h"
     1.8  #include "edid.h"
     1.9  
    1.10  /* #define X11MODES_DEBUG */
    1.11 @@ -813,10 +814,13 @@
    1.12  int
    1.13  X11_SetDisplayMode(_THIS, SDL_VideoDisplay * sdl_display, SDL_DisplayMode * mode)
    1.14  {
    1.15 -    Display *display = ((SDL_VideoData *) _this->driverdata)->display;
    1.16 +    SDL_VideoData *viddata = (SDL_VideoData *) _this->driverdata;
    1.17 +    Display *display = viddata->display;
    1.18      SDL_DisplayData *data = (SDL_DisplayData *) sdl_display->driverdata;
    1.19      SDL_DisplayModeData *modedata = (SDL_DisplayModeData *)mode->driverdata;
    1.20  
    1.21 +    viddata->last_mode_change_deadline = SDL_GetTicks() + (PENDING_FOCUS_TIME * 2);
    1.22 +
    1.23  #if SDL_VIDEO_DRIVER_X11_XRANDR
    1.24      if (data->use_xrandr) {
    1.25          XRRScreenResources *res;