To homogenize our backends and as another step to remove the Screens class
use the AbstractOutput class in the windowed X11 backend.
Details
- Reviewers
zzag - Group Reviewers
KWin - Commits
- R108:8040c559cb71: [platforms/x11/windowed] Port to AbstractOutput
Manually in X session.
Diff Detail
- Repository
- R108 KWin
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
In general, +1, though useractions popup has very small text now.
plugins/platforms/x11/windowed/x11windowed_backend.cpp | ||
---|---|---|
213–217 | Do you think it would be worth to introduce a method that can be used for querying an output with a given xcb_window_t? i.e. X11WindowedOutput *X11WindowedBackend::findOutput(xcb_window_t id) const; |
plugins/platforms/x11/windowed/x11windowed_backend.cpp | ||
---|---|---|
213–217 | Looking at the repetitive code, sure. |
You have an idea what the reason could be for that? I didn't find one. Tbh the whole X11 windowed mode is under-developed and needs more work.
Logical dpi is used to convert point sizes to pixel sizes. I am most certainly sure that our QPA plugin returns trash logicalDpi values. You could check it by running kwin with QT_WAYLAND_FORCE_DPI=96.
The qpa plugin uses QPlatformScreen::logicalDpi() to compute logical dpi of the screen, but QPlatformScreen::logicalDpi() needs proper physical size. :/
Perhaps we need to do
setRawPhysicalSize(pixelSize / 96.0 * 25.4);
It's pretty similar to what QPlatformScreen::physicalSize() does.
Logical dpi is used to convert point sizes to pixel sizes.
In modern Qt wayland qpa (qwaylandscreen) this is effectively hardcoded to 96.
We should do the same in our qpa.
Hmm, yeah, I see, though perhaps we still need to set proper physical size.
We should do the same in our qpa.
Ack.
Is there something to change in regards to DPI now here or somewhere else in a separate Patch?
You need to set adjusted physical size in this patch and in another one hardcode logical dpi to 96.
I have some nitpicks, please address them before landing this revision.
plugins/platforms/x11/windowed/x11windowed_backend.h | ||
---|---|---|
119 | Coding style nitpick: missing whitespace before *. | |
plugins/platforms/x11/windowed/x11windowed_output.h | ||
47 | I'm pretty sure that QObject has virtual destructor, so we can drop virtual part. On the other hand, we could add override keyword just to be sure that our base class has virtual destructor. | |
69 | **/ |