On 19 March 2012 13:40, Mathieu Bonnet <math...@kawagama.net> wrote:
> Currently, it apparently changes to a mode to select a window to
> focus, probably a generic behavior when using window commands
> without clicking an actual program window (the focused window
> does not receive keyboard input anymore, the cursor changes to a
> cross, clicking a program window gives it focus, or clicking on
> root window again simply get us back to the beginning, with the
> focus on the window which had focus before clicking the root
> window, so it's only half the solution).

Well, this is harder because the focus policy can be per-window; there
is no global policy.  The best you can do is this:

diff --git a/fvwm/events.c b/fvwm/events.c
index e6a1a74..8f0ce7f 100644
--- a/fvwm/events.c
+++ b/fvwm/events.c
@@ -1794,6 +1794,7 @@ void HandleButtonRelease(const evh_args_t *ea)
                 */
                if (Scr.Root == te->xany.window)
                {
+                       DeleteFocus(True);
                        GNOME_ProxyButtonEvent(te);
                }
        }

The way this works is for any button press on the root window which
isn't bound to a button, will remove focus from the current window.
Which I assume does what you want with ClickToFocus?  It will apply to
other focus policies as well.

I'll try and embellish it some more if it's the behaviour you're
after, and commit to CVS.

-- Thomas Adam

Reply via email to