Review Request 124648: Handle clients having a different device pixel ratio

David Edmundson david at davidedmundson.co.uk
Thu Apr 7 13:50:05 UTC 2016



> On April 7, 2016, 7:45 a.m., Martin Gräßlin wrote:
> > src/kwindowsystem.cpp, line 588
> > <https://git.reviewboard.kde.org/r/124648/diff/1/?file=390797#file390797line588>
> >
> >     This looks wrong to me! This method is supposed to return the actual work area as set on X11, not something multiplied by magic values.

This one is right.

The whole point of the dpr is that the client code sees *everything* scaled by the "magic value. 
QScreen's size of the monitor is scaled, the QWindow x/y are scaled. We need our library calls to be scaled too, otherwise they're just broken.


> On April 7, 2016, 7:45 a.m., Martin Gräßlin wrote:
> > src/kwindowsystem.cpp, lines 495-496
> > <https://git.reviewboard.kde.org/r/124648/diff/1/?file=390797#file390797line495>
> >
> >     This part looks wrong to me and I think is the reason why reading icons fails in kwin_wayland now.
> >     
> >     We are dealing here with real pixels. E.g. kwin asking for the icon in size 16x16, because the icon is in 16x16 on the window property. By multiplying here it picks a different icon, e.g. 32x32, which might not even exist on the window.
> >     
> >     I think the scaling needs to be done by the user of the API.

kwin doesn't have a DPR set, and shouldn't. I doubt that's the reason.
Also how are you checking what icons exist in the window? Arguably they should be scaled down.


- David


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/124648/#review94357
-----------------------------------------------------------


On Aug. 7, 2015, 9:47 p.m., David Edmundson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/124648/
> -----------------------------------------------------------
> 
> (Updated Aug. 7, 2015, 9:47 p.m.)
> 
> 
> Review request for KDE Frameworks and Plasma.
> 
> 
> Repository: kwindowsystem
> 
> 
> Description
> -------
> 
> Qt scales down the size of QScreens by the device pixel ratio; we should
> make our windowing APIs match.
> 
> X (and KWin) deal with device dependent pixels, so everything needs to
> be converted when communitcating geometry.
> 
> Abstraction happens in the main kwindowsystem so X and Wayland are both
> supported.
> 
> BUG: 350865
> BUG: 350614
> BUG: 347951
> 
> 
> Diffs
> -----
> 
>   src/kwindowsystem.cpp 0f8ec0ef470b3a3dcd353a1052dc80ed2bb3f992 
> 
> Diff: https://git.reviewboard.kde.org/r/124648/diff/
> 
> 
> Testing
> -------
> 
> Ran yakuake, it looks all right again.
> Re-enabled system DPR support in plasmashell (which is currently disabled) and tested notifications and panel struts are all sensible.
> 
> 
> Thanks,
> 
> David Edmundson
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20160407/a00ead3d/attachment.html>


More information about the Kde-frameworks-devel mailing list