summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancois Gouget <fgouget@codeweavers.com>2016-10-27 18:41:28 +0200
committerVictor Toso <me@victortoso.com>2016-10-31 17:13:30 +0100
commit9b9a6878b935806c831d3561cfa2cd6266368d6c (patch)
treef27296c9fac0042c8700b6b92fffb2fa85f66c5b
parent1c1bcff6b96450e8865fe702c75542b63f75c569 (diff)
gtk: Ignore GLib's too-new warnings where we explicitly check its version
Signed-off-by: Francois Gouget <fgouget@codeweavers.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
-rw-r--r--src/spice-gtk-session.c3
-rw-r--r--src/spice-widget-egl.c3
-rw-r--r--src/spice-widget.c6
3 files changed, 12 insertions, 0 deletions
diff --git a/src/spice-gtk-session.c b/src/spice-gtk-session.c
index 3e0ec74..7bed005 100644
--- a/src/spice-gtk-session.c
+++ b/src/spice-gtk-session.c
@@ -126,6 +126,8 @@ static guint32 get_keyboard_lock_modifiers(void)
{
guint32 modifiers = 0;
#if GTK_CHECK_VERSION(3,18,0)
+/* Ignore GLib's too-new warnings */
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
GdkKeymap *keyboard = gdk_keymap_get_default();
if (gdk_keymap_get_caps_lock_state(keyboard)) {
@@ -139,6 +141,7 @@ static guint32 get_keyboard_lock_modifiers(void)
if (gdk_keymap_get_scroll_lock_state(keyboard)) {
modifiers |= SPICE_INPUTS_SCROLL_LOCK;
}
+G_GNUC_END_IGNORE_DEPRECATIONS
#else
#ifdef HAVE_X11_XKBLIB_H
Display *x_display = NULL;
diff --git a/src/spice-widget-egl.c b/src/spice-widget-egl.c
index 0698af3..3cc1098 100644
--- a/src/spice-widget-egl.c
+++ b/src/spice-widget-egl.c
@@ -303,9 +303,12 @@ gl_make_current(SpiceDisplay *display, GError **err)
}
#if GTK_CHECK_VERSION(3,16,0)
else {
+ /* Ignore GLib's too-new warnings */
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
GtkWidget *area = gtk_stack_get_child_by_name(d->stack, "gl-area");
gtk_gl_area_make_current(GTK_GL_AREA(area));
+ G_GNUC_END_IGNORE_DEPRECATIONS
}
#endif
diff --git a/src/spice-widget.c b/src/spice-widget.c
index 3ac0a7d..82adacf 100644
--- a/src/spice-widget.c
+++ b/src/spice-widget.c
@@ -567,6 +567,8 @@ static void grab_notify(SpiceDisplay *display, gboolean was_grabbed)
#if GTK_CHECK_VERSION(3,16,0)
#ifndef G_OS_WIN32
+/* Ignore GLib's too-new warnings */
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
static gboolean
gl_area_render(GtkGLArea *area, GdkGLContext *context, gpointer user_data)
{
@@ -598,6 +600,7 @@ gl_area_realize(GtkGLArea *area, gpointer user_data)
g_clear_error(&err);
}
}
+G_GNUC_END_IGNORE_DEPRECATIONS
#endif
#endif
@@ -636,6 +639,8 @@ static void spice_display_init(SpiceDisplay *display)
#if GTK_CHECK_VERSION(3,16,0)
#ifndef G_OS_WIN32
+/* Ignore GLib's too-new warnings */
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
area = gtk_gl_area_new();
gtk_gl_area_set_required_version(GTK_GL_AREA(area), 3, 2);
gtk_gl_area_set_auto_render(GTK_GL_AREA(area), false);
@@ -645,6 +650,7 @@ static void spice_display_init(SpiceDisplay *display)
NULL);
gtk_stack_add_named(d->stack, area, "gl-area");
gtk_widget_show_all(widget);
+G_GNUC_END_IGNORE_DEPRECATIONS
#endif
#endif