lxqt / libqtxdg

Qt implementation of freedesktop.org xdg specs
https://lxqt.github.io
GNU Lesser General Public License v2.1
73 stars 35 forks source link

xdgdesktopfile: Avoid freeze for DBusActivatable apps #182

Closed palinek closed 5 years ago

palinek commented 5 years ago

For case when the DBusActivatable application is unresponsive the startDetached() can block for a long time (the Qt default 25s DBus timeout). Blocking can't be avoided while using QDBusInterface, because the object can block directly in its contructor.

So we use the generated interface class and set the timeout for the DBus call to 1500ms (can be overriden env variable QTXDG_DBUSACTIVATE_TIMEOUT).

See also: https://bugreports.qt.io/browse/QTBUG-75016

fixes #181

palinek commented 5 years ago

@luis-pereira please, take a look into the cmake part

damianatorrpm commented 5 years ago

Works amazing. Panel freezes only for QTXDG_DBUSACTIVATE_TIMEOUT amount of time and doesn't crash, in the background 25 sec later

error sending Activate message to application: Timeout was reached

agaida commented 5 years ago

GTM

agaida commented 5 years ago

unblocked for debian buster