[Xfce4-commits] [apps/xfce4-terminal] 01/01: Fix gdk_keyboard_(un)grab deprecation warnings
noreply at xfce.org
noreply at xfce.org
Fri Mar 9 15:59:01 CET 2018
This is an automated email from the git hooks/post-receive script.
f 2 4 0 4 p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository apps/xfce4-terminal.
commit 386e42995d71149d05f232e95d175a853a2f0bf2
Author: Olivier Duchateau <duchateau.olivier at gmail.com>
Date: Fri Mar 9 09:58:20 2018 -0500
Fix gdk_keyboard_(un)grab deprecation warnings
Bug #14249
Signed-off-by: Igor <f2404 at yandex.ru>
---
terminal/terminal-window-dropdown.c | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/terminal/terminal-window-dropdown.c b/terminal/terminal-window-dropdown.c
index 78b8820..986a60f 100644
--- a/terminal/terminal-window-dropdown.c
+++ b/terminal/terminal-window-dropdown.c
@@ -577,12 +577,26 @@ static gboolean
terminal_window_dropdown_can_grab (gpointer data)
{
GdkWindow *window = gtk_widget_get_window (GTK_WIDGET (data));
- GdkGrabStatus status = gdk_keyboard_grab (window, FALSE, GDK_CURRENT_TIME);
+ GdkGrabStatus status;
+#if GTK_CHECK_VERSION (3, 20, 0)
+ GdkDisplay *display = gdk_window_get_display (window);
+ GdkSeat *seat = gdk_display_get_default_seat (display);
+
+ status = gdk_seat_grab (seat, window,
+ GDK_SEAT_CAPABILITY_POINTER | GDK_SEAT_CAPABILITY_KEYBOARD,
+ FALSE, NULL, NULL, NULL, NULL);
+#else
+ status = gdk_keyboard_grab (window, FALSE, GDK_CURRENT_TIME);
+#endif
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