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

Victor Toso victortoso at redhat.com
Fri Jul 20 20:43:15 UTC 2018


Hi,

On Fri, Jul 20, 2018 at 06:17:09PM +0100, Frediano Ziglio wrote:
> Remove check for gdk_event_get_scancode presence, included in 3.22

Agree with fixup, I'll ammend your patch and send a v2 of the
bump patch, many thanks!

Cheers,


> ---
>  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 at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20180720/909b1747/attachment.sig>


More information about the Spice-devel mailing list