daemon: add a ClientCount dbus property

Introduce a new "ClientCount" dbus property that can be queried and
also watched to see if gamemode is currently active (or not).
This commit is contained in:
Christian Kellner
2019-04-10 23:57:27 +02:00
parent 6d921617f9
commit 05909d1cfa
3 changed files with 47 additions and 12 deletions

View File

@@ -415,6 +415,8 @@ int game_mode_context_register(GameModeContext *self, pid_t client, pid_t reques
/* Apply io priorities */
game_mode_apply_ioprio(self, client);
game_mode_client_count_changed();
return 0;
error_cleanup:
@@ -498,6 +500,8 @@ int game_mode_context_unregister(GameModeContext *self, pid_t client, pid_t requ
game_mode_context_leave(self);
}
game_mode_client_count_changed();
return 0;
}