When I arrived in beautiful Randa on Sunday, the week seemed like it would never end but it’s Saturday already and tomorrow I’ll be leaving again.
It’s been an extremely productive week – in the few days since my last blog post I managed to fix a tremendous amount of bugs and added lots of new features and improvements throughout the workspace.
The major cause of crashes in KRunner is the usage of
QIcon::fromTheme , which isn’t thread-safe, from our runner plugins that are executed in different threads. A patch we made for Qt was rejected as it would only cover a much more fundamental deficiency in
QIcon and its caching mechanism. I was nonetheless curious whether enabling our
QueryResult class to operate on an iconName instead of a full-fledged
QIcon would work. After all, in most cases a result is just a plain file or application icon. It turns out, this significantly improved KRunner’s performance as currently
QIcon::fromTheme is pretty slow and by having the view do the lookup we also only load icons that actually end up getting displayed to the user.
Both KRunner/Milou and Kickoff/Kicker have been adjusted to use
iconName() if possible. While this doesn’t fix the root cause, it surely alleviates the problem as there’s just one runner left (bookmarks runner) in all of plasma-workspace/plasma-desktop/kdeplasma-addons that still uses
QIcon::fromTheme . However, for the speed improvement alone this change was more than worth it.
Moreover, I have added a “Copy to Clipboard” action for calculator results, and the Recent Documents runner got on a par with the Baloo runner, namely gaining drag and drop support as well as the “Open Containing Folder” button.
Speaking of which, I finally merged my OpenFileManagerWindowJob to KIO for Frameworks 5.24 which allows an application to scroll to and highlight a file in its parent folder (or multiple files, assuming they’re in the same folder). It has a super easy-to-use API, so there’s no excuse for you not to use it:
So far it only supports the org.freedesktop.FileManager1 DBus interface with a “just open the folder” fallback, so here’s your chance to add backends for Windows and OSX! 🙂
Even better media controls
For Plasma 5.6 I added media controls to task manager tooltips and now with the much cleaner codebase of the new task manager, I made a proof-of-concept for having those controls also in the context menu. Personally, I find tooltips annoying so I didn’t really use those controls. The cool thing about the context menu actions is that they even work when there’s currently no player window, ie. when you just have a launcher sitting there, eliminating the need for a player icon in system tray.
I also improved the mapping logic from application to MPRIS service, so those controls should now work with Dragon Player, Nuvola, and others. The Media Controller applet in system tray will gain similar functionality and it can now also quit the player application in addition to opening its window. Unfortunately, VLC Player does not support the MPRIS “Raise” command.
It’s been so much that I cannot even recall all of what I did. PowerDevil, for instance, will now allow the screen to turn off while it’s locked even when an application is blocking that. It makes no sense to keep the screen on while a movie is playing but the screen is locked and you can’t actually see it.