Combining two GdkPixmaps and threads! HELP!



Hi,
I'm coding a GTK+ v2.0 program, where my GTK module is
in one unique thread.

I'm trying to combine three xpms together in one xpm.
Note that the "bottom" xpm is the background, and the
other two have transparencies(created with convert
*.gif *.xpm)

I've already made an algorithm that works if it's run
before gtk_main() starts. The algorithm uses
gdk_pixmap_new_from_xpm_d and gdk_draw_drawable. My
problem is that these two functions have some weird
problems when ran after gtk_main() has started doing
loops. (also note that I have added a g_timeout_add()
to do gtk_main_iterations for faster redraws)
gdk_pixmap_new_from_xpm_d needs a GdkWindow *
argument. Apparently my window->window though is NULL.
(but not NULL when checked befor gtk_main() and after
showing the window.) creating a new GdkWindow makes
the Xlib crash probably because I put this algorithm
in a method, that's called almost constantly from
another thread.

Do u have any way to combine pixmaps together?
(preferable without using GdkWindows as parameters)
Or do u know why window->window loses its contents
after gtk_main() starts running?

Please help!
ZIGUS

__________________________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo
http://search.yahoo.com



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