mirror of
https://github.com/quickshell-mirror/quickshell.git
synced 2026-10-27 02:54:36 +00:00
wayland: check screen isPlaceholder and if wl_output is null
Fixes crashes on disconnected monitors
This commit is contained in:
1 parent
e7cd1e9982
commit
158db16b93
3 files changed
+4
-3
No files matched your search
@@ -46,6 +46,7 @@ set shell id.
|
||||
- Fixed asynchronous loaders not working before window creation.
|
||||
- Fixed memory leak in IPC handlers.
|
||||
- Fixed ClippingRectangle related crashes.
|
||||
- Fixed crashes when monitors are unplugged.
|
||||
|
||||
## Packaging Changes
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ QSWaylandSessionLockSurface::QSWaylandSessionLockSurface(QtWaylandClient::QWayla
|
||||
wl_output* output = nullptr; // NOLINT (include)
|
||||
auto* waylandScreen = dynamic_cast<QtWaylandClient::QWaylandScreen*>(qwindow->screen()->handle());
|
||||
|
||||
if (waylandScreen != nullptr) {
|
||||
if (waylandScreen != nullptr && !waylandScreen->isPlaceholder() && waylandScreen->output()) {
|
||||
output = waylandScreen->output();
|
||||
} else {
|
||||
qFatal() << "Session lock screen does not corrospond to a real screen. Force closing window";
|
||||
|
||||
@@ -143,11 +143,11 @@ LayerSurface::LayerSurface(LayerShellIntegration* shell, QtWaylandClient::QWayla
|
||||
auto* waylandScreen =
|
||||
dynamic_cast<QtWaylandClient::QWaylandScreen*>(qwindow->screen()->handle());
|
||||
|
||||
if (waylandScreen != nullptr) {
|
||||
if (waylandScreen != nullptr && !waylandScreen->isPlaceholder() && waylandScreen->output()) {
|
||||
output = waylandScreen->output();
|
||||
} else {
|
||||
qWarning()
|
||||
<< "Layershell screen does not corrospond to a real screen. Letting the compositor pick.";
|
||||
<< "Layershell screen does not correspond to a real screen. Letting the compositor pick.";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user