Keybindings ignored : explanation needed

I thought that the keybindings were first caught by the window manager, and if not recognized, transferred to the application which has the focus.

I found the strange comportment of the application xbmc, that I don’t understand. I have a key binding which stops the sound on my machine.
There is no relation between this binding and the xbmc application.

If xbmc is in “window mode”, everything is all right, and my keybindings work.

If xbmc is in “full scrren mode” (no window containing xbmc) my bindings are ignored. I cannot stop the sound.

Does it mean that xbmc catches the bindings before fvwm ? What is the rule ?

Thank you for your help.

There could be several reasons why the key bindings won’t work:

  1. It is a unmanaged window. From the man page:
  1. Have you maximized xbmc to fullscreen with its’ own function? Some applications catch all keys in their own fullscreen mode. There exists a fullscreen possibility with FVWM, too:

[code]#-----------------------------------------------------------------------

This function maximize a window to fullscreen - no title, no buttons, no border

#-----------------------------------------------------------------------
DestroyFunc FuncMaximizeFullScreen
AddToFunc FuncMaximizeFullScreen

  • I ThisWindow (Maximized) WindowStyle Title, Borders
  • I TestRc (!Match) WindowStyle !Title, !Borders
  • I TestRc (!Match) Raise
  • I TestRc (!Match) UpdateStyles
  • I Maximize ewmhiwa

#-----------------------------------------------------------------------

F11 maximize active window to fullscreen and back

#-----------------------------------------------------------------------
Key F11 A M Pick FuncMaximizeFullScreen[/code]
2. An override-redirect window. I found this interesting mailing list thread about it.

  1. A missing style. I found this in a config (never know if it works but anyway):

# Not sure what this accomplishes, but it seems to be needed for some applications (e.g. acroread full screen) Style "*" MWMFunctions Style "*" MWMBorder Style "*" MWMDecor

– Thomas –

Thank you Thomas,

Yes, xbmc is in full screen mode with it’s own function. Thank you for the code and the possilbility to do this with fvwm.

What puzzles me is how this works in the background. In all my experiments, fvwm had the priority over the applications. Thus I thought that the procedures was:

  • X catches the event ( keypress, mouse…)
  • X sends the event to the window manager
  • The window manager checks if the event is bound to some action, and if necessary performs an action ( close a window…)
  • If the event is not known by the wm, then the event is forwarded by the wm to the application which has the focus.

It seems that this sequence is wrong, since the applcation can catch the event before the window manager sees it.
Thus it seems that the rule is:

  • X catches the event
  • X forwards the event to the wm or to the app, depending on some rule that are not clear to me. Most of the time, it is forwarded to the wm, but not always, as xbmc in fullscreen mode shows. Everything looks like xbmc in full screen mode talks directly to the X server, without any help from the wm.

If someone has some clues on what happens behind the scene and what is the algorithm performed by X when an event occurs, I would appreciate …