summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@digia.com>2015-03-02 10:48:21 +0100
committerShawn Rutledge <shawn.rutledge@digia.com>2015-03-06 19:54:46 +0000
commit51ada7734ad780178ecced11e0dff454dfc2e5f2 (patch)
tree4a56f0635c100f5053fd9ddf36b0e2cb5150dcea /src/gui
parentd7401c32c5eb514da639753d939fafabd9d3492f (diff)
xcb: do not create a dummy QScreen when there are no outputs
Whenever a QWindow is associated with a QScreen, the screen is expected to be a real working one, so that rendering continues to be possible. This partially reverts 52f5e50f11a3ba82e32dc2efc656e4021a3fa4f5 [ChangeLog][QPA][Xcb] If all QScreens (xcb outputs) are disconnected while an application is running, QGuiApplication::primaryScreen() will return null until a screen is connected again. Task-number: QTBUG-40174 Task-number: QTBUG-42985 Change-Id: Id1b29dd70eaf3f2e7fd477516ce7e2bf24e095f6 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qguiapplication.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 243ef70efc..8c49b3a2b5 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -873,9 +873,14 @@ QWindowList QGuiApplication::topLevelWindows()
}
/*!
- Returns the primary (or default) screen of the application.
+ Returns the primary (or default) screen of the application, or null if there is none
This will be the screen where QWindows are initially shown, unless otherwise specified.
+
+ On some platforms, it may be null when there are actually no screens connected.
+ It is not possible to start a new QGuiApplication while there are no screens.
+ Applications which were running at the time the primary screen was removed
+ will stop rendering graphics until one or more screens are restored.
*/
QScreen *QGuiApplication::primaryScreen()
{