Page 1 of 1

cef139 Windows 11 white screen

PostPosted: Fri Sep 12, 2025 2:40 am
by levili
Has anyone encountered the following problem? How can I fix it?

In our project, on the Windows 11 system, calling hide() and then show() can sometimes result in a blank screen. This issue has not been encountered on Windows 10. Switching windows using alt+tab or resizing the window will restore the display.

The most common triggering paths are:
1. Pinning the CEF window to the taskbar
2. Completely covering the CEF window with another window
3. Calling hide() and then show()

It can also be easily reproduced in the Standard Distribution cefclient project.

Re: cef139 Windows 11 white screen

PostPosted: Fri Sep 12, 2025 4:40 pm
by ndesktop
Looks like some form of invalidating is needed. I won't say something like InvalidateRect/InvalidateRgn on the host HWND (it might not even work) but it might be a good idea at least to test if this is a fix. Alt-Tab or resize does this.
Running this with Spy++ attached and filtering the messages (WM_PAINT, WM_NCPAINT, WM_SETREDRAW etc.) might reveal what hide/show does not and what alt-tab does.