diff options
author | Wolfgang Ulbrich <[email protected]> | 2016-02-11 07:56:32 +0100 |
---|---|---|
committer | Wolfgang Ulbrich <[email protected]> | 2016-02-12 07:04:31 +0100 |
commit | be4afeb0b859d0e219735140f7f59addb4e8d8ba (patch) | |
tree | b904bb366669b891143ed87abcd1d8dc852ed491 | |
parent | 163c4941bbe525fee986854844c54c67b8c85a19 (diff) | |
download | mate-panel-be4afeb0b859d0e219735140f7f59addb4e8d8ba.tar.bz2 mate-panel-be4afeb0b859d0e219735140f7f59addb4e8d8ba.tar.xz |
GTK+3 menu: don't use deprecated gtk_menu_get_tearoff_state
taken from:
https://git.gnome.org/browse/gnome-panel/commit/?id=d907a6e
-rw-r--r-- | mate-panel/menu.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/mate-panel/menu.c b/mate-panel/menu.c index 3fe1d329..fd713d53 100644 --- a/mate-panel/menu.c +++ b/mate-panel/menu.c @@ -681,7 +681,11 @@ drag_end_menu_cb (GtkWidget *widget, GdkDragContext *context) #endif } +#if GTK_CHECK_VERSION (3, 0, 0) + if (xgrab_shell) +#else if (xgrab_shell && !gtk_menu_get_tearoff_state (GTK_MENU(xgrab_shell))) +#endif { #if GTK_CHECK_VERSION (3, 0, 0) gboolean status; @@ -697,8 +701,8 @@ drag_end_menu_cb (GtkWidget *widget, GdkDragContext *context) #if GTK_CHECK_VERSION (3, 0, 0) display = gdk_window_get_display (window); device_manager = gdk_display_get_device_manager (display); - keyboard = gdk_device_get_associated_device (pointer); pointer = gdk_device_manager_get_client_pointer (device_manager); + keyboard = gdk_device_get_associated_device (pointer); /* FIXMEgpoo: Not sure if report to GDK_OWNERSHIP_WINDOW or GDK_OWNERSHIP_APPLICATION Idem for the @@ -732,7 +736,7 @@ drag_end_menu_cb (GtkWidget *widget, GdkDragContext *context) #endif /* FIXME fix for GTK3 */ #if !GTK_CHECK_VERSION (3, 0, 0) - GTK_MENU_SHELL (xgrab_shell)->have_xgrab = TRUE; + GTK_MENU_SHELL (xgrab_shell)->have_xgrab = TRUE; #endif } else |