Window focus problem with WINE and Alt-Tab in XFCE 4.0

Olivier Fourdan fourdan at xfce.org
Tue Dec 23 00:03:02 CET 2003


Eric,

If you are interested in trying it, you can grab a tarball here:

http://www.xfce.org/archive/test/xfwm4-4.0.3-cvs.tar.gz

I'm fairly curious to know if the fix works for you.

Cheers,
Olivier.

On Mon, 2003-12-22 at 23:05, Olivier Fourdan wrote:
> Hi Mike,
> 
> Humm, sorry. I did talk too fast in my last posts... As you rightly
> pointed out, xfwm4 was not sending the wm_takefocus client message to
> the app, so I've changed xfwm4 to do it right.
> 
> xfwm4 does send the wm_takefocus event now, but "notepad" still doesn't
> restore the focus to the edit area when using alt+tab.
> 
> I did try with latest metacity, and it's the same, focus is not send to
> the text area either when using alt-tab. focus is rightly restored when
> cllicking inside the window though.
> 
> The same happen when using KWin from KDE 3.1 too.
> 
> I still believe there is something wrong with Wine here.
> Notepad is from Wine 20030813, metacity version 2.6.3
> 
> PS: "notepad" is really the only wine app I have, that may or may not be
> a good test case.
> 
> Cheers,
> Olivier.
> 
> On Mon, 2003-12-22 at 05:59, Mike McCormack wrote:
> > Hi Oliver,
> > 
> > I have investigated this further, and I believe that Wine is doing the 
> > right thing, and that xfwm4 is doing the wrong thing.
> > 
> > xfwm4 is sending a FocusIn event to our window, yet we are using the
> > WM_TAKE_FOCUS protocol as specified by the ICCCM.  You need to send us a
> > WM_TAKE_FOCUS client message instead of a FocusIn event.
> > 
> > See: http://tronche.com/gui/x/icccm/sec-4.html#s-4.2.8
> > 
> > See below for a patch that shows the problem very clearly, and which can 
> > be used for a workaround when Wine is used with xfwm4.
> > 
> > Mike
> > 
> > 
> > > It *is* a WINE issue, focus is broken in wine. Simply let the WM manage
> > > WINE windows:
> > > 
> > > ; Allow the window manager to manage created windows
> > > "Managed" = "Y"
> > > 
> > > In your $HOME/.xine/config
> > > 
> > > Cheers,
> > > Olivier.
> > > 
> > > On Tue, 2003-09-30 at 18:01, Eric Pell wrote:
> > >> When running Windows applications through WINE while using XFCE the
> > >> window does not focus correctly when switching applications via
> > >> ALT-TAB.  It does appear to have the focus on the window you are
> > >> selecting but you cannot use the program WINE is running unless you
> > >> click on the window.  It appears that the focus is being given to the
> > >> window manager border and not the actual application.  This does not
> > >> appear to be a WINE issue because it works fine using Gnome or KDE. 
> > >> I'd really like to move XFCE into production for our end users here
> > >> because it is such a fast user interface but this issue is stopping me
> > >> from doing such.  I'm running XFCE 4.0 along with the latest version
> > >> of WINE (20030911) all running on Red Hat 9.
> > >> 
> > >> Any suggestions?
> > >> 
> > >> Thanks!
> > >> 
> > >> Eric Pell
> > 
> > Index: dlls/x11drv/event.c
> > ===================================================================
> > RCS file: /home/wine/wine/dlls/x11drv/event.c,v
> > retrieving revision 1.30
> > diff -u -r1.30 event.c
> > --- dlls/x11drv/event.c 5 Dec 2003 04:45:50 -0000       1.30
> > +++ dlls/x11drv/event.c 22 Dec 2003 04:36:25 -0000
> > @@ -494,7 +494,6 @@
> >           XSetICFocus( xic );
> >           wine_tsx11_unlock();
> >       }
> > -    if (use_take_focus) return;  /* ignore FocusIn if we are using take 
> > focus */
> > 
> >       if (!can_activate_window(hwnd))
> >       {
-- 
Olivier Fourdan - fourdan at xfce.org
   
   Interoperability is the keyword, uniformity is a dead end. 
   http://www.xfce.org






More information about the Xfce mailing list