Creating a pixmap before showing a window



Hi all,

I'm still continuing to progress on getting a pixmap to show inside a window
and updating the pixmap without headaches. There are still some major problems,
but I'd like to look at them one at a time since these really ought to be
no-brainers but are giving me a headache. :*(

Now for the first one:

1. I create a window by doing this:

    capture_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);

where capture_window is the window in question. But I DON'T SHOW IT YET because
the capture hasn't been taken yet at this point.

2. I create a pixmap by doing this:

    style = gtk_widget_get_style (capture_window);
    default_pixmap = gdk_pixmap_create_from_xpm_d
    (
        capture_window -> window,
        &default_mask,
        &style -> bg [GTK_STATE_NORMAL],
        (gchar **) default_xpm
    );
    capture_pixmap = gtk_pixmap_new (default_pixmap, default_mask);

Now, at this point, all is fine and dandy if the window is shown. But it's
not...and I get this assertion upon runtime:

Gdk-WARNING **: Creating pixmap from xpm with NULL window and colormap

It looks like the window element of capture_window is set to NULL. Is there a
way to properly render a default pixmap without showing the window first, or is
this just a strange fantasy of mine? :*)

Thanks,
--Arthur



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