Set a better position for Krunner in wayland
ClosedPublic

Authored by trmdi on Feb 17 2020, 1:55 PM.

Details

Summary

In wayland, QScreen::availableGeometry() returns QScreen::geometry(), we could get a better value from plasmashell

BUG: 386114

Test Plan

Krunner isn't overlapped by a top panel in all cases

Diff Detail

Repository
R120 Plasma Workspace
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 22611
Build 22629: arc lint + arc unit
trmdi created this revision.Feb 17 2020, 1:55 PM
Restricted Application added a project: Plasma. · View Herald TranscriptFeb 17 2020, 1:55 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
trmdi requested review of this revision.Feb 17 2020, 1:55 PM
apol added a subscriber: apol.Feb 17 2020, 2:50 PM

+1 on fixing this

krunner/view.cpp
239

This is a blocking call, it would be ideal to find a way around this...

trmdi updated this revision to Diff 75879.Feb 18 2020, 4:47 AM

Use asyncCall

trmdi updated this revision to Diff 75883.Feb 18 2020, 7:46 AM

Improve code style

meven edited the summary of this revision. (Show Details)Feb 19 2020, 8:54 AM
trmdi marked an inline comment as done.Feb 20 2020, 2:43 AM

Idea is nice.

Does this not jitter on first load? Starting off in 0,0 then moving across?
We now have position async() but we're doing that after we've shown the window.

meven added a comment.Feb 26 2020, 4:04 PM
Idea is nice.

Does this not jitter on first load? Starting off in 0,0 then moving across?
We now have position async() but we're doing that after we've shown the window.

I don't think so. The show() is in the callback.

Does this not jitter on first load? Starting off in 0,0 then moving across?
We now have position async() but we're doing that after we've shown the window.

I don't think so. The show() is in the callback.

/A/ show() is there. It seems to be absolutely useless.

We call show in View::display()

Then we position on showEvent or resizeEvent

trmdi added a comment.Feb 26 2020, 5:24 PM
This comment was removed by trmdi.
trmdi updated this revision to Diff 76596.Feb 28 2020, 4:41 AM

Never show before position is set

trmdi updated this revision to Diff 76597.Feb 28 2020, 5:19 AM

Small fix.

davidedmundson accepted this revision.Feb 28 2020, 11:20 AM

Lets go for it.

krunner/view.cpp
412

this is a very confusing name.

It refers to the visible state krunner has set, but most importantly NOT the state of the QWindow (which is arguably the real state)

This revision is now accepted and ready to land.Feb 28 2020, 11:20 AM
trmdi updated this revision to Diff 76629.Feb 28 2020, 1:02 PM

Rename m_realVisible to m_requestedVisible

trmdi marked an inline comment as done.Feb 28 2020, 1:03 PM
trmdi closed this revision.Feb 28 2020, 1:05 PM