mirror of
https://github.com/scorpion-26/gBar.git
synced 2024-11-22 11:12:49 +00:00
SNI: Flush before querying item properties
Some apps have a tendency to deadlock after registration (notably KeePassXC). Now we flush before querying the item properties, so any pending answer should have left the bus, hopefully avoiding the deadlock
This commit is contained in:
parent
a7862a4242
commit
4a52bb744a
1 changed files with 9 additions and 0 deletions
|
@ -325,6 +325,15 @@ namespace SNI
|
|||
|
||||
static TimerResult UpdateWidgets(Box&)
|
||||
{
|
||||
// Flush connection, so we hopefully don't deadlock with any client
|
||||
GError* err = nullptr;
|
||||
g_dbus_connection_flush_sync(dbusConnection, nullptr, &err);
|
||||
if (err)
|
||||
{
|
||||
LOG("SNI: g_dbus_connection_call_sync failed: " << err->message);
|
||||
g_error_free(err);
|
||||
}
|
||||
|
||||
if (RuntimeConfig::Get().hasSNI == false || Config::Get().enableSNI == false)
|
||||
{
|
||||
// Don't bother
|
||||
|
|
Loading…
Reference in a new issue