Taskbar doesn't activate windows when focus follows mouse

Gleb Kozyrev gleb at gkoz.com
Fri Apr 11 04:16:12 CEST 2014


I've come upon an issue in recent xfce versions (posted here
activating a window from taskbar doesn't give it focus if 'focus
follows mouse' is enabled.
After asking on irc and looking at commit logs I believe this is an
unintended regression.

I suspect this piece of clientActivate() in xfwm's client.c needs
review and refactoring.
How click_to_focus relates to general window activation is unclear and
the code's assumptions appear to be violated.

        if (source_is_application ||
screen_info->params->click_to_focus || (c->type &
               It's a bit tricky here, we want to honor the activate
request only if:

               - The window use the _NET_ACTIVE_WINDOW protocol and
identify itself as an application,
               - Or we use the click to focus model, in that case we
focus the raised window anyway,
               - Or the request comes from an application that we
would not focus by default,
                 such as panels for example
            clientSetFocus (screen_info, c, timestamp, NO_FOCUS_FLAG);

With best regards, Gleb Kozyrev.

More information about the Xfce4-dev mailing list