Skip to content

Commit

Permalink
Merge pull request input-leap#1863 from whot/wip/signal-disconnect-bug
Browse files Browse the repository at this point in the history
ei: disconnect SESSION_CLOSED from the right session object
  • Loading branch information
shymega authored Feb 22, 2024
2 parents 24fc062 + 86ec373 commit 7da1843
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/lib/platform/PortalInputCapture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,12 @@ PortalInputCapture::~PortalInputCapture()
}

if (session_) {
for (auto sigid: signals_) {
if (sigid != 0) {
g_signal_handler_disconnect(session_, sigid);
}
}
XdpSession *parent_session = xdp_input_capture_session_get_session(session_);
g_signal_handler_disconnect(G_OBJECT(parent_session), signals_[SESSION_CLOSED]);
g_signal_handler_disconnect(session_, signals_[DISABLED]);
g_signal_handler_disconnect(session_, signals_[ACTIVATED]);
g_signal_handler_disconnect(session_, signals_[DEACTIVATED]);
g_signal_handler_disconnect(session_, signals_[ZONES_CHANGED]);
g_object_unref(session_);
}

Expand Down

0 comments on commit 7da1843

Please sign in to comment.