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

--- Comment #12 from Frederick Zhang <[email protected]> ---
I spent some time to bisect this today:

# bad: [e1e49a6e2498c78ed57d0bf14b9efc5d5c11ac20] GIT_SILENT Upgrade release
service version to 20.08.0.
# good: [d9a4f52107b0f558ba6a08fe66e8f7063fcffc9f] Merge branch 'release/20.04'
git bisect start 'v20.08.0' 'd9a4f52'
# bad: [481f39fb8f2092a919b1a9f2ba9a408e12ba27e5] Fix missing main menu after
disabling systray icon
git bisect bad 481f39fb8f2092a919b1a9f2ba9a408e12ba27e5
# bad: [491f5a2098fae018d35f9095e7675d294eafa9c6] Fix computing screen geometry
on multiple HiDPI monitors
git bisect bad 491f5a2098fae018d35f9095e7675d294eafa9c6
# good: [aecc1961d7f291ff59165589176c088eb0ecc78b] GIT_SILENT made messages
(after extraction)
git bisect good aecc1961d7f291ff59165589176c088eb0ecc78b
# first bad commit: [491f5a2098fae018d35f9095e7675d294eafa9c6] Fix computing
screen geometry on multiple HiDPI monitors

Then after spending some time on this, it seems that this line is causing issue
in my case:

screenGeometry.moveTo(screenGeometry.topLeft() / screen->devicePixelRatio());

I removed '/ screen->devicePixelRatio()' and the issue is gone.


So along with the patch from Bug 275433, changes I've made on top of v21.04.1
to make it work:

diff --git a/app/mainwindow.cpp b/app/mainwindow.cpp
index a9e953f..79612d0 100644
--- a/app/mainwindow.cpp
+++ b/app/mainwindow.cpp
@@ -1510,9 +1510,9 @@ int MainWindow::getScreen()
 QRect MainWindow::getScreenGeometry()
 {
     QScreen *screen = QGuiApplication::screens().at(getScreen());
     QRect screenGeometry = screen->geometry();
-    screenGeometry.moveTo(screenGeometry.topLeft() /
screen->devicePixelRatio());
+    screenGeometry.moveTo(screenGeometry.topLeft());
     return screenGeometry;
 }

 QRect MainWindow::getDesktopGeometry()
@@ -1523,9 +1523,9 @@ QRect MainWindow::getDesktopGeometry()

     if (action->isChecked())
         return screenGeometry;

-    if (m_isWayland) {
+    if (m_isWayland || true) {
         // on Wayland it's not possible to get the work area from
KWindowSystem
         // but plasmashell provides this through dbus
         return m_availableScreenRect.isValid() ? m_availableScreenRect :
screenGeometry;
     }


Hope this helps.

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

Reply via email to