Re: FVWM Patch for Interaction problem with Java 7
Thomas Adam thomas at fvwm.org writes: Well, that patch isn't correct with respect to the fix I added to CVS. I was able to install branch-2_6 but the problem with Java 7 persists.
Re: FVWM Patch for Interaction problem with Java 7
John Faucett fauc...@lanl.gov writes: Thomas Adam thomas at fvwm.org writes: Well, that patch isn't correct with respect to the fix I added to CVS. I was able to install branch-2_6 but the problem with Java 7 persists. I should have reported that I tried CVS and saw the problem too. The window initially allows you to type in the window, but after a resize if won't accept focus until you move the pointer out of the window and then back in. I have not had time to investigate any deeper. -- Dan Espen
Re: FVWM Patch for Interaction problem with Java 7
My problem is a little different. If the application comes up and the mouse is not over the window, then you can type into the field as well as tab around the widgets. But once the mouse enters the window, even without trying to resize or move it, then the ability to focus in a text field goes away and never comes back.
Re: FVWM Patch for Interaction problem with Java 7
John Faucett fauc...@lanl.gov writes: My problem is a little different. If the application comes up and the mouse is not over the window, then you can type into the field as well as tab around the widgets. But once the mouse enters the window, even without trying to resize or move it, then the ability to focus in a text field goes away and never comes back. Not sure why I have these: Style * DecorateTransient,Lenience Style sun-awt-X11-XWindowPeer HandleWidth 0,NoTitle,Lenience Style sun-awt* NoLenience I can type in the initial window regardless of pointer location. Since the resource is sun-awt-X11-XFramePeer, looks like I'm using NoLenience. Yep, reissuing the first line, makes it so I can't focus the window at all, I can only type there when the window first comes up and the pointer is not in the window. So, using the last line shown above, helps, a little. -- Dan Espen
Re: FVWM Patch for Interaction problem with Java 7
Dan Espen despen at verizon.net writes: Style sun-awt* NoLenience ... So, using the last line shown above, helps, a little. Yes, that's it! Thanks very much.
Re: FVWM Patch for Interaction problem with Java 7
On Mar 18, 13, at 08:50 AM, Dan Espen wrote: /usr/java/latest - /usr/java/jre1.7.0_17 Haven't noticed any issues. Can you post a recipe for demonstrating the problem? -- Dan Espen See http://comments.gmane.org/gmane.comp.window-managers.fvwm.devel/5219-- that link has an example Java program. It's just that the patches proposed in that thread do not help. We are using Java 1.7.0_17-b02. But our problem goes beyond the resize issue-- the application may not ever allow the text field to get focus. There is a JDK bug that seems to be very similar: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8009224. The OpenJDK discussion for this is at http://openjdk.5641.n7.nabble.com/lt-AWT-Dev-gt-Bug-100300-JDK7-looses-focus-under-e16-window-manager-td120166.html. The implication of the March 13 message in that thread is that the window manager is not following an appropriate Global Active focus model. Whatever that means. John Faucett
Re: FVWM Patch for Interaction problem with Java 7
On Thu, Mar 14, 2013 at 10:57:19PM +, John Faucett wrote: Thomas Adam thomas at fvwm.org writes: On 4 February 2013 22:19, Schaaf, Jonathan P (GE Healthcare) jonathan.P.schaaf at ge.com wrote: Let me know what you think. I've committed a fix to CVS. Please try that (branch-2_6 in CVS). I applied the java_fix.patch to 2.6.5 (since I don't immediately know how to get the branch from CVS) and added BugOpt Java7FocusWorkaround True to the startup file. It didn't help. Well, that patch isn't correct with respect to the fix I added to CVS. -- Thomas Adam
Re: FVWM Patch for Interaction problem with Java 7
I'm happy to commit, providing I understand what it was for and why I suggested the change; it was almost a year ago, after all. Yeah, I am pulling this topic out of cold storage. Sorry about that. Besides the link that I just sent out, the other key piece of the conversation is probably this email: http://www.mail-archive.com/fvwm-workers@lists.math.uh.edu/msg15641.html It was a pretty short e-mail chain; I suggested just commenting out/deleting a chunk of code (which is understandably less than ideal), and based on feedback I converted the patch to a bug opt. The third iteration is the patch involving FP_IS_LENIENT that you (Thomas) suggested. Let me know what you think. Thanks, Jonathan
Re: FVWM Patch for Interaction problem with Java 7
On 4 February 2013 22:19, Schaaf, Jonathan P (GE Healthcare) jonathan.p.sch...@ge.com wrote: Let me know what you think. I've committed a fix to CVS. Please try that (branch-2_6 in CVS). -- Thomas Adam
Re: FVWM Patch for Interaction problem with Java 7
On Wed, Apr 11, 2012 at 06:23:23PM -0400, Schaaf, Jonathan P (GE Healthcare) wrote: I'm including a proposed patch (very simple - comment out the hack from 1999) as well as java code that can be used to reproduce the issue. Well, I don't like just mass-commenting out code. I suspect the original comment was more for Tk's benefit -- can you confirm that's still the case? It's not enough to just comment this out for Java's case. I might consider a BugOpts though. -- Thomas Adam
FVWM Patch for Interaction problem with Java 7
Greetings, I've spent the past few days hunting down a bug that involves an interaction between FVWM and Java 7. I can provide more detail for anyone who is curious, but here are the key points: a)Java version 7 creates a special FocusProxy window to get keyboard input. See http://www.docjar.com/html/api/sun/awt/X11/XFocusProxyWindow.java.html b)frame.c contains a work around and a comment that begins with the fated phrase For some reason. It seems like there was a bug in a ~1999 X server that doesn't exist in 2012 era Xorg. c)The code in frame.c takes focus away from java's Focus Proxy window and gives it to a java window that doesn't know what to do with keyboard input. I'm including a proposed patch (very simple - comment out the hack from 1999) as well as java code that can be used to reproduce the issue. Let me know if you have any thoughts. Thanks and best regards, Jonathan = diff -urNp fvwm-2.6.4/fvwm/frame.c fvwm-2.6.4-javafix/fvwm/frame.c --- fvwm-2.6.4/fvwm/frame.c 2011-10-15 05:34:28.0 -0500 +++ fvwm-2.6.4-javafix/fvwm/frame.c 2012-04-11 16:54:25.090804806 -0500 @@ -1938,14 +1938,25 @@ void frame_free_move_resize_args( } update_absolute_geometry(fw); frame_reparent_hide_windows(Scr.NoFocusWin); - if (mra-w_with_focus != None) - { - /* domivogt (28-Dec-1999): For some reason the XMoveResize() on -* the frame window removes the input focus from the client -* window. I have no idea why, but if we explicitly restore -* the focus here everything works fine. */ - FOCUS_SET(mra-w_with_focus); - } + + /* JPS: 11-Apr-2012: The code which is now commented out was introduced +* in 1999 with the following comment: +* +* For some reason the XMoveResize() on the frame window removes +* the input focus from the client window. I have no idea why, +* but if we explicitly restore the focus here everything works +* fine. +* +* if (mra-w_with_focus != None) +* { +* FOCUS_SET(mra-w_with_focus); +* } +* +* Unfortunately, the code doesn't work fine with Java 7's FocusProxy +* and has been commented out since it doesn't seem to be necessary +* when using modern Xorg. +*/ + if (mra-flags.do_update_shape) { /* unset shape */ = /* simpleproblem.java * * Install java 7 (either oracle or openjdk) * Run FVWM * compile with: javac simpleproblem.java * run with: java -cp . simpleproblem * * You will see that after resizing the window * text entry into the java app is impossible. */ import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JTextField; import java.awt.FlowLayout; public class simpleproblem extends JFrame { private JLabel explanation; private JTextField entrybox; private FlowLayout thelayout; public simpleproblem() { explanation = new JLabel(Resize the window then enter text:); entrybox = new JTextField(15); thelayout = new FlowLayout(); setLayout(thelayout); add(explanation); add(entrybox); } public static void main( String args[] ) { simpleproblem entertext = new simpleproblem(); entertext.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE ); entertext.setSize( 400,200 ); entertext.setVisible( true ); } }