Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15.2
-
None
-
macOS 11.1 and 11.2 on Intel based machines
Qt 5.15.2 binaries from https://www.qt.io/download
Description
After waking up from sleep it can happen that QGuiApplications is not emitting the signals screenAdded, screenRemoved and primaryScreenChanged anymore.
When an application ends up being in this state QGuiApplication::screens also returns a wrong number of attached screens to the system.
I added a sample application that shows the explained behaviour. It simply outputs some log via qDebug statements on different signals of QGuiApplication.
So far I only observed this issue on macOS, I can't say if other platforms are affected as well.
h3. Steps to reproduce
- Start the attached sample application on a computer/mac with multiple monitors (i.e. notebook with attached external screen).
- Put the machine to sleep.
- Wait until the machine "really" sleeps.
- Wake up computer from sleep.
- Either plugin, detach a screen (by opening/closing the notebook lid or un-/plugging the external screen) or change the primary screen in system settings.
- Expected signals from QGuiApplication are not emitted anymore (in case of attached sample application there is no output on the cli anymore).
- If the effect does not occur, repeat steps 2-4 (possibly wait longer on step 3).
After a few cycles of sleep and wakeup this issue is 100% reproducible.