[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [STUMP] Mouse mode first shoot
From: |
Shawn Betts |
Subject: |
Re: [STUMP] Mouse mode first shoot |
Date: |
Sat, 25 Mar 2006 19:50:30 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (berkeley-unix) |
Philippe Brochard <address@hidden> writes:
> Shawn Betts writes:
>
>> Philippe Brochard <address@hidden> writes:
>>
>>> Hi everyboy,
>>>
>>> Here is a first shoot for the mouse mode :)
>>
>> This code looks pretty good!
>>
>> I'll have to give this patch some thought before I put it in CVS. But
>> I'm fairly certain its not a bad thing.
>>
> Yes, but I think that a better way is to change the
> parse-and-run-command function to accept mouse-event (like :frame,
> :string...) function insteed of using the global variable
> *current-event*.
Ah, you're saying clicking a frame would could supply a command with a
frame argument? Perhaps a :frame-click type that'd wait for the user
to click a frame?
I think I like that idea.
Another possibility that would perhaps work well for your mouse event
stuff is to incorporate mouse clicks like they are keypress like
emacs: <down-mouse-1>, etc. Then perhaps add a :click command argument
that would be an x,y coordinate of where the mouse was clicked.
So you could do something like this:
(define-stumpwm-command "click-focus-frame" (screen (click :click))
;; find the frame clicked in based on CLICK
)
(define-key *root-map* (kbd "<mouse-down-1>") "click-focus-frame")
or perhaps
(define-key *top-map* (kbd "C-<mouse-down-1>") "click-focus-frame")
-Shawn