[gtk+/wip/simple-draw3: 21/23] gdkwindow: Don't error out on NULL backgrounds
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/simple-draw3: 21/23] gdkwindow: Don't error out on NULL backgrounds
- Date: Mon, 29 Apr 2013 19:52:34 +0000 (UTC)
commit a6bffcfb5723323a99f938bbd02d42cce027f5f8
Author: Alexander Larsson <alexl redhat com>
Date: Mon Apr 29 18:14:57 2013 +0200
gdkwindow: Don't error out on NULL backgrounds
gtk/gtkwidget.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 28683f6..b86fc84 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -6397,10 +6397,11 @@ _gtk_widget_draw_windows (GdkWindow *window,
/* Only clear bg if double bufferer. This is what we used
to do before, where begin_paint() did the clearing. */
- if (widget->priv->double_buffered)
+ pattern = gdk_window_get_background_pattern (window);
+ if (pattern != NULL &&
+ widget->priv->double_buffered)
{
cairo_save (cr);
- pattern = gdk_window_get_background_pattern (window);
cairo_set_source (cr, pattern);
cairo_paint (cr);
cairo_restore (cr);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]