https://bugs.kde.org/show_bug.cgi?id=504138

[email protected] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
                 CC|                            |[email protected]
             Status|REPORTED                    |CONFIRMED

--- Comment #9 from [email protected] ---
I just lost nearly two hours of my life to this issue… please don't make me
submit the patch somewhere else.

I specifically upgraded to Yakuake **25.11.80**, hoping the problem was fixed,
but the issue still persists: the window opens on Wayland with an invalid work
area, causing the first toggle to place the window in the corner / cut off.

After debugging, I found the root cause: `_toggleWindowState()` is executed
**before** the async DBus reply from PlasmaShell is received, meaning
`m_availableScreenRect` is still invalid during the first layout pass.

The fix is extremely small and simply moves `_toggleWindowState()` into the
DBus callback, ensuring the work area is available when computing the geometry:

```diff
diff --git a/app/mainwindow.cpp b/app/mainwindow.cpp
index 2f281bd..9adddd3 100644
--- a/app/mainwindow.cpp
+++ b/app/mainwindow.cpp
@@ -1200,11 +1200,11 @@ void MainWindow::toggleWindowState()
         QObject::connect(watcher, &QDBusPendingCallWatcher::finished, this,
[=, this]() {
             QDBusPendingReply<QRect> reply = *watcher;
             m_availableScreenRect = reply.isValid() ? reply.value() : QRect();
+            _toggleWindowState();
             setWindowGeometry(Settings::width(), Settings::height(),
Settings::position());
             watcher->deleteLater();
         });

-        _toggleWindowState();
     } else {
         _toggleWindowState();
     }
```

This patch fixes the issue reliably on my system with multiple monitors (3k, 4k
& 1080P) and mixed scale factors under Wayland.

Now I'm going to eat a few penguins out of frustration. (Running gag from me,
sorry)

---

Yakuake: 25.11.80
KDE Frameworks: 6.17.0
Qt: 6.9.2 wird verwendet und gebaut wurde mit 6.9.2
Ubuntu 25.10 (Wayland)
Build ABI: x86_64-little_endian-lp64
Kernel: linux 6.17.0-6-generic

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to