[xmonad] Pointer follows focus (with patch)

Spencer Janssen sjanssen at cse.unl.edu
Fri Feb 22 17:13:15 EST 2008


On Fri, Feb 22, 2008 at 10:12:08AM +0900, Robert wrote:
> lithis wrote:
>> On Sat, 2008/02/16 17:31:11 -0600, Spencer Janssen wrote:
>>   
>>> On Sat, Feb 16, 2008 at 12:26:18PM -1000, lithis wrote:
>>>     
>>>> On Thu, 2008/02/07 15:35:48 -0600, Spencer Janssen
>>>> wrote:
>>>>       
>>>>> Have you considered using logHook?  It is executed
>>>>> after each windowset change,
>>>>> which should be sufficient.
>>>>>         
>>>> I tried this, but the pointer warps too often: any time
>>>> the
>>>> pointer enters a window, it immediately warps to the
>>>> specified position in the window. Also, the pointer
>>>> warps
>>>> any time the window title changes.
>>>>       
>>> So check the pointer position first, if it is contained in
>>> the focused window,
>>> do nothing, otherwise warp to whichever position.
>>>     
>>
>> I could’t figure out how to do this. Could anyone who knows
>> Haskell and X11 write a function that does this?
>>   
> This is what my previous patch did. I don't know how feasible it is in the 
> context of loghook but the original patch may give you some idea. I'm away 
> on holiday right now so I'll have a look when I get back if you don't get 
> it working first.
>
> Spencer: thanks for the suggestion; ideally I'd prefer it in contrib too. 
> If impossible in the current state I suppose I'll see how to make it 
> possible with minimal changes to the base code.

Yes, this should be very easy with the code you've already written, I'd
forgotten about it!  Something like:

    logHook = withFocused warp

With the defn. of warp from your patch.


Cheers,
Spencer Janssen


More information about the xmonad mailing list