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/fvwm@fvwm.org/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/

Reply via email to