-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SDL 3.2.4 - Linux 64bit X11] SDL_SetWindowPosition failure #12220
Milestone
Comments
Lines 1101 to 1103 in 5d1bbd9
|
I have now changed it, but the problem still exists. // gcc main.c -o main -lSDL3
#include <SDL3/SDL.h>
int main(int argc, char *argv[])
{
int quit = 0;
// SDL_Window *win = SDL_CreateWindow("SDL3 Window", 640, 480, SDL_WINDOW_RESIZABLE | SDL_WINDOW_HIDDEN);
// SDL_Renderer *renderer = SDL_CreateRenderer(win, NULL);
SDL_Window *win;
SDL_Renderer *renderer;
SDL_CreateWindowAndRenderer("SDL3 Window", 640, 480, SDL_WINDOW_RESIZABLE | SDL_WINDOW_HIDDEN, &win, &renderer);
SDL_SetWindowPosition(win, 500, 500);
SDL_ShowWindow(win);
SDL_Log("Version: %s", SDL_GetRevision());
while (!quit) {
SDL_Event ev;
while (SDL_PollEvent(&ev) != 0) {
switch(ev.type) {
case SDL_EVENT_QUIT:
quit = 1;
break;
}
}
SDL_SetRenderDrawColor(renderer, 200, 200, 0, 255);
SDL_RenderClear(renderer);
SDL_RenderPresent(renderer);
}
SDL_DestroyRenderer(renderer);
SDL_DestroyWindow(win);
SDL_Quit();
return 0;
}
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the following test program, the window pops up briefly at the default location before jumping to the position specified with
SDL_SetWindowPosition
. I only added the delay as a test to see if that was the cause.The text was updated successfully, but these errors were encountered: