Backing Pixmap woes with frames





Hi,

I'm trying to add drawing area with a backing pixmap
to a window I'm building, but am running into trouble:

> Gdk-CRITICAL **: file gdkpixmap.c: line 62 (gdk_pixmap_new):
> assertion `(window != NULL) || (depth != -1)' failed.
> Gdk-CRITICAL **: file gdkdraw.c: line 89 (gdk_draw_rectangle):
> assertion `drawable != NULL' failed.

The backing pixmap is built as follows:
     d_pixmap = gdk_pixmap_new(get_window(), x, y, -1);

I've used this code in a few other modules before without
any problems. Now though I try to add the drawing area
to a frame, and it seems that the gdk_pixmap_new() is failing,
specifically get_window() seems to return NULL.

Here's a quick rundown on what I'm doing:
     d_previewFrame = new Gtk_Frame ();
     d_vBoxPreview.pack_start (*d_previewFrame, FALSE, FALSE, 0);
     d_previewGroupFrame = new Gtk_Frame ("Preview");
     d_previewGroupFrame->add (d_vBoxPreview);

     // GuiBufferedDrawingArea allocats the DA and backing pixmap
     d_drawArea = new GuiBufferedDrawingArea ();
     d_previewFrame->add (*d_drawArea);

So far so good, but when I try to do a
     d_drawArea.setUsize (sx, sy);
(which in fact only destroys to old pixmap, creates a new one (see
statement above) and resizes the drawing area), I get the 2 Gdk-CRITICAL
errors above.

Is there anything special that I must know/remember when using frames
instead of adding a drawing area to a vBox directly?

Thanks
-> Robert




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