-static void
-gtk_sheet_make_backing_pixmap (GtkSheet *sheet)
-{
- gint pixmap_width, pixmap_height;
- gint width, height;
-
- if (!GTK_WIDGET_REALIZED (GTK_WIDGET (sheet))) return;
-
- width = sheet->sheet_window_width ;
- height = sheet->sheet_window_height ;
-
-
- if ( width <= 0) return;
- if ( height <= 0) return;
-
- if (!sheet->pixmap)
- {
- /* allocate */
- sheet->pixmap = gdk_pixmap_new (sheet->sheet_window,
- width, height,
- - 1);
-
- gtk_sheet_range_draw (sheet, NULL);
- }
- else
- {
- /* reallocate if sizes don't match */
- gdk_drawable_get_size (sheet->pixmap,
- &pixmap_width, &pixmap_height);
- if ( (pixmap_width != width) || (pixmap_height != height))
- {
- g_object_unref (sheet->pixmap);
- sheet->pixmap = gdk_pixmap_new (sheet->sheet_window,
- width, height,
- - 1);
- gtk_sheet_range_draw (sheet, NULL);
- }
- }
-}
-