Skip to content

Commit

Permalink
Merge pull request #11 from LeSqueed/crash_fix_lost_device
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikReider authored Jun 26, 2023
2 parents 492ab58 + 21d8cce commit 1e8817e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 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
4 changes: 2 additions & 2 deletions src/pulse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ 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 != PA_INVALID_INDEX) data->activeSink = true;
pa_threaded_mainloop_signal(data->mainloop, 0);
}

void Pulse::source_output_info_callback(pa_context *,
const pa_source_output_info *i, int,
void *userdata) {
Data *data = (Data *)userdata;
if (i && !i->corked) data->activeSource = true;
if (i && !i->corked && i->client != PA_INVALID_INDEX) data->activeSource = true;
pa_threaded_mainloop_signal(data->mainloop, 0);
}

Expand Down

0 comments on commit 1e8817e

Please sign in to comment.