[gnome-panel] libpanel-applet: don't use deprecated gdk_device_ungrab



commit 3723793c2b640749403b290fc0297fddadfbf38f
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Wed Mar 9 18:07:11 2016 +0200

    libpanel-applet: don't use deprecated gdk_device_ungrab

 libpanel-applet/panel-applet.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/libpanel-applet/panel-applet.c b/libpanel-applet/panel-applet.c
index 11269e9..26e3878 100644
--- a/libpanel-applet/panel-applet.c
+++ b/libpanel-applet/panel-applet.c
@@ -1079,14 +1079,20 @@ panel_applet_button_event (PanelApplet    *applet,
        socket_window = gtk_plug_get_socket_window (GTK_PLUG (widget));
 
        if (event->type == GDK_BUTTON_PRESS) {
+               GdkDisplay *display;
+               GdkSeat *seat;
+
                xevent.xbutton.type = ButtonPress;
 
+               display = gdk_display_get_default ();
+               seat = gdk_display_get_default_seat (display);
+
                /* X does an automatic pointer grab on button press
                 * if we have both button press and release events
                 * selected.
                 * We don't want to hog the pointer on our parent.
                 */
-               gdk_device_ungrab (event->device, GDK_CURRENT_TIME);
+               gdk_seat_ungrab (seat);
        } else {
                xevent.xbutton.type = ButtonRelease;
        }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]