cleanup: Use g_clear_signal_handler() where possible

`g_clear_signal_handler()` is usually cleaner and saver than
`g_signal_handler_disconnect()`. We use it new code, lets also
adopt the existing one.

See also https://gitlab.gnome.org/GNOME/mutter/merge_requests/868
and https://gitlab.gnome.org/GNOME/mutter/merge_requests/940

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/842
This commit is contained in:
Robert Mader
2019-11-21 23:00:53 +01:00
committed by Florian Müllner
parent e7b9bd75d8
commit 135d178d08
10 changed files with 29 additions and 45 deletions

View File

@ -35,7 +35,7 @@ typedef struct {
guint refcount;
/* Signal connection to dirty window sort list on workspace changes */
guint workspace_switch_id;
gulong workspace_switch_id;
GSList *windows;
@ -1445,7 +1445,7 @@ unref_running_state (ShellAppRunningState *state)
if (state->refcount > 0)
return;
g_signal_handler_disconnect (workspace_manager, state->workspace_switch_id);
g_clear_signal_handler (&state->workspace_switch_id, workspace_manager);
g_clear_object (&state->application_proxy);