On 2017-07-28, Harald Dunkel wrote:

> AFAICS MouseFocus is the default for X. If you run a xterm instead 
> of fvwm, then it is easy to reproduce the problem: The Java app 
> still tries to enforce ClickToFocus, AFAICS.
>
I checked this with simple Java app in VirtualBox in bare Xorg session.

Java app grabs focus and hold it even if I move mouse over other windows.

I am not experienced with X internals debugging.

Found that xev -root can provide useful info:

  xev -root -event focus -event visibility -event structure -event property 
-event owner_grab_button

================================================================

In pure Xorg moving mouse over Java app do nothing.

On click inside app area:

  FocusOut event, serial 18, synthetic NO, window 0x16d,
      mode NotifyNormal, detail NotifyPointer
  FocusOut event, serial 18, synthetic NO, window 0x16d,
      mode NotifyNormal, detail NotifyPointerRoot
  FocusIn event, serial 18, synthetic NO, window 0x16d,
      mode NotifyNormal, detail NotifyNonlinearVirtual

Same 3 events if I start Java app and it get focus itself.

================================================================

OpenBox on Alt+TAB to Java app (it get keyboard input) and back to xterm:


  FocusIn event, serial 18, synthetic NO, window 0x16d,
      mode NotifyGrab, detail NotifyInferior
  FocusOut event, serial 18, synthetic NO, window 0x16d,
      mode NotifyGrab, detail NotifyInferior
  PropertyNotify event, serial 18, synthetic NO, window 0x16d,
      atom 0x162 (_NET_CLIENT_LIST_STACKING), time 1321279, state 
PropertyNewValue
  PropertyNotify event, serial 19, synthetic NO, window 0x16d,
      atom 0x168 (_NET_ACTIVE_WINDOW), time 1321286, state PropertyNewValue
  PropertyNotify event, serial 19, synthetic NO, window 0x16d,
      atom 0x168 (_NET_ACTIVE_WINDOW), time 1321288, state PropertyNewValue
  FocusIn event, serial 20, synthetic NO, window 0x16d,
      mode NotifyGrab, detail NotifyInferior
  FocusOut event, serial 20, synthetic NO, window 0x16d,
      mode NotifyGrab, detail NotifyInferior
  PropertyNotify event, serial 20, synthetic NO, window 0x16d,
      atom 0x162 (_NET_CLIENT_LIST_STACKING), time 1323771, state 
PropertyNewValue
  PropertyNotify event, serial 20, synthetic NO, window 0x16d,
      atom 0x168 (_NET_ACTIVE_WINDOW), time 1323772, state PropertyNewValue
  PropertyNotify event, serial 20, synthetic NO, window 0x16d,
      atom 0x168 (_NET_ACTIVE_WINDOW), time 1323774, state PropertyNewValue

FocusIn is on Alt+TAB menu.

================================================================

FluxBox on Alt+TAB to Java app (it get keyboard input) and back to xterm:

  FocusIn event, serial 18, synthetic NO, window 0x16d,
      mode NotifyGrab, detail NotifyInferior
  FocusOut event, serial 18, synthetic NO, window 0x16d,
      mode NotifyUngrab, detail NotifyInferior
  FocusIn event, serial 18, synthetic NO, window 0x16d,
      mode NotifyGrab, detail NotifyInferior
  PropertyNotify event, serial 18, synthetic NO, window 0x16d,
      atom 0x168 (_NET_ACTIVE_WINDOW), time 1367072, state PropertyNewValue
  FocusOut event, serial 19, synthetic NO, window 0x16d,
      mode NotifyUngrab, detail NotifyInferior
  FocusIn event, serial 19, synthetic NO, window 0x16d,
      mode NotifyGrab, detail NotifyInferior
  FocusOut event, serial 19, synthetic NO, window 0x16d,
      mode NotifyUngrab, detail NotifyInferior
  FocusIn event, serial 19, synthetic NO, window 0x16d,
      mode NotifyGrab, detail NotifyInferior
  PropertyNotify event, serial 19, synthetic NO, window 0x16d,
      atom 0x168 (_NET_ACTIVE_WINDOW), time 1370660, state PropertyNewValue
  FocusOut event, serial 19, synthetic NO, window 0x16d,
      mode NotifyUngrab, detail NotifyInferior

FocusIn is on Alt+TAB menu.

================================================================

Fvwm on Alt+TAB to Java app (it **doesn't** get keyboard input) and back to 
xterm:

  FocusIn event, serial 18, synthetic NO, window 0x16d,
      mode NotifyGrab, detail NotifyInferior
  PropertyNotify event, serial 18, synthetic NO, window 0x16d,
      atom 0x162 (_NET_CLIENT_LIST_STACKING), time 1479165, state 
PropertyNewValue
  FocusOut event, serial 18, synthetic NO, window 0x16d,
      mode NotifyUngrab, detail NotifyInferior
  PropertyNotify event, serial 18, synthetic NO, window 0x16d,
      atom 0x168 (_NET_ACTIVE_WINDOW), time 1479166, state PropertyNewValue
  PropertyNotify event, serial 18, synthetic NO, window 0x16d,
      atom 0x161 (_NET_CLIENT_LIST), time 1479166, state PropertyNewValue
  PropertyNotify event, serial 18, synthetic NO, window 0x16d,
      atom 0x162 (_NET_CLIENT_LIST_STACKING), time 1479166, state 
PropertyNewValue
  PropertyNotify event, serial 18, synthetic NO, window 0x16d,
      atom 0x226 (_WIN_CLIENT_LIST), time 1479166, state PropertyNewValue
  PropertyNotify event, serial 18, synthetic NO, window 0x16d,
      atom 0x168 (_NET_ACTIVE_WINDOW), time 1479167, state PropertyNewValue
  FocusIn event, serial 22, synthetic NO, window 0x16d,
      mode NotifyGrab, detail NotifyInferior
  PropertyNotify event, serial 22, synthetic NO, window 0x16d,
      atom 0x162 (_NET_CLIENT_LIST_STACKING), time 1487871, state 
PropertyNewValue
  FocusOut event, serial 22, synthetic NO, window 0x16d,
      mode NotifyUngrab, detail NotifyInferior
  PropertyNotify event, serial 22, synthetic NO, window 0x16d,
      atom 0x168 (_NET_ACTIVE_WINDOW), time 1487874, state PropertyNewValue
  PropertyNotify event, serial 22, synthetic NO, window 0x16d,
      atom 0x161 (_NET_CLIENT_LIST), time 1487874, state PropertyNewValue
  PropertyNotify event, serial 22, synthetic NO, window 0x16d,
      atom 0x162 (_NET_CLIENT_LIST_STACKING), time 1487874, state 
PropertyNewValue
  PropertyNotify event, serial 22, synthetic NO, window 0x16d,
      atom 0x226 (_WIN_CLIENT_LIST), time 1487874, state PropertyNewValue
  PropertyNotify event, serial 22, synthetic NO, window 0x16d,
      atom 0x168 (_NET_ACTIVE_WINDOW), time 1487875, state PropertyNewValue

FocusIn is on Alt+TAB menu.

-- 
http://defun.work/


Reply via email to