From 1b3c26364b6a073131615aa96afc59a33fb997fa Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Mon, 4 Mar 2019 16:31:20 +0100 Subject: [PATCH 1/2] na-tray-child: Silence gdk_window_set_background_pattern warnings Apparently we can't get rid of them without breaking backward compatibility. So let's stick to how GTK handles it and just silence the warnings. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/423 --- src/tray/na-tray-child.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/tray/na-tray-child.c b/src/tray/na-tray-child.c index 6664757d7f..944c79944b 100644 --- a/src/tray/na-tray-child.c +++ b/src/tray/na-tray-child.c @@ -52,7 +52,9 @@ na_tray_child_realize (GtkWidget *widget) /* Set a transparent background */ cairo_pattern_t *transparent = cairo_pattern_create_rgba (0, 0, 0, 0); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS gdk_window_set_background_pattern (window, transparent); +G_GNUC_END_IGNORE_DEPRECATIONS cairo_pattern_destroy (transparent); child->parent_relative_bg = FALSE; @@ -61,7 +63,9 @@ na_tray_child_realize (GtkWidget *widget) { /* Otherwise, if the visual matches the visual of the parent window, we * can use a parent-relative background and fake transparency. */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS gdk_window_set_background_pattern (window, NULL); +G_GNUC_END_IGNORE_DEPRECATIONS child->parent_relative_bg = TRUE; } -- GitLab From 5a897407d91c2a518aaeb3c493dee7baf7d24acf Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Mon, 4 Mar 2019 16:50:12 +0100 Subject: [PATCH 2/2] shell-tray-manager: Silence gdk_window_set_background_pattern warning Apparently we can't get rid of it without breaking backward compatibility. So let's stick to how GTK handles it and just silence the warning. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/423 --- src/shell-tray-manager.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/shell-tray-manager.c b/src/shell-tray-manager.c index 3311deb40f..6503cc3c45 100644 --- a/src/shell-tray-manager.c +++ b/src/shell-tray-manager.c @@ -239,8 +239,10 @@ shell_tray_manager_child_on_realize (GtkWidget *widget, bg_pattern = cairo_pattern_create_rgb (color.red / 255., color.green / 255., color.blue / 255.); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS gdk_window_set_background_pattern (gtk_widget_get_window (widget), bg_pattern); +G_GNUC_END_IGNORE_DEPRECATIONS cairo_pattern_destroy (bg_pattern); } -- GitLab