[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [STUMP] Have focus follow move-window
From: |
Michael Raskin |
Subject: |
Re: [STUMP] Have focus follow move-window |
Date: |
Thu, 20 Oct 2011 23:37:14 +0400 |
<address@hidden>
<address@hidden>)
Mime-Version: 1.0
Content-type: text/plain; charset="UTF-8"
>"Michael Raskin" <address@hidden> writes:
>
>> <address@hidden>)
>> Mime-Version: 1.0
>> Content-type: text/plain; charset="UTF-8"
>>
>>>"Michael Raskin" <address@hidden> writes:
>>>> I recommend putting this into .stumpwmrc - so you will not lose it
>>>> across StumpWM updates. Whether it is a good change for mainline, I am
>>>> not sure...
>>>
>>>Yup, I put it into my .stumpwmrc. As for mainline, I would have found
>>>it a useful default behaviour and I'm sure that I'm not the only one
>>>that uses :sloppy.
>>
>> People who use :sloppy, please say what should move-focus do.
>>
>> Where should it put ratcursor? I would see the point of window center,
>> top-left corner and the middle of the top side. I guess that to make
>> this configurable (if needed), we'd need to know what would different
>> people like.
>
>I put the cursor in the top left corner after trying to place it in the
>middle. I couldn't get putting the cursor in the center to work
>reliably so I just stuck it in the left hand corner with an offset which
>seemed to work fine.
Your code relies on minimal frame size, I guess
And centering is not hard:
(defcommand
ratcenter () ()
"Center the mouse pointer in current frame"
(let*
((f (tile-group-current-frame (current-group)))
(ml (head-mode-line (current-head (current-group))))
(ml-height (if ml (mode-line-height ml) 0))
(cx (+ (frame-x f) (ash (frame-width f) -1)))
(cy (+ ml-height (frame-y f) (ash (frame-height f) -1))))
(ratwarp cx cy)))