mirror of
https://github.com/hyprwm/hypridle.git
synced 2026-01-06 09:20:08 +01:00
dbus: Move logind matches inside try-catch
This commit is contained in:
parent
7c5747b785
commit
163040e96c
1 changed files with 3 additions and 3 deletions
|
|
@ -476,6 +476,9 @@ void CHypridle::setupDBUS() {
|
|||
try {
|
||||
auto reply = proxy->callMethod(method);
|
||||
reply >> path;
|
||||
|
||||
m_sDBUSState.connection->addMatch("type='signal',path='" + path + "',interface='org.freedesktop.login1.Session'", handleDbusLogin, sdbus::floating_slot_t{});
|
||||
m_sDBUSState.connection->addMatch("type='signal',path='/org/freedesktop/login1',interface='org.freedesktop.login1.Manager'", handleDbusSleep, sdbus::floating_slot_t{});
|
||||
} catch (std::exception& e) {
|
||||
Debug::log(CRIT, "Couldn't connect to logind service ({})", e.what());
|
||||
exit(1);
|
||||
|
|
@ -483,9 +486,6 @@ void CHypridle::setupDBUS() {
|
|||
|
||||
Debug::log(LOG, "Using dbus path {}", path.c_str());
|
||||
|
||||
m_sDBUSState.connection->addMatch("type='signal',path='" + path + "',interface='org.freedesktop.login1.Session'", handleDbusLogin, sdbus::floating_slot_t{});
|
||||
m_sDBUSState.connection->addMatch("type='signal',path='/org/freedesktop/login1',interface='org.freedesktop.login1.Manager'", handleDbusSleep, sdbus::floating_slot_t{});
|
||||
|
||||
if (!IGNORE_SYSTEMD_INHIBIT) {
|
||||
m_sDBUSState.connection->addMatch("type='signal',path='/org/freedesktop/login1',interface='org.freedesktop.DBus.Properties'", handleDbusBlockInhibitsPropertyChanged, sdbus::floating_slot_t{});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue