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

Re: Pointing at a window.



> Is there any way to click in an unselected window without
> causing that window to become the selected window?  I have an
> application that displays stuff in several windows.  The user can
> interact with the displayed stuff using the mouse to point at things,
> mark regions, etc.  However, there's no reason to ever make the window
> clicked on be the selected window.  It just causes confusion.
> 
> This is a problem with my point-at-a-window function above.  Clicking
> on the window to choose it, also selects it.

Have you tried shadowing WINDOW-SELECT?

	(defobject *unselectable-window* *window*)
	(defobfun (window-select *unselectable-window*) ()
	  )

You could also have your WINDOW-SELECT set a global variable to record
which window was clicked on.  That will let you keep track of which
window the user pointed at (relating to your first question, not quoted
above.)

However, I think you're trying to solve the wrong problem.  There's a
window variable called WINDOW-DO-FIRST-CLICK.  It eliminates the
confusion of having your first click "eaten" by window select.  I always
set this to be true for any non-document-type window classes.

Not to pick on Kevin, but: The MACL interface to the window system is
full-featured (more or less) and quite flexible.  IMHO, with one or two
exceptions, if you find yourself calling traps directly in your
interface code, you're probably doing something wrong.

Wayne();