Re: GdkInput list not modifiable from GdkInput->function
- From: Owen Taylor <otaylor redhat com>
- To: Jan Kratochvil <short ucw cz>
- Cc: gtk-list redhat com
- Subject: Re: GdkInput list not modifiable from GdkInput->function
- Date: 09 Jan 1999 13:53:24 -0500
Jan Kratochvil <firstname.lastname@example.org> writes:
> Content-Type: text/plain; charset=us-ascii
> There is a strong disadvantage in current GTK1.0 releases (upto current 1.0.6)
> that handler of GdkInput is not allowed to modify GdkInput handlers list
> as otherwise list/memory corruption can occur. Under GTK1.1 it appears OK now as
> the whole GdkInput system has been rewritten.
> This is a major fault as there is no way to register/unregister new GdkInputs
> otherway. Maybe doing gtk_main_quit() and restarting gtk_main after each event
> but as I remember it had some disadvantage (not sure for now). This patch was
> written more than a year ago, see the timestamp :-) , but unfortunately it
> has somehow lost between.
> This patch has only A LITTLE performance cost as the GdkInput handlers list is
> copied before the processing starts.
First off, I rather doubt we'll make any more GTK+-1.0 releases,
so however it works now, it will work forever.
In GTK+-1.0 you can not may arbitrary modifications to
the input handler list, but you can safely:
- Remove an input from within itself
- Add new input handlers from within an input handler
The only unsafe thing to do is to remove one input handler from
] [Thread Prev