mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
refactor(workspaces): cleaner handle resume
This commit is contained in:
parent
c1e2735314
commit
81b5c37d86
@ -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 = {
|
||||
|
Loading…
Reference in New Issue
Block a user