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

            Bug ID: 445106
           Summary: "Screen" setting reverts from a fixed screen to "At
                    mouse location" when Yakuake restarted
           Product: yakuake
           Version: Git (Frameworks 5)
          Platform: Gentoo Packages
                OS: Linux
            Status: REPORTED
          Severity: minor
          Priority: NOR
         Component: general
          Assignee: h...@kde.org
          Reporter: jonoe...@fastmail.fm
  Target Milestone: ---

SUMMARY
On a multi-monitor setup, Yakuake is configured to open on a fixed screen.
After Yakuake is exited and restarted, the setting changes to open Yakuake on
the same screen as the mouse cursor.

STEPS TO REPRODUCE
* Run Yakuake
* In the Quick Menu, set Screen to Screen 1
* Quit Yakuake with Alt-F4
* Run Yakuake
* Press hotkey to show Yakuake

OBSERVED RESULT
* Yakuake opens on the screen of the mouse cursor, not necessarily screen 1
* The "At mouse location" setting is then saved out to user's yakuakerc

EXPECTED RESULT
* Yakuake should open on screen 1
* The user's yakuakerc should retain the setting of "Screen 1"

SOFTWARE/OS VERSIONS
Yakuake 21.04.3
KDE Frameworks 5.85.0
Qt 5.15.2
Gentoo Linux + KDE Plasma
amd64

Bug also confirmed in git commits f21268b35f6bb2a853f8961e1daa9f8a001d4573 and
57167242ece3da352d026bb31712364414e298e9

---

UNDERLYING CAUSE
MainWindow::moveEvent seems to be called not only when the user moves the
window, but also once immediately before the window is first shown, after the
user first presses the show/hide hotkey.
In moveEvent, QApplication::desktop()->screenNumber is called to get the screen
to which the window has been moved, but this function can return -1 if the
widget isn't currently on a screen.
https://doc.qt.io/qt-5/qdesktopwidget.html#screenNumber
During this first call to moveEvent, screenNumber returns -1, causing moveEvent
to call `Settings::setScreen(0)`, i.e. "Screen=At mouse location". This change
is then immediately saved to yakuakerc. This setting remains until the user
switches it back to a fixed screen.

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

Reply via email to