Thomas Adam wrote:
2010/1/7 MK <[email protected]>:
On Thu, 07 Jan 2010 14:22:38 +0100
Zoilo Gomez <[email protected]> wrote:

It looks as though some applications (vlc, xine, etc) still pass the click
to the window which allows the client to accept focus.  Thus, although you
have "NeverFocus" set, it's not doing it's job properly.

I do not understand what you mean - in any case there is no mouse click
or so.
I would guess that if you are using, eg, SloppyFocus, even tho you do not have to click 
on the app, fvwm must pass a "focus" window event to the application, which is 
what would happen if you had to click to focus.

It handles the EnterNotify event on the window and sets focus accordingly.

Of course with NeverFocus this should not happen.  In fact, you *do not say 
that the VLC window takes focus* -- you just
say the Flashplayer window loses it.  Is that correct?  If so, I would say that 
is a choice made by the flashplayer -- when it
goes out of fullscreen, it gives up focus -- probably when recalculating the geometry, 
the mouse is considered to "leave".
Then it focusses again when it recieves the appropriate window event notification 
(when you move the mouse *back into* > the window).  The fact that the mouse is 
already in the window does not count, since we cannot be continually sending
this signal -- it only happens when the mouse enters (SloppyFocus) or you click 
inside.

No -- VLC really is taking focus, as are other applications like Xine
when NeverFocus is set.  FVWM propagates the click event to the
application which is setting focus on it, stealing it away from the
window which had the focus originally.  This has nothing to do with
the focus policy used -- if anything it's more noticeable with
SloppyFocus because you wouldn't ordinarily click the client window to
take focus.   FVWM receives the buttonpress event, works out whether
the window should handle focus or not, propagating the click events as
necessary to the application.  With XTerm, there are only
{Enter,Leave}Notify events as you'd expect, as well as KeymapNotify
events.  But with Xine and Vlc, PropertyNotify events are being
generated on my setup -- this shouldn't happen.

Zolio, if you set the "Unmanaged" style on the Vlc window temporarily,
this should sort  you out.

What do you mean by "temporarily" ?

If I test with the following configuration ....

Style * SloppyFocus
Style vlc StartsOnPage 0 0, !Title, !Handles, !Borders, StaysOnTop, Unmanaged Style flashplayer StartsOnPage 0 0, !Title, !Handles, !Borders, StaysOnBottom


.... VLC still grabs the focus when going from full-screen to normal-screen (xev -id 0x1000004) .....:

ReparentNotify event, serial 16, synthetic NO, window 0x1000004,
    event 0x1000004, window 0x1000006, parent 0x1000004,
    (0,0), override NO

MapNotify event, serial 16, synthetic NO, window 0x1000004,
    event 0x1000004, window 0x1000006, override NO

MapNotify event, serial 16, synthetic NO, window 0x1000004,
    event 0x1000004, window 0x1000004, override NO

VisibilityNotify event, serial 16, synthetic NO, window 0x1000004,
    state VisibilityUnobscured

FocusIn event, serial 16, synthetic NO, window 0x1000004,
    mode NotifyWhileGrabbed, detail NotifyNonlinear

KeymapNotify event, serial 16, synthetic NO, window 0x0,
keys: 4 0 0 0 0 0 0 0 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ConfigureNotify event, serial 16, synthetic NO, window 0x1000004,
    event 0x1000004, window 0x1000006, (0,0), width 512, height 288,
    border_width 0, above 0x0, override NO

FocusIn event, serial 16, synthetic NO, window 0x1000004,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 16, synthetic NO, window 0x0,
keys: 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0


.... whereas the VLC-window is no longer being mentioned in the debugging output of fvwm:

[fvwm][Echo]: enter window 0x60004f
[fvwm][Echo]: focus change 0x60004f


..... is all I get; no mentioning of "focus change 0x1000004" anymore!

The last line seems to mean that focus is being taken away from Flashplayer; at least it does no longer respond to key strokes.


How on earth can VLC still obtain the focus (see xev output above) if fvwm is apparently not involved anymore !?


Thank you and best regards,

Zoilo.


Reply via email to