D29569: Fix computing display geometry on multi-monitor HiDPI setups on X11

2020-05-14 Thread Victor Dodon
printesoi added a comment.


  @zzag yes, but as per the 
https://doc.qt.io/qt-5/qscreen.html#availableGeometry-prop, it does not work on 
setups with multiple displays :)

REPOSITORY
  R278 KWindowSystem

REVISION DETAIL
  https://phabricator.kde.org/D29569

To: printesoi, davidedmundson, #kwin, zzag
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns


D29569: Fix computing display geometry on multi-monitor HiDPI setups on X11

2020-05-09 Thread Victor Dodon
printesoi added a comment.


  I would like to add some more details about my setup: I have a laptop with a 
4K display and I use a second 4K external monitor. I have enabled the 200%  
scalling and `xrandr -q | grep -E '\bconnected' `gives
  
DP-0 connected 3840x2160+0+0 (normal left inverted right x axis y axis) 
609mm x 349mm
DP-2 connected primary 3840x2160+0+2160 (normal left inverted right x axis 
y axis) 344mm x 193mm
  
  ie: the external monitor is set at 0,0 (on top) and the laptop monitor is set 
at 0,2160 (on bottom)
  
  I created a minimal project that shows the problem in this setup 
https://github.com/printesoi/kwindowsystem-workarea-test and without the patch 
the results I get from the code above is (I have a 32px panel on the bottom of 
the primary (laptop) screen):
  
QRect KWindowSystemPrivateX11::workArea(int desktop): QRect(0,0 1920x2128)
QRect KWindowSystemPrivateX11::workArea(const QList , int 
desktop): QRect(0,0 960x1588)

REPOSITORY
  R278 KWindowSystem

REVISION DETAIL
  https://phabricator.kde.org/D29569

To: printesoi, davidedmundson, #kwin, zzag
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns


D29569: Fix computing display geometry on multi-monitor HiDPI setups on X11

2020-05-09 Thread Victor Dodon
printesoi added reviewers: davidedmundson, KWin.

REPOSITORY
  R278 KWindowSystem

REVISION DETAIL
  https://phabricator.kde.org/D29569

To: printesoi, davidedmundson, #kwin
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns


D29569: Fix computing display geometry on multi-monitor HiDPI setups on X11

2020-05-09 Thread Victor Dodon
printesoi created this revision.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
printesoi requested review of this revision.

REVISION SUMMARY
  KWindowSystem::workArea() and KWindowSystem::workArea(QList()) should 
return the same value, but the second call returned an incorrect value on 
multi-monitor HiDPI setups. The cause is that the former uses 
NETRootInfo::workArea() whereas the second one uses displayGeometr() to compuse 
base work area. displayGeometry() on X11 platform did not take into account the 
device pixel ratio.

REPOSITORY
  R278 KWindowSystem

REVISION DETAIL
  https://phabricator.kde.org/D29569

AFFECTED FILES
  src/platforms/xcb/kwindowsystem.cpp

To: printesoi
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns


Tips for testing and debugging KWindowSystem

2020-04-07 Thread Victor Dodon
Hi all,

Can someone give me tips on how to test KWindowSystem while developing? I
have a dual 4K monitor setup and I have found a bug that seems to reside in
KWindowSystem. I would like to try to fix it and then submit a patch, but I
would like to know what's the best way to test and especially to debug this
component. Especially, is it safe to install alongside system packages (I'm
running Arch linux)? How can I debug it (gdb, qDebug())?

Kind regards,
Victor Dodon.