ratpoison-devel
[Top][All Lists]
Advanced

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

Re: [RP] patch: focus follows mouse (rat) and sloppy


From: Jeff Abrahamson
Subject: Re: [RP] patch: focus follows mouse (rat) and sloppy
Date: Thu, 2 Oct 2014 21:44:29 +0200

Add one more patch for focus policy: avoid propagating motion events over windows other than the root window.

This doesn't change behavior, but it does make the code (infinitesimally?) more efficient.


Jeff Abrahamson
+33 6 24 40 01 57
+44 7920 594 255    <-- only if I'm in the UK

http://jeff.purple.com/
http://blog.purple.com/jeff/


On 30 September 2014 15:51, Jeff Abrahamson <address@hidden> wrote:
Added patch for documentation.

I still need to test on my multihead box.

I am tempted to make non-manual focus policy require either warp or relbanish to be in effect, effectively setting warp if neither is set by the user. It's a bit counter-intuitive to use keyboard commands to move the focus, leaving the mouse far away, and then the first mouse movement causes a focus where the mouse is. If not, I think at least documenting the recommendation in the man and info pages would be a good service to the user. Any opinions?



On 29 September 2014 21:15, Jeff Abrahamson <address@hidden> wrote:
I've implemented (optional!) mouse-based focus in ratpoison. This is intended to replace sloppy.c. It has the following advantages:

  • It is implemented within ratpoison, so it is more efficient than invoking a new instance of the ratpoison binary on every crossing event.
  • It also implements focus-follows-mouse, which means that empty frames can be focused.

This is a relatively complex patch. I don't think I've damaged anything when the feature is off, but it wouldn't surprise me if I missed some edge case that I didn't think of when the feature is on. Please let me know if you are able to test this.

To turn it on, type

:focus_policy

The valid arguments are manual, sloppy, and ffm.

I have not updated the docs yet.

I am suspicious about transient windows, but so far it seems to work correctly. I just can't shake the feeling that I missed a detail there.

There is a technique for requesting events on a window but not on its subwindow. I have to find and fix this, because at the moment the root window requesting motion events in ffm mode means that all windows do. It's harmless but inefficient. And it makes the log longer.


Attachment: 0001-Implement-mouse-based-focus.patch
Description: Text Data

Attachment: 0002-Document-focus_policy.patch
Description: Text Data

Attachment: 0003-Do-not-propagate-motion-events-we-only-care-when-ove.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]