Re: newbie question on gdk
- From: Michael Beach <mbeach zip com au>
- To: gtk-list redhat com
- Subject: Re: newbie question on gdk
- Date: Thu, 26 Feb 1998 00:38:43 +1100
George <jirka@5z.com> wrote:
>
> > sleep(3);
> >
> > /* shut down gdk and exit the program */
> > gdk_exit(0);
> > }
>
> it's quite simple, the events don't get processed .... there needs to me
> a gtk_main_iteration somewhere ...
>
I thought this was a little off the mark; gdk is meant to be a drawing
toolkit, and it seems to me that event loops are a widget toolkit kind
of thing. But being a self-confessed newbie to gtk, I decided to have a
look in gdk.h to see if I was off track, and I spotted the real cause of
my problem.
There is a function gdk_flush(). Putting this in after all of my drawing
code and before the sleep() worked wonders. It has been sooo long since
I did any Xlib stuff that I didn't even think of the need to flush the
connection to the X server.
Thanks anyway for the responses.
Regards
M.Beach
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]