FVWM: Java applications don't get keyboard focus

Oleksandr Gavenko <[email protected]>
Newsgroups gmane.comp.window-managers.fvwm
Organization Oleksandr Gavenko <[email protected]>, http://defun.work/
Message-ID <[email protected]>
Commonly recommended:

  Style "sun-awt-X11-*" Lenience

make Fvwm border decoration colors as if window is active (defined Alt+F4
close proper window) but application ignore/doesn't receive keyboard input.

Direct click inside window (not on decoration!) bring keyboard focus to
application.

Most common annoyances are:

* loosing keyboard focus in main application after closing popup dialog box
  (like closing search box in editor)
* not getting keyboard focus after 'WindowList' (Alt+TAB)

I tested this program:

    public static void main(String[] args) {
        final JFrame frame = new JFrame("FrameDemo");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        JEditorPane editorPane = new JEditorPane();
        JScrollPane editorScrollPane = new JScrollPane(editorPane);
        editorScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        editorScrollPane.setPreferredSize(new Dimension(250, 145));
        editorScrollPane.setMinimumSize(new Dimension(10, 10));

        frame.add(editorScrollPane);

        frame.setPreferredSize(new Dimension(200, 150));

        frame.pack();
        frame.setVisible(true);
    }

with:

  $ fluxbox
  $ openbox

and switching between windows on Alt+TAB always return keyboard focus to
JEditorPane, while in Fvwm even with 'FPLenient' keyboard focus isn't received
until I clicked inside 'JEditorPane' area.

My settings are available at:

  http://hg.defun.work/skel/file/df82d859f907/.xinitrc
  http://hg.defun.work/skel/file/df82d859f907/.fvwm/config

It is painful to work with Java IDE with such Fvwm behavior. I live with this
issue since 2008 and already asked for help:

  https://www.mail-archive.com/[email protected]/msg02569.html

I can reproduce similar bug report in Java 8 and my Fvwm 1:2.6.7-2 (Debian):

  https://bugs.openjdk.java.net/browse/JDK-6541872

I am not sure what other WMs/DEs do in order to keep Java application working
but 'Lenience' should try to do the same.

-- 
http://defun.work/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.