Window manager question (Motif menus)

Olivier Fourdan fourdan at xfce.org
Sat Aug 30 01:13:50 CEST 2003


Bernhard,

It's a bit complicated to explain... but I'll try.

Some menu in some older Motif apps generate FocusOut events on the main
window. The fact is that the focus is really changed. In all WM. But not
all WM show that on the frame, that's the difference.

I could ignore those when the event mode is NotifyWhileGrabbed and that
indeed fix that particular problem. But because there is no way to
distinguish between those events and "real" meaningfull FocusOut events
generated in multi screen mode (not to be confused with Xinerama), that
particular fix would have side effects when using multi screen mode.

Let's say you have one of those app running on one screen, with such a
menu opened, and another app on the second screen decide to map a window
(an alert popup, for example), the new window on the second screen will
be considered as focused (in default "focus new window" mode) but it
won't be for real, as the focus is currently grabbed by the menu on
first screen. When the menu close down, the other window will still be
considered focused by xfwm4 because the FocusOut event has been ignored
(because we ignore FocusOut events when mode is NotifyWhileGrabbed to
avoid the redraw unfocused), but the first app on the first also shows
focused! That's because there no way to tell if a FocusOut event is
caused by a menu or a real app on another screen.

All this to explain that I believe that Kwin, metacity and xfwm4 are
right on this (all three exhibit the same behaviour). I could change
that in xfwm4, but this can have side effects, a lot worse that just
redrawing the frame unfocused.

Hope that makes sense for you,

Cheers,
Olivier.

On Thu, 2003-08-28 at 23:15, Bernhard Walle wrote:
> Hello,
> 
> in some Motif applications the window gets unfocused while opening a
> menu, e.g. the right-click-menu of Acrobat Reader or in Eclipse on a
> right-click-*sub*menu. After the menu is closed the focus is set back.
> With focus I mean the title bar highlighted blue.
> 
> Is this intended, a bug of Motif or a flea in xfwm4? Other window
> managers behave different, kwin behaves a bit like xfwm4, icewm does not
> unfocus.
> 
> 
> Regards,
> Bernhard
-- 
Olivier Fourdan - fourdan at xfce.org
   
   Interoperability is the keyword, uniformity is a dead end. 
   http://www.xfce.org






More information about the Xfce4-dev mailing list