Redraw the windows frame from WM_SIZE and keep its style

The refresh callback is triggered by WM_PAINT, but windows does not send it
while a border is dragged: the window class has neither CS_HREDRAW nor
CS_VREDRAW and nothing invalidates the client area. Only WM_SIZE arrives, so
nothing was drawn during such a resize. The frame is drawn from WM_SIZE now,
after forwarding the message to GLFW so that the new size is already in.

WM_NCHITTEST re-applies the style bits the engine frame needs and which GLFW
drops on every window mode change, taking the drag area with them. Every frame
setup logs whether the subclass had to be installed again, so a lost window
procedure is visible in the log.

The live resize switch is honoured by the GLFW backend as well: with it off the
frame from the message loop is skipped and the window keeps showing what the
system stretches.
This commit is contained in:
alexei-zebra 2026-10-11 01:05:47 +03:00
parent 4f9b125e17
commit 4d1b4a1638
No known key found for this signature in database
GPG key ID: D19D450AC3D9A80E
5 changed files with 100 additions and 25 deletions

View file

@ -121,7 +121,7 @@ settings.Microphone access=Доступ к микрофону
settings.Narrow Window Bar=Узкая шапка окна
settings.Live Window Resize=Живой ресайз окна
settings.display.compact-window-bar.tooltip=Шапка окна высотой 24 px вместо 48 px
settings.display.live-resize.tooltip=Перерисовывать содержимое окна при изменении размера (выключено — последний кадр растягивается)
settings.display.live-resize.tooltip=Перерисовывать окно при изменении размера (выключено — показывать последний кадр)
# Управление
chunks.reload=Перезагрузить Чанки