mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
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:
parent
bf24b816c2
commit
ad8ba69423
@ -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,10 +515,10 @@ meta_wayland_pointer_enable (MetaWaylandPointer *pointer)
|
||||
G_CALLBACK (meta_wayland_pointer_on_cursor_changed),
|
||||
pointer);
|
||||
|
||||
g_signal_connect (cursor_tracker,
|
||||
"visibility-changed",
|
||||
G_CALLBACK (meta_wayland_pointer_on_cursor_visibility_changed),
|
||||
pointer);
|
||||
g_signal_connect_swapped (cursor_tracker,
|
||||
"visibility-changed",
|
||||
G_CALLBACK (sync_focus_surface),
|
||||
pointer);
|
||||
|
||||
g_signal_connect_swapped (clutter_seat,
|
||||
"is-unfocus-inhibited-changed",
|
||||
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user