Mercurial > dwindows
changeset 1931:3a5571255ee6
GTK3: dw_menu_popup() on GTK has always ignored the coordinate paramaters
and just created the menu where the cursor was. A new API
gtk_menu_popup_at_rect() was created to use a rectangle to place the menu,
so I had tried to use that... however either it does not work right or I
don't understand how to call it. So I have switched to
gtk_menu_popup_at_pointer() to stay consistent with the old behavior for
now.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Fri, 02 Jun 2017 23:37:45 +0000 |
parents | fe04bcfd5b65 |
children | bf34d9f9dabe |
files | gtk3/dw.c |
diffstat | 1 files changed, 1 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/gtk3/dw.c Fri Jun 02 23:25:15 2017 +0000 +++ b/gtk3/dw.c Fri Jun 02 23:37:45 2017 +0000 @@ -3686,9 +3686,7 @@ DW_MUTEX_LOCK; #if GTK_CHECK_VERSION(3,22,0) - GdkRectangle rc = { x, y, 1, 1 }; - gtk_menu_popup_at_rect(GTK_MENU(*menu), gtk_widget_get_window(parent), - &rc, GDK_GRAVITY_CENTER, GDK_GRAVITY_CENTER, NULL); + gtk_menu_popup_at_pointer(GTK_MENU(*menu), NULL); #else gtk_menu_popup(GTK_MENU(*menu), NULL, NULL, NULL, NULL, 1, GDK_CURRENT_TIME); #endif