You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rversteegen opened this issue
Jan 19, 2021
· 1 comment
Labels
bugYeah... that's brokencontrolsKeyboard, mouse and joystick/gamepad input/controlsgfx_sdl2Specific to the SDL 2 graphics/IO backendos: unixSpecific to Linux/BSD/etc. Possibly also Mac and Android.
On Linux/KDE/X11 I've noticed that sometimes when I resize the window by dragging the corner gfx_sdl2 doesn't seem to tell the engine about the final window resize event (as if there's some lag while dragging and the last part of the drag gets lost), so it continues to draw a frame of the old size, which is somewhat off. This can result in black bars at the right and bottom of the window, and the mouse position gets miscalculated in get_image_origin_and_ratio. I haven't seen this happen on Windows.
The text was updated successfully, but these errors were encountered:
rversteegen
added
bug
Yeah... that's broken
os: unix
Specific to Linux/BSD/etc. Possibly also Mac and Android.
controls
Keyboard, mouse and joystick/gamepad input/controls
gfx_sdl2
Specific to the SDL 2 graphics/IO backend
labels
Jan 19, 2021
rversteegen
changed the title
Linux gfx_sdl2: some window resizes lost, so doesn't draw over whole window & wrong mouse position
gfx_sdl2/KDE: some window resizes lost, so doesn't draw over whole window & wrong mouse position
Sep 25, 2021
This doesn't happen under xfce4. I was running KDE 4 at the time, but my distro has since upgraded to KDE 5, and it's still happening on that, including under latest SDL git.
Through trial and error, after comparing with a simple test program that didn't suffer this problem, I figured out that the problem is calling SDL_SetWindowSize while the user is resizing the window. I'm fixed this by skipping the SDL_SetWindowSize in that case.
This bug sounds like the same thing as another bug I noticed in gfx_sdl/sdl2 (under at least xfce4), where if the user is resizing the window (or at least has the mouse button held down on the window frame) at the moment the engine tries to resize the window (e.g. on starting a game) then it doesn't resize properly. But that doesn't happen if the window isn't resizable either before or after the forced-resize, so it's very minor and I'll ignore it.
bugYeah... that's brokencontrolsKeyboard, mouse and joystick/gamepad input/controlsgfx_sdl2Specific to the SDL 2 graphics/IO backendos: unixSpecific to Linux/BSD/etc. Possibly also Mac and Android.
On Linux/KDE/X11 I've noticed that sometimes when I resize the window by dragging the corner gfx_sdl2 doesn't seem to tell the engine about the final window resize event (as if there's some lag while dragging and the last part of the drag gets lost), so it continues to draw a frame of the old size, which is somewhat off. This can result in black bars at the right and bottom of the window, and the mouse position gets miscalculated in
get_image_origin_and_ratio
. I haven't seen this happen on Windows.The text was updated successfully, but these errors were encountered: