[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Deselecting with the mouse grabbed
I have encountered a problem when grabbing the mouse that
perhaps someone else may have noticed and (hopefully) solved.
The problem arises when I have the mouse grabbed and then select
another window process (e.g. editor). The mouse remains grabbed in the
new window.
The code below demonstrates this. Doing SELECT A SELECT E puts
you in the editor where a double click fails to give the system menu.
Following this by SELECT A SPACE SELECT E puts you in the editor where
double clicks now work.
Perhaps one could define :BEFORE/:AFTER :DESELECT methods to
handle this? Maybe the only solution is to release the mouse. Any
ideas?
-Frank Reashore
;;; -*- MODE: LISP; SYNTAX: ZETALISP; PACKAGE: USER; BASE: 10 -*-
;;;*******************************************************************************************
(DEFVAR *WINDOW* NIL)
;;;*******************************************************************************************
(TV:ADD-SELECT-KEY #/A 'WINDOW "Test window" T)
;;;*******************************************************************************************
(DEFFLAVOR WINDOW
()
(TV:PROCESS-MIXIN
TV:WINDOW)
(:DEFAULT-INIT-PLIST
:EXPOSE-P T
:PROCESS '(START-WINDOW)))
;;;*******************************************************************************************
(DEFUN START-WINDOW (WINDOW)
(SETQ *WINDOW* WINDOW) ; pointer for emergencies
(SEND *WINDOW* :TEST)
(SEND *WINDOW* :DEACTIVATE))
(DEFMETHOD (WINDOW :TEST) ()
(TV:WITH-MOUSE-GRABBED-ON-SHEET NIL (SEND SELF :ANY-TYI)))
;;;*******************************************************************************************
-------