Skip to content

Commit

Permalink
Merge pull request #9 from ErikReider/fix-roundtrip-segfault
Browse files Browse the repository at this point in the history
Fix segfault when display is disconnected
  • Loading branch information
ErikReider authored Jun 22, 2023
2 parents ef41240 + 927ba85 commit 492ab58
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/idle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ void Idle::update(bool isRunning) {
if (idle == NULL) {
idle = zwp_idle_inhibit_manager_v1_create_inhibitor(
wl_idle_inhibit_manager, surface);
wl_display_roundtrip(display);
wl_display_sync(display);
}
cout << "IDLE INHIBITED" << endl;
} else {
if (idle != NULL) {
zwp_idle_inhibitor_v1_destroy(idle);
idle = NULL;
wl_display_roundtrip(display);
wl_display_sync(display);
}
cout << "NOT IDLE INHIBITED" << endl;
}
Expand Down

0 comments on commit 492ab58

Please sign in to comment.