refactor(workspaces): cleaner handle resume

This commit is contained in:
Alexis 2018-08-09 01:14:06 +02:00
parent c1e2735314
commit 81b5c37d86

View File

@ -5,12 +5,15 @@ static void handle_idle(void *data, struct org_kde_kwin_idle_timeout *timer) {
auto o = reinterpret_cast<waybar::modules::WorkspaceSelector *>(data);
if (o->thread) {
delete o->thread;
o->thread = nullptr;
}
}
static void handle_resume(void *data, struct org_kde_kwin_idle_timeout *timer) {
auto o = reinterpret_cast<waybar::modules::WorkspaceSelector *>(data);
if (!o->thread) {
o->updateThread();
}
}
static const struct org_kde_kwin_idle_timeout_listener idle_timer_listener = {