SNI: Disallow watcher replacement

Should help against losing the name constantly, if another bar is
opened.
This commit is contained in:
scorpion-26 2023-08-23 15:29:13 +02:00
parent ff22c08f01
commit 15ed9bfc66

View file

@ -587,7 +587,7 @@ namespace SNI
LOG("SNI: Lost Name! Disabling SNI!"); LOG("SNI: Lost Name! Disabling SNI!");
RuntimeConfig::Get().hasSNI = false; RuntimeConfig::Get().hasSNI = false;
}; };
auto flags = G_BUS_NAME_OWNER_FLAGS_REPLACE | G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT; auto flags = G_BUS_NAME_OWNER_FLAGS_REPLACE;
g_bus_own_name(G_BUS_TYPE_SESSION, "org.kde.StatusNotifierWatcher", (GBusNameOwnerFlags)flags, +busAcquired, +emptyCallback, +lostName, g_bus_own_name(G_BUS_TYPE_SESSION, "org.kde.StatusNotifierWatcher", (GBusNameOwnerFlags)flags, +busAcquired, +emptyCallback, +lostName,
nullptr, nullptr); nullptr, nullptr);
watcherSkeleton = sni_watcher_skeleton_new(); watcherSkeleton = sni_watcher_skeleton_new();