mirror of
https://github.com/brl/mutter.git
synced 2025-06-13 16:59:30 +00:00
display: Don't add MetaDisplay argument to grab-op-* signals twice
GObject signals pass the emitting GObject as the first argument to
signal handler callbacks. When refactoring the grab-op-begin/end signals
to remove MetaScreen with commit 1d5e37050d
,
the "screen" argument was replaced with a "display" argument instead of
being removed completely. This made us call the signal handlers with two
identical MetaDisplay arguments, which is very confusing and actually
wasn't handled in a grab-op-begin handler in gnome-shell.
So fix this by not adding the MetaDisplay as an argument to those
signals, GObject will take care of that for us.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1734>
This commit is contained in:
@ -332,8 +332,7 @@ meta_display_class_init (MetaDisplayClass *klass)
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 3,
|
||||
META_TYPE_DISPLAY,
|
||||
G_TYPE_NONE, 2,
|
||||
META_TYPE_WINDOW,
|
||||
META_TYPE_GRAB_OP);
|
||||
|
||||
@ -343,8 +342,7 @@ meta_display_class_init (MetaDisplayClass *klass)
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 3,
|
||||
META_TYPE_DISPLAY,
|
||||
G_TYPE_NONE, 2,
|
||||
META_TYPE_WINDOW,
|
||||
META_TYPE_GRAB_OP);
|
||||
|
||||
@ -1906,7 +1904,7 @@ meta_display_begin_grab_op (MetaDisplay *display,
|
||||
}
|
||||
|
||||
g_signal_emit (display, display_signals[GRAB_OP_BEGIN], 0,
|
||||
display, display->grab_window, display->grab_op);
|
||||
display->grab_window, display->grab_op);
|
||||
|
||||
if (display->event_route == META_EVENT_ROUTE_WINDOW_OP)
|
||||
meta_window_grab_op_began (display->grab_window, display->grab_op);
|
||||
@ -1979,7 +1977,7 @@ meta_display_end_grab_op (MetaDisplay *display,
|
||||
meta_display_sync_wayland_input_focus (display);
|
||||
|
||||
g_signal_emit (display, display_signals[GRAB_OP_END], 0,
|
||||
display, grab_window, grab_op);
|
||||
grab_window, grab_op);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user