5 ms·
I'll explain it: In the olden Windows days, the application is in charge of painting its titlebar by handling the WM_NCPAINT message. The default window handler
by Jasper_ 8y ago
I'll explain it: In the olden Windows days, the application is in charge of painting its titlebar by handling the WM_NCPAINT message. The default window handler for this will paint the Windows Vista-era buttons.
During Windows 7's development, the responsibility of painting window frames moved from the application to a separate process known as the Desktop Window Manager, "dwm.exe". DWM tells the app that it should stop drawing its own frame when the application is windowed, and tells it is in charge of drawing "the frame" when fullscreen.
This is communicated using an asynchronous protocol (private window messages), thus during the transition it's possible for the window's idea of its frame state to be "out of sync" with the real state because the client hasn't processed all of its messages yet.
- richard_todd 8y agoWow, it's great to be able to finally connect the dots on that one, so thanks for the explanation. I guess either there is a subtle reason why it would be a bad idea to update the old-style handler, or they just never got around to it. Either way, I'm just glad the titlebar isn't being drawn twice at all times.