[Development] Qt 5.13 & 5.14 add device-independent pixels to device-dependent

Thiago Macieira thiago.macieira at intel.com
Mon Jan 27 20:16:53 CET 2020


I had fixed this prior to 5.13 but the patch was never accepted:
https://codereview.qt-project.org/c/qt/qtbase/+/188493
https://bugreports.qt.io/browse/QTBUG-58329
https://build.opensuse.org/package/view_file/
home:thiagomacieira:branches:openSUSE:Factory/libqt5-qtbase/0001-HighDpi-Fix-
handling-of-the-screen-origin-point.patch?expand=1

The problem is that Qt is adding device-independent pixels to device-dependent 
ones when calculating the positions of anything outside the first screen and 
coming up with nonsense. This can be seen from these lines in qtdiag:

  Geometry: 1920x1080+3200+0 (native: 3840x2160+3200+0) Available: 
1920x1080+3200+0
  Virtual geometry: 5120x1080+0+0 Available: 5120x1080+0+0

The number 5120 is 1920+3200, but 1920 is a scaled number and 3200 isn't. That 
means 5120 is a nonsensical result. The end result is that positioning of many 
things are off.

I've filed https://bugreports.qt.io/browse/QTBUG-81695, but I'm reporting here 
because this issue affects kmail majorly in 5.14 and thus makes it VERY 
difficult for me to work. Please consider this bug a P0.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel System Software Products
-------------- next part --------------
Screens: 2, High DPI scaling: active
# 0 "eDP1" Depth: 24 Primary: yes
  Manufacturer: Sharp Corporation
  Model: 
  Serial number: 
  Geometry: 1600x900+0+0 (native: 3200x1800+0+0) Available: 1600x900+0+0
  Virtual geometry: 5120x1080+0+0 Available: 5120x1080+0+0
  2 virtual siblings
  Physical size: 290x170 mm  Refresh: 59.9818 Hz Power state: 0
  Physical DPI: 140.138,134.471 Logical DPI: 108,108 (native: 216.747,216.854) Subpixel_None
  High DPI scaling factor: 2 DevicePixelRatio: 2 Pixel density: 1
  Primary orientation: 2 Orientation: 2 Native orientation: 0 OrientationUpdateMask: 0

# 1 "DP1-1" Depth: 24 Primary: no
  Manufacturer: Dell Inc.
  Model: DELL P2715Q-
  Serial number: X24K1693BS8L-
  Geometry: 1920x1080+3200+0 (native: 3840x2160+3200+0) Available: 1920x1080+3200+0
  Virtual geometry: 5120x1080+0+0 Available: 5120x1080+0+0
  2 virtual siblings
  Physical size: 600x340 mm  Refresh: 23.976 Hz Power state: 0
  Physical DPI: 81.28,80.6824 Logical DPI: 108,108 (native: 216.747,216.854) Subpixel_None
  High DPI scaling factor: 2 DevicePixelRatio: 2 Pixel density: 1
  Primary orientation: 2 Orientation: 2 Native orientation: 0 OrientationUpdateMask: 0


More information about the Development mailing list