Notifier Problem under Xview

Ralph Martin ralph at computing-maths.cardiff.ac.uk
Tue Jan 29 01:01:52 AEST 1991


I have a program written with xview to draw fractals, and it seem to me
that the notifier is not sending events to my program when it should. I'll
only give a summary of the program here, but if anyone wants the full
source I'll be happy to send it.

What the program does is
------------------------

Setup a base frame, a CMS, a canvas, and a panel with some sliders and a
quit button. There's a procedure to respond to mouse clicks in the canvas
paint window.

The base frame is made visible, then I create a Pixmap for backing store
to refresh the paint window from with a repaint proc. I then call
notify_dispatch and Xflush.

The program then runs in a tight loop, generating pixels, and writing them
one at a time to the canvas paint window and the pixmap. I also call
notify_dispatch once per pixel.

After all the pixels have been generated, I then call notify_start.

What the problem is
-------------------

If I refresh the screen (using refresh under utilities in the root menu)
sometimes my program seems to get asked to repaint, and sometimes it
doesnt.  Also, sometimes, if I click in the paint window, sometimes my
procedure for handling gets called and sometimes it doesnt. Sometimes,
just clicking in the background of the panel will then cause the events
which should have been processed earlier then to be processed. Basically,
its as if somehow, notify_dispatch is not always sending the events when
they happen, but is holding on to them, and only sending them later when
further events have pushed it into action.

Question
--------

Has anyone else seen this behaviour? Can anyone make suggestions as to
what is causing it? It seems to be an xview or notifier bug to me.

Ralph



More information about the Comp.sys.sun mailing list