Popup on searchnoteswidget fails silently: "gdk_wayland_window_handle_configure_popup: assertion 'impl->transient_for' failed"
When you open a right-click popup on the searchnoteswidget it fails with this message:
Gdk-Message: 19:08:46.335: Window 0x562a111ab190 is a temporary window without parent, application will not be able to position it on screen.
Gdk-Message: 19:08:46.335: Window 0x562a111ab190 is a temporary window without parent, application will not be able to position it on screen.
(gnote:24039): Gdk-CRITICAL **: 19:08:46.345: gdk_wayland_window_handle_configure_popup: assertion 'impl->transient_for' failed
The problem is a deprecated API is used to position the GMenu on the window:
void SearchNotesWidget::popup_context_menu_at_location(Gtk::Menu *menu, int x, int y)
{
menu->show_all();
// Set up the funtion to position the context menu
// if we were called by the keyboard Gdk.Key.Menu.
if(x == 0 && y == 0) {
menu->popup(sigc::mem_fun(*this, &SearchNotesWidget::position_context_menu),
0, gtk_get_current_event_time());
}
else {
menu->popup(0, gtk_get_current_event_time());
}
}
menu->popup is deprecated and should be replaced by one of popup_at_pointer, popup_at_rect or popup_at_widget.