[dasher] Fix bug #607775. (Surprisingly simple in the end.)



commit 3c71ead76d5650868eead6576a56baf7c5be95d0
Author: Patrick Welche <prlw1 cam ac uk>
Date:   Thu Feb 4 17:41:38 2010 +0000

    Fix bug #607775. (Surprisingly simple in the end.)

 ChangeLog           |    4 ++++
 Src/Gtk2/Canvas.cpp |    5 +++--
 Src/Gtk2/Canvas.h   |    2 --
 3 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index e1d87f9..1f2691a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-02-04  Patrick Welche <prlw1 cam ac uk>
+
+	* Fix bug #607775.
+
 2009-01-22  Patrick Welche <prlw1 cam ac uk>
 
 	* Comment out unused screens to hopefully make bug #607775 more
diff --git a/Src/Gtk2/Canvas.cpp b/Src/Gtk2/Canvas.cpp
index 61ac7ea..3e6d8a8 100644
--- a/Src/Gtk2/Canvas.cpp
+++ b/Src/Gtk2/Canvas.cpp
@@ -61,7 +61,6 @@ CCanvas::CCanvas(GtkWidget *pCanvas, CPangoCache *pPangoCache)
 
   //onscreen_cr = cairo_create(m_pOnscreenSurface);
 
-  widget_cr = gdk_cairo_create(m_pCanvas->window);
 #endif
 
   m_pPangoInk = new PangoRectangle;
@@ -79,7 +78,6 @@ CCanvas::~CCanvas() {
   cairo_destroy(display_cr);
   cairo_destroy(decoration_cr);
   //cairo_destroy(onscreen_cr);
-  cairo_destroy(widget_cr);
 #else
   //g_object_unref(m_pDummyBuffer);
   g_object_unref(m_pDisplayBuffer);
@@ -168,9 +166,12 @@ void CCanvas::Display() {
   //  gdk_window_begin_paint_rect(m_pCanvas->window, &sRect);
 
 #if WITH_CAIRO  
+  cairo_t *widget_cr;
+  widget_cr = gdk_cairo_create(m_pCanvas->window);
   cairo_set_source_surface(widget_cr, m_pDecorationSurface, 0, 0);
   cairo_rectangle(widget_cr, 0, 0, m_iWidth, m_iHeight);
   cairo_fill(widget_cr);
+  cairo_destroy(widget_cr);
 #else
   gdk_draw_drawable(m_pCanvas->window, m_pCanvas->style->fg_gc[GTK_WIDGET_STATE(m_pCanvas)], m_pDecorationBuffer, 0, 0, 0, 0, m_iWidth, m_iHeight);
 #endif
diff --git a/Src/Gtk2/Canvas.h b/Src/Gtk2/Canvas.h
index ffe3896..45039b6 100644
--- a/Src/Gtk2/Canvas.h
+++ b/Src/Gtk2/Canvas.h
@@ -306,8 +306,6 @@ private:
   cairo_t *decoration_cr;
   //cairo_t *onscreen_cr; // TODO: do we need to do our own double buffering?
 
-  cairo_t *widget_cr;
-
   cairo_t *cr; // offscreen
   my_cairo_colour_t *cairo_colours;
 #else



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]