[Spice-devel] [PATCH spice-gtk] widget: Ignore deprecation warnings for gdk_event_get_scancode
Frediano Ziglio
fziglio at redhat.com
Tue Aug 8 07:09:12 UTC 2017
>
> It is available since Gtk+ 3.22
Acked-by: Frediano Ziglio <fziglio at redhat.com>
> ---
> src/spice-widget.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/src/spice-widget.c b/src/spice-widget.c
> index d5ebd9d..fb94e94 100644
> --- a/src/spice-widget.c
> +++ b/src/spice-widget.c
> @@ -1577,6 +1577,7 @@ static gboolean key_event(GtkWidget *widget,
> GdkEventKey *key)
> * This API is available from 3.22 or if backported.
> */
> #if HAVE_GDK_EVENT_GET_SCANCODE
> +G_GNUC_BEGIN_IGNORE_DEPRECATIONS
> native_scancode = gdk_event_get_scancode((GdkEvent *) key);
> if (native_scancode) {
> scancode = native_scancode & 0x1ff;
> @@ -1584,6 +1585,7 @@ static gboolean key_event(GtkWidget *widget,
> GdkEventKey *key)
> if (scancode == (0x100|DIK_NUMLOCK) || scancode ==
> (0x100|DIK_RSHIFT))
> scancode &= 0xff;
> }
> +G_GNUC_END_IGNORE_DEPRECATIONS
> #else
> native_scancode = 0;
> #endif
More information about the Spice-devel
mailing list