Subject: Re: The "great focus policy rewrite"

From: Dominik Vogt <[email-masked]>
Date: Sat, 10 Aug 2002 20:29:53 +0200

On Tue, Jul 23, 2002 at 03:21:39PM +0200, fvwm wrote:
> In the best tradition of the "great style flag rewrite" I'm now
> planning the "great focus policy rewrite" (GFPR) :-)  I'd like to
> introduce a whole lot of new options to fine tune focus policies.
> These may become sub options of a new "FocusPolicy" style instead
> of independent styles:
> ...

THe new code is in place.  In the current state it should behave
exactly like the old code, so please report any oddities, even
minor changes in behaviour.  I still have to write the code to
parse all the new styles, but the four old focus policies must
behave like they did before (ClickToFocus, NeverFocus, MouseFocus,
SloppyFocus).  Everything that is even remotely related to focus
handling should be tested thoroughly (even the sort order of the
internal window list).

I am aware of two minor incompatibilities:  ClickToFocus now works
only if no modifiers are pressed.  The same is true for NeverFocus
with windows like "textedit" that use the WM_TAKES_FOCUS protocol.

> Acquiring and releasing focus:
> 
>  1) Focus when pointer enters window
>  2) Unfocus when pointer leaves window
>  3) Focus when unfocused and client window clicked
>  4) Focus when unfocused and decorations clicked
>  5) Focus programmatically (with Focus or FlipFocus command)
>  6) Focus when application graps the focus.
> 
> Overriding application specified focus model:
> 
>  7) Lenience
> 
> Raising windows:
> 
>  8a) Raise when client window is clicked
>  8b) Raise when client window is clicked and window is unfocused
>  9a) Raise when decorations are clicked
>  9b) Raise when decorations are clicked and window is unfocused
> 
> Recyclicng raise/focus clicks:
> 
>  10) Pass focus clicks to application
>  11) Pass raise clicks to application
>  12) Allow bindings on focus clicks
>  13) Allow bindings on raise clicks
> 
> Configuring the buttons to use:
> 
>  14) Buttons to use for raise/focus clicks
>  15) Modifiers to use for raise/focus clicks
> 
> Currently,
> 
>   MouseFocus   = 1 + 2 + 5 + 6 + 12 + 13
>   SloppyFocus  = 1 + 5 + 6 + 12 + 13
>   ClickToFocus = 3 + 4 + 5 + 6 + 12 + 13
>   NeverFocus   = (forbid all)
>   Lenience     = 7
> 
>   ClickToFocusClickRaises = 8b + 9b
>   <other>FocusClickRaises = 8a + 9a
>   ...PassesClick = 10 + 11
> 
> The old styles can be translated to sets of other options.  New
> proposed focus policies:
> 
>   ManualFocus  = 5 + 6 + ...
>   ClickClientFocus = ClickToFocus - 4
> 
> Also, I suppose to add 3 and 4 to MouseFocus and Sloppy focus for
> the (unavoidable) situations where you end up with the pointer
> over and unfocused window.
> 
> All this not only allows a lot more flexibility for specific
> windows.  It also simplifies the code in HandeButtonPress()
> because we don't have to distinguish between abstract focus
> policies anymore.  Instead the switches can be made on a
> per-feature basis.
> 
> Do you have additional suggestions?  Did I miss anything that
> could be added (I left out auto raising when the pointer enters a
> window on purpose).

Bye

Dominik ^_^  ^_^

 --
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Dominik Vogt <[email-masked]>
Date: Sat, 10 Aug 2002 20:23:15 +0200

On Tue, Jul 23, 2002 at 11:18:05AM -0400, Bob Woodside wrote:
> On Tue, 23 Jul 2002 15:21:39 +0200
> Dominik Vogt <[email-masked]> wrote:
> 
> > planning the "great focus policy rewrite" (GFPR) :-)
> 
> 	Whew! I sense another round of grab code rewriting in the offing. Maybe this'll
> make the code a bit easier to follow and debug, and we can finally squash the
> old MouseFocus - MouseFocusClickRaises - doubleclick bug that I had to give up
> on last year. (It still exists, by the way, but the current versions of xfm and
> moxfm have my patches to work around it, and I don't know of any other common
> apps that have the problem. But I still have my old test programs.)

Okay, the old code is gone forever and the new focus/button
grabbing code is stateless (at the cost of cycling through the
window list more often than necessary).  Please try it out and
report everything you find.

Bye

Dominik ^_^  ^_^