From 5d85bfe7b27db00292fc7e20c2dec6a39019ff71 Mon Sep 17 00:00:00 2001 From: Patrick Griffis Date: Tue, 28 Apr 2026 20:55:28 -0500 Subject: [PATCH] wayland: Return correct value when handling show-option-menu TRUE for handled, FALSE otherwise --- platform/wayland/cog-view-wl.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/platform/wayland/cog-view-wl.c b/platform/wayland/cog-view-wl.c index 2b620b8c..88ae7785 100644 --- a/platform/wayland/cog-view-wl.c +++ b/platform/wayland/cog-view-wl.c @@ -70,8 +70,8 @@ static void on_mouse_target_changed(WebKitWebView *, WebKitHitTestResult *hitTes #if COG_HAVE_LIBPORTAL static void on_run_file_chooser(WebKitWebView *, WebKitFileChooserRequest *); #endif -static void on_show_option_menu(WebKitWebView *, WebKitOptionMenu *, WebKitRectangle *, gpointer *); -static void on_wl_surface_frame(void *, struct wl_callback *, uint32_t); +static gboolean on_show_option_menu(WebKitWebView *, WebKitOptionMenu *, WebKitRectangle *, gpointer *); +static void on_wl_surface_frame(void *, struct wl_callback *, uint32_t); static void shm_buffer_copy_contents(struct shm_buffer *, struct wl_shm_buffer *); static struct shm_buffer *shm_buffer_create(CogWlView *, struct wl_resource *, size_t); @@ -516,14 +516,15 @@ on_run_file_chooser(WebKitWebView *view, WebKitFileChooserRequest *request) } #endif /* COG_HAVE_LIBPORTAL */ -static void +static gboolean on_show_option_menu(WebKitWebView *view, WebKitOptionMenu *menu, WebKitRectangle *rectangle, gpointer *data) { g_autoptr(CogWlViewport) viewport = COG_WL_VIEWPORT(cog_view_get_viewport((CogView *) view)); if (!viewport) - return; + return FALSE; cog_wl_platform_popup_create(viewport, g_object_ref(menu)); + return TRUE; } static void