fix(wayland): fix ext screens resetting and causing protocol error

Could not reproduce this personally but I am told this fixes it.
This commit is contained in:
outfoxxed committed 2024-02-28 21:11:28 -08:00
1 parent 48bdcf4db2
commit 4eac0b40c3
2 files changed
+6

No files matched your search

@@ -68,7 +68,10 @@ bool LockWindowExtension::attach(QWindow* window, SessionLockManager* manager) {
if (current != nullptr) {
current->surface->setExtension(this);
} else {
// Qt appears to be resetting the window's screen on creation on some systems. This works around it.
auto* screen = window->screen();
window->create();
window->setScreen(screen);
waylandWindow = dynamic_cast<QtWaylandClient::QWaylandWindow*>(window->handle());
if (waylandWindow == nullptr) {
+3
View File
@@ -54,7 +54,10 @@ bool LayershellWindowExtension::attach(QWindow* window) {
}
if (!hasSurface) {
// Qt appears to be resetting the window's screen on creation on some systems. This works around it.
auto* screen = window->screen();
window->create();
window->setScreen(screen);
auto* waylandWindow = dynamic_cast<QtWaylandClient::QWaylandWindow*>(window->handle());
if (waylandWindow == nullptr) {