From cb8574f7d8ab2cadec417d0eb07ce0c83d1aa5c2 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Fri, 8 Nov 2024 10:09:31 +0100 Subject: [PATCH] don't use ui->lcd_canvas to open popup menu --- src/x49gpng/ui.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/x49gpng/ui.c b/src/x49gpng/ui.c index 545329a..aff76e2 100644 --- a/src/x49gpng/ui.c +++ b/src/x49gpng/ui.c @@ -1452,7 +1452,7 @@ static gboolean react_to_key_event( GtkWidget* widget, GdkEventKey* event, gpoin if ( ui->menu_debug ) gtk_widget_set_sensitive( ui->menu_debug, !gdbserver_isactive() ); - gtk_menu_popup_at_widget( GTK_MENU( ui->menu ), ui->lcd_canvas, GDK_GRAVITY_NORTH_WEST, GDK_GRAVITY_NORTH_WEST, NULL ); + gtk_menu_popup_at_widget( GTK_MENU( ui->menu ), ui->window, GDK_GRAVITY_NORTH_WEST, GDK_GRAVITY_NORTH_WEST, NULL ); return false; default: @@ -1544,7 +1544,7 @@ static gboolean react_to_window_click( GtkWidget* widget, GdkEventButton* event, fprintf( stderr, "clipboard: %s\n", text ); break; case 3: // right click - gtk_menu_popup_at_widget( GTK_MENU( ui->menu ), ui->lcd_canvas, GDK_GRAVITY_NORTH_WEST, GDK_GRAVITY_NORTH_WEST, NULL ); + gtk_menu_popup_at_pointer( GTK_MENU( ui->menu ), NULL ); return true; default: break;