mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05: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:
parent
5527b6e483
commit
9512d58c28
@ -438,7 +438,6 @@ meta_begin_modal_for_plugin (MetaCompositor *compositor,
|
||||
display->grab_have_keyboard = TRUE;
|
||||
|
||||
g_signal_emit_by_name (display, "grab-op-begin",
|
||||
meta_plugin_get_display (plugin),
|
||||
display->grab_window, display->grab_op);
|
||||
|
||||
meta_compositor_grab_begin (compositor);
|
||||
@ -472,7 +471,6 @@ meta_end_modal_for_plugin (MetaCompositor *compositor,
|
||||
meta_compositor_grab_end (compositor);
|
||||
|
||||
g_signal_emit_by_name (display, "grab-op-end",
|
||||
meta_plugin_get_display (plugin),
|
||||
grab_window, grab_op);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user