[Xfce4-commits] [panel-plugins/xfce4-clipman-plugin] 15/15: Fix the shortcut launched menu

noreply at xfce.org noreply at xfce.org
Wed Jun 1 22:40:08 CEST 2016


This is an automated email from the git hooks/post-receive script.

schuellerf pushed a commit to branch master
in repository panel-plugins/xfce4-clipman-plugin.

commit 7485588ccca5c3784950efe6500ca3f216d757f8
Author: Eric Koegel <eric.koegel at gmail.com>
Date:   Wed Jun 1 08:16:09 2016 +0300

    Fix the shortcut launched menu
    
    When using versions prior to Gtk3.20 just stick	with the gdk
    keyboard grab rather than trying to use the device grab because
    there's no easy way to get the correct keyboard device to grab.
---
 panel-plugin/plugin.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/panel-plugin/plugin.c b/panel-plugin/plugin.c
index 8f89b45..a0050d6 100644
--- a/panel-plugin/plugin.c
+++ b/panel-plugin/plugin.c
@@ -501,9 +501,6 @@ xfce_popup_grab_available (GdkWindow *win, guint32 timestamp)
     GdkDisplay* display = gdk_window_get_display(win);
 #if GTK_CHECK_VERSION (3, 20, 0)
     GdkSeat *seat = gdk_display_get_default_seat (display);
-#else
-    GdkDeviceManager *device_manager = gdk_display_get_device_manager (display);
-    GdkDevice *device = gdk_device_manager_get_client_pointer (device_manager);
 #endif
     GdkGrabStatus g = GDK_GRAB_ALREADY_GRABBED;
     gboolean grab_failed = TRUE;
@@ -525,12 +522,14 @@ xfce_popup_grab_available (GdkWindow *win, guint32 timestamp)
           grab_failed = FALSE;
       }
 #else
-      g = gdk_device_grab(device, win, GDK_KEY_PRESS_MASK, TRUE, mask, NULL, timestamp);
+      G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+      g = gdk_keyboard_grab (win, TRUE, timestamp);
       if (g == GDK_GRAB_SUCCESS)
       {
-          gdk_device_ungrab(device, timestamp);
+          gdk_keyboard_ungrab(timestamp);
           grab_failed = FALSE;
       }
+      G_GNUC_END_IGNORE_DEPRECATIONS
 #endif
     }
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list