I tried to start using CefDisplay::GetAllDisplays recently to detect the current monitor layout on the RHEL8.4 machine where my app is running. The list of displays appears correct immediately after application launch, but after one of my external displays (a 4k display) is disconnected, a new call to GetAllDisplays (with a new empty vector to hold the result) still reports the disconnected display. Even more strangely, when the display is reconnected, GetAllDisplays starts reporting three displays where the reconnected display is reported in the list twice. Subsequent disconnects/reconnects do not make the problem worse, but they do not resolve the phantom display entry being returned.
I added a call to GetDisplayCount and found that it too is reporting an incorrect number of displays consistent with the number returned by GetAllDisplays.
I was able to duplicate this problem by starting a thread at the end of SimpleHandler::OnAfterCreated that periodically posts a task to the UI thread which calls GetAllDisplays (or GetDisplayCount) and logs the result. Same strange behavior.
I'm currently running CEF 4896. Duplicated this issue on two different RHEL8.4 laptops.