Revert "introspection: Make MetaKeyHandlerFunc compatible with master"

This reverts commit bad48ea815.

Commit 666e5f1f9 (keybindings: Port to Clutter, 2013-10-03) changed the
Meta.KeyEventHandler callback so that it would take a Clutter.KeyEvent
instead of an XIDeviceEvent. This removed the need for the "(type
gpointer)" annotation, since Clutter works with introspection.

The gpointer annotation caused GJS to simply skip over the callback
argument. Since this was only the second-last argument, reintroducing it
required updating gnome-shell JS code that used the last 'binding'
argument. This was likely inconvenient at the time, since work was
happening in a separate 'wayland' branch, and compatibility with the
X11-only branch had to be kept. So shortly after, the gpointer
annotation was reintroduced with commit bad48ea81 (introspection: Make
MetaKeyHandlerFunc compatible with master, 2013-12-09), unbreaking the
gnome-shell JS code.

But now that the 'wayland' branch has long been merged, we can fix this
properly by removing the gpointer annotation and updating the JS
handlers instead.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4079>
This commit is contained in:
Guacamolie
2024-10-13 16:13:52 +02:00
parent 0b3e85bf40
commit f8a46b548a

View File

@@ -449,7 +449,7 @@ typedef enum
* MetaKeyHandlerFunc:
* @display: a #MetaDisplay
* @window: a #MetaWindow
* @event: (type gpointer): a #ClutterEvent
* @event: a #ClutterEvent
* @binding: a #MetaKeyBinding
* @user_data: data passed to the function
*