Skip to content

window: Fix function callback definition

Without this, the build fails with clang with CFLAGS=-Werror=incompatible-function-pointer-types

../src/font-view-window.c:864:77: error: incompatible function pointer types passing 'void (FontViewWindow *)' (aka 'void (struct _FontViewWindow *)') to parameter of type 'GtkWidgetActionActivateFunc' (aka 'void (*)(struct _GtkWidget *, const char *, struct _GVariant *)') [-Wincompatible-function-pointer-types]
  gtk_widget_class_install_action (widget_class, "win.toggle-search", NULL, action_toggle_search_cb);
                                                                            ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/gtk-4.0/gtk/gtkwidget.h:956:87: note: passing argument to parameter 'activate' here
                                                         GtkWidgetActionActivateFunc  activate);
                                                                                      ^

Merge request reports