Discussion:
FVWM: Java application and focus.
Oleksandr Gavenko
2014-01-03 23:27:52 UTC
Permalink
I never able to get focus properly work with Java applications.

Currently I work with ~/.fvwm/config (striped for debug purpose):

Module FvwmDebug -m -1

Style * SloppyFocus
Style * FPClickToFocus, FPClickDecorToFocus, FPClickIconToFocus

and ~/.xsession:

fvwm -cmd "Module FvwmM4 -m4-prefix -m4-prefix-defines $HOME/.fvwm/config" &

Alt+TAB switching from application from another page didn't give keyboard
focus to NetBeans (Java application).

Also closing transient NetBeans dialog didn't give keyboard focus to NetBeans.

Log for latest statement in the end of letter... I don't understand this
portion from log:

M_FOCUS_CHANGE <--- XXX WTF???
win_id 0x0000000

When I issue:

Style sun-awt-X11-* Lenience

command NetBeans doesn't react on key pressing at all, but ~/.xsesstion-error log:

M_FOCUS_CHANGE <-- move pointer over Netbeans and press keys
win_id 0x2800034
frame_id 0x0c00147
flip False
focus_fg rgb:00/00/00
focus_bg rgb:be/be/be
M_FOCUS_CHANGE <-- move pointer back to Emacs
win_id 0x2200019
frame_id 0x0c00169
flip False
focus_fg rgb:00/00/00
focus_bg rgb:be/be/be

Similar behavior describer in:

http://thread.gmane.org/gmane.comp.window-managers.fvwm.general/3374/focus=3377
FVWM: focus problem with netbeans (2006)

http://thread.gmane.org/gmane.comp.window-managers.fvwm.devel/3682/focus=3684
java GUIs? Oh no, not again! (2007)

https://bugs.openjdk.java.net/browse/JDK-6541872
Focus problem with FVWM window manager, XToolkit
https://bugs.openjdk.java.net/browse/JDK-6542206
Parent window doesn't get focus after a child window is
dismissed

and other:

https://bugs.openjdk.java.net/issues/?jql=text%20~%20%22fvwm%22

It's sadly to read Java developers conclusion:

I see the same focus bug when running the test with JDK 1.5.0_08 on linux.
Thus, the problem is with XToolkit. My guess is that FVWM doesn't handle
WM_TAKE_FOCUS correctly of doesn't use it at all. I doubt this issue will
ever be fixed as FVWM is pretty old and unsupported window manager.



Please tell me how it possible to get:

M_FOCUS_CHANGE <--- XXX WTF???
win_id 0x0000000

and what I need to learn and which tools to use in order to debug problem at
source code level (I don't read any X Window protocols bodies and never debug
X applications).

================================================================
==== Opening and closing dialog in NetBeans ===
================================================================

M_FOCUS_CHANGE <--- Switch to Netbeans by moving mouse over it
win_id 0x2800034
frame_id 0x0c00147
flip False
focus_fg rgb:00/00/00
focus_bg rgb:be/be/be
M_ADD_WINDOW <--- Ctrl+Shift+F - open NetBeans search dialog
win_id 0x2800247
frame_id 0x0c00296
ptr 140734495671576
frame_x 43
frame_y 347
frame_width 522
frame_height 370
desk 2
layer 4
win_width 0
win_height 0
resize_width_inc 1
resize_height_inc 1
minimum_width 1
minimum_height 1
maximum_width 1
maximum_height 1
icon_title_id 0x0007fff
icon_image_id 0x0007fff
gravity 0
fore_color rgb:00/00/00
back_color rgb:00/00/01
ewmh_layer 13882323
ewmh_desktop 6908265
ewmh_window_type 0
title_height 0
border_width 0
dummy_zero_1 0
dummy_zero_2 0
window_flags [window flags are not supported yet]
M_WINDOW_NAME
win_id 0x2800247
frame_id 0x0c00296
ptr 36073648
name "Find in Projects"
M_VISIBLE_NAME
win_id 0x2800247
frame_id 0x0c00296
ptr 36073648
name "Find in Projects"
M_RESTACK
win_id 0x2800247
frame_id 0x0c00296
ptr 36073648
low_windows (2)
[1] win_id 0x2800034
[1] frame_id 0x0c00147
[1] ptr 36031712
[2] win_id 0x2200019
[2] frame_id 0x0c00169
[2] ptr 36051344
M_RESTACK
win_id 0x160000b
frame_id 0x0c0017e
ptr 36058816
low_windows (6)
[1] win_id 0x2800247
[1] frame_id 0x0c00296
[1] ptr 36073648
[2] win_id 0x2800034
[2] frame_id 0x0c00147
[2] ptr 36031712
[3] win_id 0x2200019
[3] frame_id 0x0c00169
[3] ptr 36051344
[4] win_id 0x1a00075
[4] frame_id 0x0c00158
[4] ptr 36041696
[5] win_id 0x0a0000f
[5] frame_id 0x0c0013c
[5] ptr 36022208
[6] win_id 0x1200012
[6] frame_id 0x0c00127
[6] ptr 36018688
M_ICON_NAME
win_id 0x2800247
frame_id 0x0c00296
ptr 36073648
name "Find in Projects"
M_RES_CLASS
win_id 0x2800247
frame_id 0x0c00296
ptr 36073648
name "NetBeans IDE 7.4"
M_RES_NAME
win_id 0x2800247
frame_id 0x0c00296
ptr 36073648
name "sun-awt-X11-XDialogPeer"
M_MINI_ICON
win_id 0x2800247
frame_id 0x0c00296
ptr 36073648
width 16
height 16
depth 24
icon_id 0x0c002a3
mask 0
alpha 12583588
name "ewmh_mini_icon"
M_MAP
win_id 0x2800247
frame_id 0x0c00296
ptr 36073648
M_MAP
win_id 0x2800247
frame_id 0x0c00296
ptr 36073648
M_FOCUS_CHANGE
win_id 0x2800247
frame_id 0x0c00296
flip False
focus_fg rgb:00/00/00
focus_bg rgb:be/be/be
M_DESTROY_WINDOW <--- Close dialog by ESC key press.
win_id 0x2800247
frame_id 0x0c00296
ptr 36073648
M_FOCUS_CHANGE <--- XXX WTF???
win_id 0x0000000
frame_id 0x0000000
flip False
focus_fg rgb:00/00/00
focus_bg rgb:be/be/be
M_FOCUS_CHANGE <--- Go back to Emacs by moving pointer through
inactive Netbean and RootWindow
win_id 0x2200019
frame_id 0x0c00169
flip False
focus_fg rgb:00/00/00
focus_bg rgb:be/be/be
--
Best regards!
Continue reading on narkive:
Search results for 'FVWM: Java application and focus.' (Questions and Answers)
3
replies
What is Linux?
started 2007-06-21 07:43:04 UTC
software
Loading...