Skip to content

Fix KRunner positioning on X11 with High DPI and Qt scaling on Plasma

When using Qt scaling in Plasma on X11, the rect that we get back from the availableScreenRect dbus call is scaled. However nothing else here is also scaled, so the positioning is incorrect.

This patch fixes that isue by un-scaling the scaled rect we get back from the dbus call--but only on X11 when using Qt scaling. This is not a problem on X11 without Qt scaling because the dbus call gives us physical pixels to match the physical pixels uses elsewhere, while on Wayland we use scaled pixels everywhere.

BUG: 422578 FIXED-IN: 5.19.1

Texted with my 4K screen and a 250% scale factor with Wayland, X11 with PLASMA_USE_QT_SCALING=1 set, and X11 without it. For all three, KRunner is not positioned in the center of the available screen excluding panels, as intended.

Edited by Nate Graham

Merge request reports