[comp.windows.x] Event handling in CLX ...

natraj@razor.ACA.MCC.COM (Natraj Arni) (09/03/88)

Hi!
How do I discard events in CLX ? I have several windows 
mapped on the screen representing various buttons and commands.
Each of these windows also looks out for "enter-window" and 
"leave-window" events among other events. When I move the mouse
across the screen to position it on a particular button, all the
buttons in the path of the mouse note the two events and this slows
down the response. Is there any way of notifying an "enter-window"
event to take place only if the mouse has been in the window for
some time 't' ? I have hightlight and unhighlight functions as 
responses to the above mentioned events. It is painful when you
have about twenty windows highlighting and unhighlighting. I think
there should be a way to discard all events except the last two or so.

-- natraj 

RWS@zermatt.lcs.mit.EDU (Robert Scheifler) (09/03/88)

    Date: 2 Sep 88 19:48:46 GMT
    From: cs.utexas.edu!milano!pp!razor!natraj@ohio-state.arpa  (Natraj Arni)

    Is there any way of notifying an "enter-window"
    event to take place only if the mouse has been in the window for
    some time 't' ?

No.  You will have to program this functionality yourself.

natraj@razor.ACA.MCC.COM (Natraj Arni) (09/20/88)

Hi,
Is it possible to change the event-mask associated with
a window at run time ? The window (drawable) structure
does not have the mask field.

At run time, I want to suppress certain events. One solution
is to 'go' into a separate event-handler loop, where the
undesired events are not handled and then jump back into
the main event handler when those events are desired again.
This is slow. Any suggestions ? Thanks.

natraj

-- 
-Natraj Arni
ARPA: natraj@mcc.com
UUCP: {ihnp4,seismo,ctvax}!ut-sally!im4u!milano!hi3.aca.mcc.com!natraj

Kimbrough@dsg.csc.ti.COM (Kerry Kimbrough) (09/20/88)

   > Is it possible to change the event-mask associated with
   > a window at run time ? 

Try (setf (window-event-mask window) (make-event-mask :button-press ...)).