Bug 474166 - KRunner opens on wrong screen
Summary: KRunner opens on wrong screen
Status: RESOLVED FIXED
Alias: None
Product: krunner
Classification: Plasma
Component: general (other bugs)
Version First Reported In: master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: qt6
: 473528 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-09-05 00:54 UTC by Natalie Clarius
Modified: 2023-09-06 08:28 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Natalie Clarius 2023-09-05 00:54:45 UTC
SUMMARY
***
In the Plasma dev session, KRunner opens on the wrong screen; seemingly consistently the same screen within one session, but not consistently the primary, leftmost or some specific screen across sessions.
***

SOFTWARE/OS VERSIONS
git master everything

ADDITIONAL INFORMATION
I added some debug statements and it seems that https://invent.kde.org/plasma/plasma-workspace/-/blob/master/krunner/view.cpp#L152 correctly determines the correct screen, but is only executed the first time KRunner is opened in a session, so subsequent launches would just place it on the screen that happened to be active the first time it was opened.
Comment 1 Bug Janitor Service 2023-09-05 01:15:06 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/3255
Comment 2 Nate Graham 2023-09-05 01:57:58 UTC
*** Bug 473528 has been marked as a duplicate of this bug. ***
Comment 3 David Redondo 2023-09-06 08:28:51 UTC
Git commit 80c0903a03f06259f9a70729808fd3e1cb45e0b5 by David Redondo, on behalf of Natalie Clarius.
Committed on 06/09/2023 at 09:53.
Pushed by nclarius into branch 'master'.

krunner: fix window showing on wrong screen

Call positionOnScreen every time setVisible is set and not just during initialization of View, so that the correct screen can be determined whenever the window is shown, rather than always using the screen that happened to be active the first time KRunner was launched.

M  +10   -5    krunner/view.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/80c0903a03f06259f9a70729808fd3e1cb45e0b5