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

making presentation actions work when no input expected

I have used DEFINE-PRESENTATION-ACTION to perform a side effect when the mouse
is clicked in certain windows, under certain conditions. (The windows are panes
of a frame; the effect is to change the frame configuration so the clicked-in
pane is the large pane. But this is only allowed under certain conditions.)

So I defined a presentation action roughly as follows:

  (T T
		 (TYPEP WINDOW 'my-window-pane-type)

This works as long as the currently selected window is accepting input. The T
from-type and to-type guarantees that it will work for any kind of input
context. The :BLANK-AREA T means that I don't have to mouse on a presentation
for it to work. This is all as I want it. The problem is, if the selected window
is not accepting input, clicking the mouse has no effect. But double-click-right
always brings up the system menu, even when the selected window is not accepting
input. How does this work? I wondered. I looked at the source; it seems like I
am doing the same thing. So how can I make it work?

Do I even want to define a presentation action? Or must I implement this at a
lower level, like a method for :MOUSE-CLICK?

Another question: What is the significance of the keyword GESTURE in the tester
function? Doesn't the tester run before any buttons are clicked? So how can it
know what to set GESTURE to?