Re: expose events
- From: Owen Taylor <otaylor redhat com>
- To: Jim Crafton <jim crafton verizon net>
- Cc: GTK App Dev List <gtk-app-devel-list gnome org>
- Subject: Re: expose events
- Date: 27 Apr 2003 19:01:15 -0400
On Sun, 2003-04-27 at 18:49, Jim Crafton wrote:
when you have an expose event callback are you supposed to return TRUE
or FALSE?
If I understand the docs on events, if I return FALSE then no more event
handlers/callbacks get processed, if I return TRUE then the event gets
passed to the next callback.
But I notice that if I have a GtkWindow, then add a GtkButton to it, if
I return FALSE from the expose callback that I connected to the windows
expose signal, I see the effect of the various drawing calls in my
expose callback, but I do NOT see the button widget !
I don't understand why this would be the case. FALSE means "continue
doing the normal processing", while TRUE means "I've done all the
processing that needs to be done, stop."
You need to return FALSE here, or the window widget won't call the
expose handlers for the child widgets; are you sure that the above
isn't backwards? That would make more sense.
However if I return TRUE from my expose callback, I do see the button,
but none of my drawing code appears!
Any ideas - obviously I am doing something wrong, but I don't know what!
Expose handlers should basically always return FALSE.
Try
gtk_widget_set_app_paintable(window, TRUE);
If you don't call this, then the window will likely draw _over_
what you draw in your expose handler.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]