Skip to content

Fix computing screen geometry on multiple HiDPI monitors

Victor Dodon requested to merge dodon/yakuake:fix-displaygeometry-hidpi into master

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 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 QRect(0,2160 1920x1080) for the bottom one.

Merge request reports