Re: [gtk-list] Re: gdk_io_* clarification



> > #ifndef WORKS
> >     gdk_input_remove(tag);
> >     gdk_input_add_full(fd, GDK_INPUT_READ, ioready, NULL,
> >                        dnotify);
> > #endif
> >     gdk_input_remove(tag);
> >     gdk_input_add_full(fd, GDK_INPUT_READ|GDK_INPUT_WRITE, ioready, NULL,
> >                        dnotify);
> 
> Suprisingly enough, this actually works fine for me.
>
> But I wouldn't expect it to with two calls to 
> gdk_input_remove() on the same tag. (that would cause
> messed up refcounts for sure...)
> 
> Is that from the original, or is that a red herring?

	It's from the original.  As I said in the last post, my
handler reset the notifications and then starts up the next request,
which also sets the file descriptors to get notification of whatever
it needs, so you tend to get these things in lots of two.  I can see a
way to work around this, but I'm pointing it out as a probable bug.

	I guess I just write weird code ;-)

	If this is too difficult to fix, can I suggest that a warning
against lots of fiddling around with gdk_input_* in handlers is
mentioned in the tutorial/documentation.


--
James Macnicol
j-macnicol@adfa.edu.au



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