RE: return values of event handlers

Title: RE: return values of event handlers

I didn't know that. As a matter of fact, right now I'm trying to stop all handlers for configure-event so the window will not be erased before the expose-event is called. I don't want that flickering when resizing the window so inside the callback function for the configure-event I put something like this:

   gtk_signal_emit_stop_by_name(GTK_OBJECT(widget), "configure-event");
and it works, the window is not erased! The problem is that the expose-event is never called.

By the way, I'm connecting a drawing area widget to expose-event wich is contained in the top level window. configure-event is conected to the window.

Esteban Quijano Vincenzi
Artinsoft corp
Phone: ++(506) 283-3144
Fax: (506) 283-2655
e-mail: equijano artinsoft com <equijano artinsoft com > 

-----Original Message-----
From: Havoc Pennington [mailto:hp redhat com]
Sent: Thursday, July 19, 2001 7:19 AM
To: Andrei Zmievski
Cc: gtk-list gnome org
Subject: Re: return values of event handlers

Andrei Zmievski <andrei ispi net> writes:
> In event handlers, I assume the return value indicates whether the
> event should be propagated to other handlers or not?

Other widgets. All handlers for the current signal run regardless of
return value. If the return value _of the entire emission_ is FALSE,
then the event is propagated to the next parent widget. Note that the
return value of your handler may not be the return value of the entire

As Paul says, in GTK 2 a return of FALSE immediately ends the current
emission, but this is not the case in 1.2.


gtk-list mailing list
gtk-list gnome org

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