Skip to content

Commit

Permalink
Reverted idle.cpp so it functions again.
Browse files Browse the repository at this point in the history
Prevent crash when audio device disconnects
  • Loading branch information
LeSqueed authored and LeSqueed committed Jun 25, 2023
1 parent 492ab58 commit ce2e9a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 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_sync(display);
wl_display_roundtrip(display);
}
cout << "IDLE INHIBITED" << endl;
} else {
if (idle != NULL) {
zwp_idle_inhibitor_v1_destroy(idle);
idle = NULL;
wl_display_sync(display);
wl_display_roundtrip(display);
}
cout << "NOT IDLE INHIBITED" << endl;
}
Expand Down
2 changes: 1 addition & 1 deletion src/pulse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ int Pulse::init(SubscriptionType subscriptionType,
void Pulse::sink_input_info_callback(pa_context *, const pa_sink_input_info *i,
int, void *userdata) {
Data *data = (Data *)userdata;
if (i && !i->corked) data->activeSink = true;
if (i && !i->corked && i->client != 0) data->activeSink = true;
pa_threaded_mainloop_signal(data->mainloop, 0);
}

Expand Down

0 comments on commit ce2e9a8

Please sign in to comment.