Skip to content

Delay org.kde.KWin service registration until everything is loaded

ivan tkachenko requested to merge work/ratijas/register-kwin into master

Some plugins and classes used to randomly register org.kde.KWin service before initialization is completed, which made the service appear on the bus in an incomplete state, with some objects/plugins still missing. In the absence of the ObjectManager interface support, it may break client apps that are listening to NameOwnerChanged signal at org.freedesktop.DBus service, and instantly trying to fetch object properties in signal handler.

Of course this is not a proper/complete solution in case of plugins, because dynamic plugins may be loaded and unloaded at runtime. But for those plugins which are always loaded on start it is a quality-of-life improvement, since clients won't need to implement timeouts and/or retry logic on their side.

This patch was extensively tested on X11 with custom Rust based D-Bus client and with Night Color Control applet from kdeplasma-addons. On Wayland service loads as well, but testing restarts is a bit problematic at this moment.

BUG: 462126

Merge request reports