Cherry-pick x11-Fix-deprecation-macro-use.patch:

- Fix deprecation macro use to fix crashes seen on Xfce

Gbp-Dch: Full
This commit is contained in:
Jeremy Bicha
2018-12-13 12:13:30 -05:00
parent d0236eeada
commit 47e4e9c862
2 changed files with 38 additions and 0 deletions

View File

@ -7,3 +7,4 @@ reftest-known-fail.patch
Don-t-test-default-constructed-GdkPixbuf-properties.patch
Revert-Fix-deprecation-warnings.patch
Revert-Update-some-a11y-test-results.patch
x11-Fix-deprecation-macro-use.patch

View File

@ -0,0 +1,37 @@
From: Daniel Boles <dboles.src@gmail.com>
Date: Thu, 13 Dec 2018 17:20:13 +0100
Subject: x11: Fix deprecation macro use
G_GNUC_END_IGNORE_DEPRECATIONS terminates the if statement and does not
consider the following block to be part of the if. So that block was
always taken irregardless of the pattern.
Fixes #1280
---
gdk/x11/gdkwindow-x11.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index f1f2081..b538e0c 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -2985,6 +2985,7 @@ gdk_window_x11_set_background (GdkWindow *window,
double r, g, b, a;
cairo_surface_t *surface;
cairo_matrix_t matrix;
+ cairo_pattern_t *parent_relative_pattern;
if (GDK_WINDOW_DESTROYED (window))
return;
@@ -2997,8 +2998,10 @@ gdk_window_x11_set_background (GdkWindow *window,
}
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
- if (pattern == gdk_x11_get_parent_relative_pattern ())
+ parent_relative_pattern = gdk_x11_get_parent_relative_pattern ();
G_GNUC_END_IGNORE_DEPRECATIONS
+
+ if (pattern == parent_relative_pattern)
{
GdkWindow *parent;