Gvim window activated by mutt doesn't gain focus

Paulo Marcel Coelho Aragao marcelpaulo+l at gmail.com
Tue Jan 10 13:59:06 CET 2006


Olivier FOURDAN wrote on Jan, 10:
> Hi

> > I don't have KDE installed right now (thanks to Xfce !), but I'm pretty the 
> > window got focus with kwin. It does with fluxbox. So it looks like some window 
> > managers do it, some don't. The question is then: should they ? 

> It's not that simple. GVIM use the EWMH standard NET_ACTIVE_WINDOW to active its existing window. 

> http://standards.freedesktop.org/wm-spec/wm-spec-1.3.html#id2506353

> That standard has changed recently and now accepts an event time stamp as described in the page above. When such a timestamp is provided, it helps determining if the window should be focused. A time stamp that is too old is to be ignored.

> Older window managers don't support the time stamp mechanism in NET_ACTIVE_WINDOW and therefore always focus the window. xfwm4 supports the new standard and uses the timestamp, as do recent versions of metacity and kwin which exhibit the same behaviour as xfwm4.

> The problem is that gvim passes an timestamp that is too old (ie the XServer time has changed since the event was originally emitted), and xfwm4 correctly doesn't focus the window. That's the normal and expected behaviour. gvim could not pass a timestamp (remember, it's optional, and only supported window managers that support the latest verion of the standard) and that would always focus the window.

> > [...]
> > focus ? I can't think of a mutt/gvim scenario where I'd create a new mail 
> > editing buffer if I didn't want to edit it (give it focus). It's the least 
> > surprising thing to be done.

> I understand you point, but there is nothing I can do about that. Maybe you 
> could ask the GVIM people to pass a 0 as "source indication" (as explained 
> on the given link, clients using older version of this spec use 0 as source 
> indication, see the section called "Source indication in requests" for 
> details), so that no timestamp gets involved in the NET_ACTIVE_WINDOW focus 
> mechanism.

Thanks for the detailed explanation, Olivier. It makes sense. I guess I have 
to file a bug report on gvim and paste a link to this thread for more details.

Once again, I'm happily surprised at how responsive you Xfce guys are. I had a 
rough time with my very first posting here, but otherwise you're all very 
responsive and helpful. It feels safe to use Xfce with you guys there. And 
Xfce is indeed a great desktop. I repent not having switched earlier.

Paulo



More information about the Xfce mailing list