Fix computing screen geometry on multiple HiDPI monitors
Needs ReviewPublic

Authored by printesoi on May 11 2020, 9:44 PM.



When using setups with multiple HiDPI displays, Yakuake did not show up on all the other monitors except for the top-left one, due to the fact that the screen geometry is not properly computed, so the getDesktopGeometry returns QRect(0,0 0x0). The QScreen::geometry() method appears to behave "weird" on HiDPI displays: the top left corner is given in physical pixels, while the width,height are in device independent pixels. For example, if using two 4K displays, one on top and one on bottom, the QScreen::geometry() will return for the bottom monitor QRect(0,2160 1920x1080).

This also needs to properly show on such setups.

Diff Detail

Lint Skipped
Unit Tests Skipped
printesoi requested review of this revision.May 11 2020, 9:44 PM
printesoi created this revision.
printesoi added reviewers: hein, ngraham, andrewfhou.
andrewfhou resigned from this revision.May 11 2020, 10:00 PM

Afraid I don't have HiDPI displays to test with. Glad the issue is finally seeing work though!

printesoi updated this revision to Diff 82648.May 12 2020, 11:15 AM

Fixed a problem in MainWindow::getScreen() due to the fact the list of screens is 0 based while Yakuake stores the screen number starting from 1.

printesoi updated this revision to Diff 82864.May 14 2020, 3:34 PM

Fix crash when unplugging monitor on which Yakuake is set to open

Thanks! This might get a bit more attention if you re-submit it as a merge request at, now that KDE has moved patch review to GitLab. Here's some documentation if you're unfamiliar with the workflow:

Thanks! You can close this now.