On the Road to Plasma 6, Cont’d

A little over two months ago I involuntarily switched my daily driver laptop to a Plasma 6 development build (see this blog post on how that went). Since then there has been stunning progress on ironing out bugs, tidying things up, and implementing new features. Let me show you what I’ve been working on, stumbling blocks to look out for, and what you can do to help to make Plasma 6 a truly great release!

Empty KDE Plasma 6 desktop with a bluish-gray mountain wallpaper. Bottom right caption reads “KDE Plasma 5.27.80. Visit bugs.kde.org to report issues”
Yes, please do report all the bugs!

A couple of weeks ago I actually finally switched to a Plasma Wayland session full time and it’s been working great! This now also means I have to fix all of my pet peeve bugs, and boy did I!

I noticed several things that were missing or behaved differently from my X11 session. For instance, task manager showed not only an application’s main window but also any popup (for instance, the “really quit?” or “save or discard?” prompts). That’s because the handling of so-called transient windows in libtaskmanager hasn’t been implemented for Wayland yet. Not only does it have to hide child windows but must in turn propagate any “needs attention” state (glowing orange) back to its parent so it won’t go unnoticed. There is also a dialog protocol in the works so we can tag modal windows and darken their respective parent window accordingly.

Furthermore, startup tasks – the placeholder window you get while an app is launching – weren’t showing up because they didn’t have have an associated virtual desktop and thus were erroneously filtered out for not being on the “current” desktop. The context menu was also curiously missing its “Configure Task Manager…” entry. There was some strange interaction I haven’t fully figured out where under Qt 6 some item’s visibility propagated to the menu items (which in Plasma’s Menu were actually QQuickItems) and caused the actions to be hidden. Since the items aren’t actually placed in the scene but in a popup QMenu, they could be turned into plain QObjects. I then had to port a bunch of places where people relied on the fact QQuickItem has a default property that let you place arbitrary items inside of it. Sadly, it’s a bit late now to change the MenuItem API to use Kirigami.Actions instead – you always gotta keep something to do for Plasma 7, eh? Finally, I also fixed the “Fullscreen” action as well as made the “Alternatives…” action show up. The latter hasn’t been displayed because it only checked for alternatives on demand but the relevant aboutToShow signal wasn’t emitted.

Plasma Task Manager context menu of a Dolphin window, listing various Places, and the “More” menu is open, with “Show Alternatives…” highlighted by the mouse cursor
Finally an easily accessible way to switch to Icon Tasks Manager.

When I sat out to port Dolphin from Phonon to QtMultimedia, I noticed that mouse clicks didn’t reach the event handler that toggled playback. It turns out that in Qt 6, QVideoWidget uses an embedded window for playback. Qt Wayland, unlike the Qt X11 backend, didn’t support the Qt::WindowTransparentForInput flag yet which would have made the video surface click-through. A fix I submitted has just been merged which sets an empty input region on the wl_surface if desired. Another missing workaround Qt applies on X11 is converting text/x-moz-url mime data to an URI list. Firefox uses this proprietary format during drag and drop operations which meant that under Wayland, Qt apps wouldn’t understand links coming from Firefox. On the subject of drag and drop I noticed that KWin wouldn’t send the correct scale factor to drag pixmaps and that QtQuick Item.grabToImage and QQuickDefaultTextureFactory (used when dragging files on the desktop) didn’t actually support high-dpi pixmaps. Fixing all of that is in progress.

What’s really exciting is that with Qt 6.6, to be released end of September, Qt apps will survive a restart of the Wayland compositor! Not only does this make a crash in the compositor less of a hazard to unsaved data, it also helps developing the compositor itself. I can just recompile a change in KWin and restart it, like I could on X11, and most of my apps, including Qt Creator, come back to life as if nothing ever happened. Annoyingly, on my machine, Konsole wouldn’t and I had to re-open my terminal after every test. It turned out to be an issue in Qt Wayland’s crash handling in conjunction with screen scaling that was promptly resolved by a Team of Davids. Aside from that I did fix a crash in KWin when closing fly-out menus in GTK 4 apps.

On a more annoying side, Qt 6.6 marks many QML properties as FINAL, which means you cannot override them anymore. While this is a good default behavior for new projects, it broke apps left and right which inadvertently added custom properties on various items, shadowing the original one. In most cases, those were easy to spot and trivial to fix, but for instance the “About Distro” KInfoCenter module spouted fun “Final member modelData is overridden in class QQmlDMAbstractItemModelData. The override won’t be used.” error messages. Good luck figuring out where the problem is. Luckily, KDE neon Unstable Edition ships Qt beta releases now and therefore those issues could be addressed before they reached end users. If you’re on Qt 6.6 and click on a button in a QML app but nothing happens or only an empty page pops up, go look for error messages similar to the one above! There’s also an assert for QChar being created inside a valid UTF-16 range which tripped in a few places.

All of the above still left me some time to work on new features. As mentioned in my Akademy blog post, KNotifications now supports the XDG sound theme specification. As a result, the Phonon backend has been removed, we use libcanberra for sounds exclusively. The selected theme is now also synced to GTK configuration which means that at last Thunderbird uses my configured KDE sound for new email notifications! In addition to sounds when plugging in and out USB devices, I am working on doing the same for HDMI and other display hardware.

A KWrite text editor window, tool bar with a split “Open” button and a popup menu below it listing various recently opened files
Handy recent documents shortcuts in various apps

There have also been some minor visual tweaks, such as Kickoff no longer highlighting separators, and the info text in the logout dialog being less crammed. I also ultimately fixed the “100%” label in the volume popup wrapping awkwardly under certain font and locale configurations. Furthermore, the network applet now remembers the last viewed connection tab – I never look at the “Speed” graph, so it remembers that I want “Details” shown always. Finally, all apps using KXMLGui, such as Kate, KWrite, Kolourpaint, and others, when built against Frameworks 6, gained a split “Open” button in their toolbars with quick access to recent documents either by clicking the little arrow, or right clicking the button itself.

In closing, I must say that I am quite happy with how Plasma 6 has progressed over the past weeks. This would not have been possible without the hard work of many of my fellow KDE and Qt developers, distributions packaging pre-release software for easy consumption, and you, dear reader, reporting bugs, reading articles, and testing patches! Keep up the good work, keep the bug reports coming, so we all can look forward to a genuinely wonderful Plasma 6.0 release!

Donating to KDE is also always a good way to fund development!

Discuss this post on KDE Discuss.

5 thoughts on “On the Road to Plasma 6, Cont’d”

  1. Great write up!

    > Sadly, it’s a bit late now to change the MenuItem API to use Kirigami.Actions instead

    Is it really too late as everything is still under heavy development and porting?

    1. It would be quite an invasive change, requiring porting various applets. And tbh I don’t really have the time to do it.

      Also, QML “list” properties are still pure witchcraft to me. :)

Leave a Reply

Your email address will not be published. Required fields are marked *