I’m creating an SDL2 window like this:
SDL_Window* win = SDL_CreateWindow("SDL Table", 0, 0, // top-left of screen 1950, 700, // width and height SDL_WINDOW_SHOWN);I expect the window to start at the top-left corner of the screen, but I always get a small gap/margin at the top.
I’ve tried:
SDL_WINDOW_BORDERLESSSDL_SetWindowPosition(win, 0, 0)but the gap remains. I’m running on Ubuntu 24.04 with GNOME / Wayland.
Questions:
Why does SDL2 not allow the window to touch the very top of the screen?
Is this caused by window decorations, compositor, or SDL itself?
What is the recommended way to remove this top margin while keeping a fixed 1950×700 window size?