wayland/pointer: Use g_signal_connect_swapped for one signal

Remove the rather useless callback function that's currently used for
handling the "visibility-changed" signal and instead connect to the
signal using `g_signal_connect_swapped()`.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1077
This commit is contained in:
Jonas Dreßler 2020-02-19 21:21:29 +01:00 committed by Jonas Ådahl
parent bf24b816c2
commit ad8ba69423

View File

@ -494,13 +494,6 @@ meta_wayland_pointer_on_cursor_changed (MetaCursorTracker *cursor_tracker,
meta_wayland_surface_update_outputs (pointer->cursor_surface);
}
static void
meta_wayland_pointer_on_cursor_visibility_changed (MetaCursorTracker *cursor_tracker,
MetaWaylandPointer *pointer)
{
sync_focus_surface (pointer);
}
void
meta_wayland_pointer_enable (MetaWaylandPointer *pointer)
{
@ -522,9 +515,9 @@ meta_wayland_pointer_enable (MetaWaylandPointer *pointer)
G_CALLBACK (meta_wayland_pointer_on_cursor_changed),
pointer);
g_signal_connect (cursor_tracker,
g_signal_connect_swapped (cursor_tracker,
"visibility-changed",
G_CALLBACK (meta_wayland_pointer_on_cursor_visibility_changed),
G_CALLBACK (sync_focus_surface),
pointer);
g_signal_connect_swapped (clutter_seat,
@ -546,7 +539,7 @@ meta_wayland_pointer_disable (MetaWaylandPointer *pointer)
pointer);
g_signal_handlers_disconnect_by_func (cursor_tracker,
meta_wayland_pointer_on_cursor_visibility_changed,
sync_focus_surface,
pointer);
g_signal_handlers_disconnect_by_func (clutter_seat,