[PATCH spice-gtk 1/4] fixup! build-sys: bump gtk requirement 3.12 -> 3.22

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

 



Remove check for gdk_event_get_scancode presence, included in 3.22
---
 configure.ac       | 12 ------------
 src/spice-widget.c | 10 +---------
 2 files changed, 1 insertion(+), 21 deletions(-)

diff --git a/configure.ac b/configure.ac
index 2d90b7bc..6ddfa4b8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -149,18 +149,6 @@ AS_IF([test "x$with_gtk" != "xno"],
                                -DGDK_VERSION_MAX_ALLOWED=$GTK_ENCODED_VERSION"])
 SPICE_GTK_REQUIRES="${SPICE_GTK_REQUIRES} gtk+-3.0 >= $GTK_REQUIRED"
 
-# Check for gdk_event_get_scancode function
-# This was added in Gdk 3.22
-# The check allows the usage of the function in case the function is
-# backported or in case of compilation from Gdk master branch
-old_LIBS="$LIBS"
-old_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS $GTK_CFLAGS"
-LIBS="$LIBS $GTK_LIBS"
-AC_CHECK_FUNCS(gdk_event_get_scancode)
-LIBS="$old_LIBS"
-CFLAGS="$old_CFLAGS"
-
 PKG_CHECK_EXISTS([gtk+-x11-$with_gtk], [PKG_CHECK_MODULES(X11, x11)])
 AC_CHECK_HEADERS([X11/XKBlib.h])
 
diff --git a/src/spice-widget.c b/src/spice-widget.c
index bd438f81..8d933848 100644
--- a/src/spice-widget.c
+++ b/src/spice-widget.c
@@ -1526,11 +1526,7 @@ static gboolean key_event(GtkWidget *widget, GdkEventKey *key)
 #endif
 
 #ifdef G_OS_WIN32
-    /* Try to get scancode with gdk_event_get_scancode.
-     * This API is available from 3.22 or if backported.
-     */
-#if HAVE_GDK_EVENT_GET_SCANCODE
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+    /* Try to get scancode with gdk_event_get_scancode. */
     native_scancode = gdk_event_get_scancode((GdkEvent *) key);
     if (native_scancode) {
         scancode = native_scancode & 0x1ff;
@@ -1538,10 +1534,6 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
         if (scancode == (0x100|DIK_NUMLOCK) || scancode == (0x100|DIK_RSHIFT))
             scancode &= 0xff;
     }
-G_GNUC_END_IGNORE_DEPRECATIONS
-#else
-    native_scancode = 0;
-#endif
 
     /* on windows, we ought to ignore the reserved key event? */
     if (!native_scancode && key->hardware_keycode == 0xff)
-- 
2.17.1

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]