Skip to content

Commit 01d128a

Browse files
committed
SDL: fixed an issue with window resizing #144
1 parent ffc6b35 commit 01d128a

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

ChangeLog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2023-01-20 (12.26)
2+
SDL: Fixed an issue with window resizing #144
3+
14
2023-01-20 (12.26)
25
COMMON: Fixed DIM lower bound
36
COMMON: RGB and RGBF now clamp parameters

src/platform/sdl/runtime.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -533,14 +533,19 @@ void Runtime::pollEvents(bool blocking) {
533533
case SDL_WINDOWEVENT_FOCUS_GAINED:
534534
break;
535535
case SDL_WINDOWEVENT_RESIZED:
536+
case SDL_WINDOWEVENT_SIZE_CHANGED:
536537
onResize(ev.window.data1, ev.window.data2);
537538
break;
538539
case SDL_WINDOWEVENT_EXPOSED:
540+
case SDL_WINDOWEVENT_SHOWN:
539541
_graphics->redraw();
540542
break;
541543
case SDL_WINDOWEVENT_LEAVE:
542544
_output->removeHover();
543545
break;
546+
default:
547+
trace("Unhandled window event [%d]", ev.window.event);
548+
break;
544549
}
545550
break;
546551
case SDL_DROPFILE:
@@ -611,8 +616,6 @@ void Runtime::setWindowRect(int x, int y, int width, int height) {
611616
logEntered();
612617
if (width > 0 && height > 0) {
613618
SDL_SetWindowSize(_window, width, height);
614-
_graphics->resize(width, height);
615-
resize();
616619
}
617620
if (x > 0 && y > 0) {
618621
SDL_SetWindowPosition(_window, x, y);

0 commit comments

Comments
 (0)