wayland: Fix popup menu not closing
Implement our own version of gtk_menu_popup_at_pointer()
to work around a GTK3 Wayland bug that prevents the menu from being dismissed via click in certain areas outside of the menu.
The main difference is the added gdk_window_get_toplevel()
call.
See: https://gitlab.gnome.org/GNOME/gtk/-/issues/160
Fixes: #1592 (closed)