src/video/x11/SDL_x11events.c
changeset 7857 6388f5229bb7
parent 7839 d2804f8153fe
child 7885 a8bd63b33636
     1.1 --- a/src/video/x11/SDL_x11events.c	Sun Oct 20 20:41:30 2013 -0700
     1.2 +++ b/src/video/x11/SDL_x11events.c	Sun Oct 20 20:42:55 2013 -0700
     1.3 @@ -909,7 +909,7 @@
     1.4              SDL_WindowData *data = videodata->windowlist[i];
     1.5              if (data && data->pending_focus != PENDING_FOCUS_NONE) {
     1.6                  Uint32 now = SDL_GetTicks();
     1.7 -                if ( (int)(data->pending_focus_time-now) <= 0 ) {
     1.8 +                if (SDL_TICKS_PASSED(now, data->pending_focus_time)) {
     1.9                      if ( data->pending_focus == PENDING_FOCUS_IN ) {
    1.10                          X11_DispatchFocusIn(data);
    1.11                      } else {
    1.12 @@ -963,7 +963,7 @@
    1.13      if (_this->suspend_screensaver) {
    1.14          Uint32 now = SDL_GetTicks();
    1.15          if (!data->screensaver_activity ||
    1.16 -            (int) (now - data->screensaver_activity) >= 30000) {
    1.17 +            SDL_TICKS_PASSED(now, data->screensaver_activity + 30000)) {
    1.18              X11_XResetScreenSaver(data->display);
    1.19  
    1.20              #if SDL_USE_LIBDBUS