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
Currently, Anvil's main loop uses the Windows command GetMessage() to dispatch messages to the window procedure, and intercepts the WM_PAINT message to draw.
This is not the intended use of WM_PAINT, which is meant to be used for the Windows GDI with the ValidateRect() and InvalidateRect() calls to update the client's area back when Windows was still using a stacking window manager.
The only reason this works properly right now is because Anvil does not properly handle the WM_PAINT call, which forces Windows to send it to the app window over-and-over again in hopes that the app will eventually paint its window properly.
Anvil's loop should likely switch to a message pump that looks kind-of like this (Except I would put the check for WM_QUIT in the while(PeekMessage(...)) loop)
And WM_PAINT should probably just be ignored and passed off to the default window procedure (which will just validate the entire client area, stopping future WM_PAINT messages)
The text was updated successfully, but these errors were encountered:
Thanks for spotting this. I will be modifying related logic in the coming weeks, so this issue should hopefully be addressed fairly quickly (though changes they will make it to the public repo this week are very scarce).
Currently, Anvil's main loop uses the Windows command
GetMessage()
to dispatch messages to the window procedure, and intercepts theWM_PAINT
message to draw.This is not the intended use of
WM_PAINT
, which is meant to be used for the Windows GDI with theValidateRect()
andInvalidateRect()
calls to update the client's area back when Windows was still using a stacking window manager.The only reason this works properly right now is because Anvil does not properly handle the
WM_PAINT
call, which forces Windows to send it to the app window over-and-over again in hopes that the app will eventually paint its window properly.Anvil's loop should likely switch to a message pump that looks kind-of like this (Except I would put the check for
WM_QUIT
in thewhile(PeekMessage(...))
loop)And
WM_PAINT
should probably just be ignored and passed off to the default window procedure (which will just validate the entire client area, stopping future WM_PAINT messages)The text was updated successfully, but these errors were encountered: