Don't crash when trying to run on a compositor without outputs
Change-Id: I164ad71f42dff1ad92576729040608016497a56a Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
This commit is contained in:
parent
1835e6ed5c
commit
7a116ac3f0
@ -216,6 +216,11 @@ void QWaylandIntegration::initialize()
|
||||
int fd = wl_display_get_fd(mDisplay->wl_display());
|
||||
QSocketNotifier *sn = new QSocketNotifier(fd, QSocketNotifier::Read, mDisplay.data());
|
||||
QObject::connect(sn, SIGNAL(activated(int)), mDisplay.data(), SLOT(flushRequests()));
|
||||
|
||||
if (mDisplay->screens().isEmpty()) {
|
||||
qWarning() << "Running on a compositor with no screens is not supported";
|
||||
::exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
QPlatformFontDatabase *QWaylandIntegration::fontDatabase() const
|
||||
|
Loading…
x
Reference in New Issue
Block a user