]> git.sur5r.net Git - glabels/commitdiff
Fix drawing problems with view.c
authorJim Evins <evins@snaught.com>
Tue, 5 Oct 2010 02:52:24 +0000 (22:52 -0400)
committerJim Evins <evins@snaught.com>
Tue, 5 Oct 2010 02:52:24 +0000 (22:52 -0400)
- Create separate cairo_t from bin_window and draw into it.
- For manual updates, create allocation rectangle manually

.gitignore
src/view.c

index ca04282071f21d79e5588f6747f626e5d6150eef..c12c8a9bf18517496241b32861da498b6f836c82 100644 (file)
@@ -46,6 +46,7 @@ glabels-*.tar.gz
 
 /src/marshal.[ch]
 /src/stock-pixmaps/stockpixbufs.h
+/src/cursors/cursor_pixdata.h
 /src/glabels
 /src/glabels-3
 /src/glabels-batch
@@ -55,6 +56,10 @@ glabels-*.tar.gz
 
 /data/mime/glabels*.xml
 
+/data/schemas/*.gschema.valid
+/data/schemas/*.gschema.xml
+/data/schemas/*.gschema.xml.in
+
 /po/.intltool-merge-cache
 /po/*.gmo
 /po/POTFILES
index 3ea2ed957f30f7a9834fd977f07d4bd5845ad3e2..983f8e5615793f1eaa28cd4c0fd04d1cf725c537 100644 (file)
@@ -486,7 +486,10 @@ gl_view_update (glView  *view)
                 {
                         view->update_scheduled_flag = TRUE;
 
-                        gtk_widget_get_allocation (GTK_WIDGET (view->canvas), &allocation);
+                        allocation.x      = 0;
+                        allocation.y      = 0;
+                        allocation.width  = gtk_widget_get_allocated_width (view->canvas);
+                        allocation.height = gtk_widget_get_allocated_height (view->canvas);
                         gdk_window_invalidate_rect (window, &allocation, TRUE);
                 }
 
@@ -540,10 +543,19 @@ static gboolean
 draw_cb (glView         *view,
          cairo_t        *cr)
 {
+        GdkWindow *bin_window;
+        cairo_t   *bin_cr;
+
        gl_debug (DEBUG_VIEW, "START");
 
         view->update_scheduled_flag = FALSE;
-       draw_layers (view, cr);
+
+        bin_window = gtk_layout_get_bin_window (GTK_LAYOUT (view->canvas));
+        bin_cr = gdk_cairo_create (bin_window);
+
+       draw_layers (view, bin_cr);
+
+        cairo_destroy (bin_cr);
 
        gl_debug (DEBUG_VIEW, "END");