[Xfce4-commits] [apps/xfce4-terminal] 01/01: Restore deprecated gdk_keyboard_(un)grab

noreply at xfce.org noreply at xfce.org
Fri Oct 28 17:29:36 CEST 2016


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

f2404 pushed a commit to branch master
in repository apps/xfce4-terminal.

commit fdc57ae847bd4bca62c0f87466cc77feaa4e1cce
Author: Igor <f2404 at yandex.ru>
Date:   Fri Oct 28 18:28:51 2016 +0300

    Restore deprecated gdk_keyboard_(un)grab
    
    To avoid flickering when hiding the window under xfwm4.
---
 terminal/terminal-window-dropdown.c | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)

diff --git a/terminal/terminal-window-dropdown.c b/terminal/terminal-window-dropdown.c
index 9d646f4..bea130c 100644
--- a/terminal/terminal-window-dropdown.c
+++ b/terminal/terminal-window-dropdown.c
@@ -421,26 +421,12 @@ static gboolean
 terminal_window_dropdown_can_grab (gpointer data)
 {
   GdkWindow    *window = gtk_widget_get_window (GTK_WIDGET (data));
-  GdkGrabStatus status;
-
-#if GTK_CHECK_VERSION (3, 20, 0)
-  GdkSeat *seat = gdk_display_get_default_seat (gtk_widget_get_display (GTK_WIDGET (data)));
-  if (!gdk_window_is_visible (window))
-    return FALSE;
-  status = gdk_seat_grab (seat, window, GDK_SEAT_CAPABILITY_KEYBOARD, FALSE, NULL, NULL, NULL, NULL);
-#else
-  status = gdk_keyboard_grab (window, FALSE, GDK_CURRENT_TIME);
-#endif
+  GdkGrabStatus status = gdk_keyboard_grab (window, FALSE, GDK_CURRENT_TIME);
 
   if (status == GDK_GRAB_SUCCESS)
     {
       /* drop the grab */
-#if GTK_CHECK_VERSION (3, 20, 0)
-      gdk_seat_ungrab (seat);
-#else
       gdk_keyboard_ungrab (GDK_CURRENT_TIME);
-#endif
-
       return FALSE;
     }
 

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


More information about the Xfce4-commits mailing list