public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
From: Richard Evans <richard.evans@datanomic.com>
To: <cygwin-xfree@cygwin.com>, "Jon TURNEY" <jon.turney@dronecode.org.uk>
Cc: <jonas_winkler@gmx.de>
Subject: RE: Mouse offset when using java swing based gui applications
Date: Mon, 19 Jul 2010 16:28:00 -0000 [thread overview]
Message-ID: <974066EF77EEA44EB8AED6ADA05DBD0201FFE516@THHS2EXBE1X.hostedservice2.net> (raw)
In-Reply-To: <4C447495.5000707@dronecode.org.uk>
[-- Attachment #1: Type: text/plain, Size: 2477 bytes --]
I've attached a small test case which shows the menu problems.
Compile and run with:
javac menus.java
java menus
My server configuration is Windows 7 x64, Cygwin/X X server version
1.7.3, with dual 1920x1200 monitors. I ran the test case on Fedora 12
x86, using the latest released JRE 1.6u21.
The frame appears in one of two ways:
1. With the window frame off the screen top left - ie (0, 0) in the
content area is at (0, 0) on the display
Or
2. With the window frame showing, but as soon as I try to select a menu,
the windows shifts to the position in 1.
When the frame as off screen, (as in 1. above), the menus work fine; If
I move the window elsewhere on the screen, the menus can be opened but
you can't select any item.
This menu behaviour has been seen for all versions of JDK 1.6 as far as
I remember; it certainly happens with 1.6u3 and 1.6u4.
Hope this helps
Richard
-----Original Message-----
From: Jon TURNEY [mailto:jon.turney@dronecode.org.uk]
Sent: 19 July 2010 16:52
To: cygwin-xfree@cygwin.com; jonas_winkler@gmx.de; Richard Evans
Subject: Re: Mouse offset when using java swing based gui applications
On 15/07/2010 15:38, Richard Evans wrote:
> There's a bug reported against Java relating to this, with some more
> details. It claims to be fixed, but it still occurs. There's a small
> test case in the bug report. It makes many Java UI applications
> unusable with Cygwin/X.
>
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6434227
Thanks very much for the link. That bug report and related ones makes
interesting reading: I can see now that Swing/AWT problems are probably
behind
a few problem reports of this kind we've had.
I tried out the test case in that particular bug, and it does seem to be
fixed
in the JRE is claims to be fixed in. But looking at the horror-show
that is
XWM.java [1], I can believe there are other problems, and the behaviour
will
be different with different JRE versions.
There's certainly scope for adding fixes/workarounds to the multiwindow
mode
internal window manager so that AWT does the correct thing, but I guess
what I
need to progress this is a test case I can easily run, and 'java
-version' for
the platform the test case should be run on
[1]
http://hg.openjdk.java.net/jdk7/jdk7/jdk/file/d58354a69011/src/solaris/c
lasses/sun/awt/X11/XWM.java
--
Jon TURNEY
Volunteer Cygwin/X X Server maintainer
[-- Attachment #2: menus.java --]
[-- Type: application/octet-stream, Size: 984 bytes --]
import java.awt.Dimension;
import javax.swing.JFrame;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JPanel;
/**
* Test menus.
*
* @author Richard Evans
*/
public class menus {
/**
* Entry point.
*
* @param args None
*/
public static void main(String[] args) {
JFrame jframe = new JFrame("frame");
JMenuBar mb = new JMenuBar();
for (int i = 1; i <= 5; i++) {
JMenu m = new JMenu("Menu " + i);
for (int j = 1; j <= 5; j++) {
JMenuItem mi = new JMenuItem("Item " + i + j);
m.add(mi);
}
mb.add(m);
}
jframe.setJMenuBar(mb);
JPanel jp = new JPanel();
jp.setPreferredSize(new Dimension(500, 500));
jframe.getContentPane().add(jp);
jframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
jframe.pack();
jframe.setVisible(true);
}
}
[-- Attachment #3: Type: text/plain, Size: 223 bytes --]
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ: http://x.cygwin.com/docs/faq/
next prev parent reply other threads:[~2010-07-19 16:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-13 21:57 Jonas Winkler
2010-07-15 13:38 ` Jon TURNEY
2010-07-15 14:41 ` Richard Evans
2010-07-19 15:51 ` Jon TURNEY
2010-07-19 16:28 ` Richard Evans [this message]
2010-07-21 19:07 ` Jon TURNEY
2010-07-21 19:11 ` [PATCH] Cygwin/X: Internal WM workaround for Java AWT bug Jon TURNEY
2010-07-22 8:39 ` Mouse offset when using java swing based gui applications Richard Evans
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=974066EF77EEA44EB8AED6ADA05DBD0201FFE516@THHS2EXBE1X.hostedservice2.net \
--to=richard.evans@datanomic.com \
--cc=cygwin-xfree@cygwin.com \
--cc=jon.turney@dronecode.org.uk \
--cc=jonas_winkler@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).