Skip to content

Commit

Permalink
SDL_x11window.c: apply missing SDL2-to-SDL3 portage to fix build.
Browse files Browse the repository at this point in the history
  • Loading branch information
sezero committed May 30, 2023
1 parent c521e12 commit 9b147eb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/video/x11/SDL_x11window.c
Original file line number Diff line number Diff line change
Expand Up @@ -1441,7 +1441,7 @@ static void X11_SetWindowMaximized(SDL_VideoDevice *_this, SDL_Window *window, S
X11_XSync(display, False);
prev_handler = X11_XSetErrorHandler(X11_CatchAnyError);

timeout = SDL_GetTicks64() + 1000;
timeout = SDL_GetTicks() + 1000;
while (SDL_TRUE) {
caught_x11_error = SDL_FALSE;
X11_XSync(display, False);
Expand All @@ -1455,16 +1455,16 @@ static void X11_SetWindowMaximized(SDL_VideoDevice *_this, SDL_Window *window, S
}
}

if (SDL_GetTicks64() >= timeout) {
if (SDL_GetTicks() >= timeout) {
break;
}

SDL_Delay(10);
}

if (!caught_x11_error) {
SDL_SendWindowEvent(window, SDL_WINDOWEVENT_MOVED, x, y);
SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESIZED, attrs.width, attrs.height);
SDL_SendWindowEvent(window, SDL_EVENT_WINDOW_MOVED, x, y);
SDL_SendWindowEvent(window, SDL_EVENT_WINDOW_RESIZED, attrs.width, attrs.height);
}

X11_XSetErrorHandler(prev_handler);
Expand Down

0 comments on commit 9b147eb

Please sign in to comment.