June has been a busy month in KWin, with me working on fixing remaining Wayland functionality and upcoming legend Vlad Zagorodniy working on polishing and cleaning up all the effects.
In this blog I'll talk about the more interesting bits of kwin work that I did during June.
Fractional Scaling
A requested feature is to allow fractional scaling for QHD monitors which are roughly 1.5 times the resolution of standard monitors, but not the full 4k.
The wayland scale system is based around integers, but because the scaling is based around a normalised co-ordinate system, the compositor can show a display at a scale of 1.5 whilst clients are rendering for a 2x display with no changes in the client.
Patchset consists of XdgOutput support in both kwin and Qt so that windows that position themselves (such as xwayland clients, or plasmashell) can know the correct logical size of the screen and then relevant changes in kwin/kscreen to implement the extra fractional part.
Unfortunately as this requires a change in Qt to function properly. this won't be available in our UI until Plasma depends on the Qt version that contains this support, probably around March 2019. Stupid desktop Linux.
Cursor Scaling
On the topic of scaling, I merged support for making sure that the cursor is the physical size the user selected regardless of the resolution of the monitor it happens to be on or the scale of the client that supplied it. Particularly useful for a multi-monitor setup where blindly using a pixel size doesn't cut it.
XdgWmBase
The protocol for clients to register toplevels and popups to the window manager has gone through multiple stages, wl_shell, XDGShellV5, XdgShellV6 now settling on the finally stable protocol, Xdg WM Base. Having this finally stable is a hugely signifiant point in the road to wayland.
Previously we were lagging behind other desktops in shell protocol support, but KWin 5.14 will have support for XDG WM Base ahead of the toolkit support coming in Qt 5.12 / next GTK.
GTK decorations
GTK gained server side decoration support in 3.22, however, the implementation needed some work. It correctly removed it's own decorations under KWin but failed to inform KWin, which didn't want to add a "second" titlebar, leaving it in an even worse state than before.
I submitted a patch for GTK rectifiying all the issues and that was all merged pretty swiftly.
Misc
KWin also gained support to show different mouse cursors for resizing the left edge of a window or the right edge of a window. Useful for telling which window will be resized in the case of touching windows.
I guess this is password protected by mistake!?
Crappy that the QT version won’t be available until next spring, but thank you for putting in all this work!
Where do the titlebar options go when GTK apps display server side decorations?