Re: volunteer needed: event return values
- From: Tim Janik <timj gtk org>
- To: Gtk+ Developers <gtk-devel-list gnome org>
- Subject: Re: volunteer needed: event return values
- Date: Sat, 17 Feb 2001 14:34:56 +0100 (CET)
On 17 Feb 2001, Owen Taylor wrote:
>
> The way event handlers are supposed to work is that
> there return value is a boolean:
>
> TRUE - the handler handled the event, no processing necessary
> FALSE - the handler didn't handle the event, continue processing
>
> This applies both to the default handlers stored in the
> class structure, and to connected signal handlers.
>
> Unfortunately, a large fraction of GTK+'s event handlers are
> broken and just always return FALSE.
>
>
> Getting this right will be more even more important for GTK+-2.0
> because we plan to change things so that a TRUE return not
> only prevents propagation of the event to parent widgets, but
> also stops the current signal emission, so other handlers
> connected to the current widget.
...so other handlers connected to the widget's event signal which
are currently being executed regardless of the retrun value of the
preceeding handlers, will not be executed with the new code anymore
as soon as a preceeding handler returned TRUE.
> So, the task is:
>
> Go through all the GTK+ widgets
>
> - Look for handlers for event signals.
> - Determine if they are correctly returning TRUE when
> handling events.
> - Make up a patch fixing cases which are definitely wrong.
please submitt the patch in unified diff format and please supply
patches in reasonably small chunks so we don't end up manually
applying one huge kilo lines patch that results in lots of
conflicts after two days of usual CVS commits.
> - Make a list of dubious cases that can be checked over
> by people who know the widgets in detail.
>
> It's a reasonably big job - I'd guess it's probably 15-20 so
> hours of work, but quite important to get done.
>
> If anybody is interested in doing this, (or doing this for
> some subset of the GTK+ widgets), please follow up here.
>
> Thanks,
> Owen
>
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]