Trouble destroying windows properly

Hi all,

I am currently using gtk+ in a graphics-type application. I do seem to have
some trouble destroying a window and recreating it under certain conditions.
Basically, the window is in one of the following states before being destroyed.

1. Created as a GtkWidget and shown on the desktop
2. Created as a GtkWidget, but hidden from the desktop using
3. Created as a GtkWidget and minimized using the window manager or desktop
environment (e.g. CDE or KDE).

I am able to destroy the window by calling gtk_widget_destroy() in cases 1 and
2. But in case 3, when the window is minimized by the user, the window is
either not destroyed or it is garbled! I tried putting a gtk_widget_show() call
before destroying the window, but this didn't work and actually made things a
bit ugly by momentarily showing a hidden window before destroying it.
gdk_flush() didn't help me either....

Does anyone have any suggestions? I'm a new GTK programmer, so I might have
missed something blatantly glaring and obvious. I RTFM'ed as much as possible.


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