From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9037 invoked by alias); 19 Jul 2010 16:28:39 -0000 Received: (qmail 9027 invoked by uid 22791); 19 Jul 2010 16:28:38 -0000 X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mail148.messagelabs.com (HELO mail148.messagelabs.com) (85.158.137.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 19 Jul 2010 16:28:30 +0000 X-VirusChecked: Checked X-Env-Sender: richard.evans@datanomic.com X-Msg-Ref: server-5.tower-148.messagelabs.com!1279556894!11854133!19 X-StarScan-Version: 6.2.4; banners=-,-,- Received: (qmail 24562 invoked from network); 19 Jul 2010 16:28:22 -0000 Received: from hostedexchange.hostedservice.com (HELO outlook.hostedservice2.net) (217.28.130.38) by server-5.tower-148.messagelabs.com with RC4-SHA encrypted SMTP; 19 Jul 2010 16:28:22 -0000 Received: from THHS2EXBE5X.hostedservice2.net (192.168.33.160) by thhs2e12ht01.hostedservice2.net (192.168.16.111) with Microsoft SMTP Server id 8.2.254.0; Mon, 19 Jul 2010 17:28:21 +0100 Received: from THHS2EXBE1X.hostedservice2.net ([192.168.16.22]) by THHS2EXBE5X.hostedservice2.net with Microsoft SMTPSVC(6.0.3790.1830); Mon, 19 Jul 2010 17:28:21 +0100 Content-Class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_NextPart_001_01CB275F.66DA8A0B" Subject: RE: Mouse offset when using java swing based gui applications Date: Mon, 19 Jul 2010 16:28:00 -0000 Message-ID: <974066EF77EEA44EB8AED6ADA05DBD0201FFE516@THHS2EXBE1X.hostedservice2.net> In-Reply-To: <4C447495.5000707@dronecode.org.uk> References: <4C3F0F49.5090506@dronecode.org.uk> <974066EF77EEA44EB8AED6ADA05DBD0201FFDEFB@THHS2EXBE1X.hostedservice2.net> <4C447495.5000707@dronecode.org.uk> From: Richard Evans To: , "Jon TURNEY" CC: Mailing-List: contact cygwin-xfree-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-xfree-owner@cygwin.com Reply-To: cygwin-xfree@cygwin.com Mail-Followup-To: cygwin-xfree@cygwin.com X-SW-Source: 2010-07/txt/msg00070.txt.bz2 ------_=_NextPart_001_01CB275F.66DA8A0B Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-length: 2426 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]=20 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=3D6434227 Thanks very much for the link. That bug report and related ones makes=20 interesting reading: I can see now that Swing/AWT problems are probably behind=20 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=20 in the JRE is claims to be fixed in. But looking at the horror-show that is=20 XWM.java [1], I can believe there are other problems, and the behaviour will=20 be different with different JRE versions. There's certainly scope for adding fixes/workarounds to the multiwindow mode=20 internal window manager so that AWT does the correct thing, but I guess what I=20 need to progress this is a test case I can easily run, and 'java -version' for=20 the platform the test case should be run on [1]=20 http://hg.openjdk.java.net/jdk7/jdk7/jdk/file/d58354a69011/src/solaris/c lasses/sun/awt/X11/XWM.java --=20 Jon TURNEY Volunteer Cygwin/X X Server maintainer ------_=_NextPart_001_01CB275F.66DA8A0B Content-Type: application/octet-stream; name="menus.java" Content-Transfer-Encoding: base64 Content-Description: menus.java Content-Disposition: attachment; filename="menus.java" Content-length: 1334 aW1wb3J0IGphdmEuYXd0LkRpbWVuc2lvbjsNCg0KaW1wb3J0IGphdmF4LnN3 aW5nLkpGcmFtZTsNCmltcG9ydCBqYXZheC5zd2luZy5KTWVudTsNCmltcG9y dCBqYXZheC5zd2luZy5KTWVudUJhcjsNCmltcG9ydCBqYXZheC5zd2luZy5K TWVudUl0ZW07DQppbXBvcnQgamF2YXguc3dpbmcuSlBhbmVsOw0KDQovKioN CiAqIFRlc3QgbWVudXMuDQogKg0KICogQGF1dGhvciBSaWNoYXJkIEV2YW5z DQogKi8NCnB1YmxpYyBjbGFzcyBtZW51cyB7DQoNCiAgLyoqDQogICAqIEVu dHJ5IHBvaW50Lg0KICAgKiANCiAgICogQHBhcmFtIGFyZ3MgTm9uZQ0KICAg Ki8NCiAgDQogIHB1YmxpYyBzdGF0aWMgdm9pZCBtYWluKFN0cmluZ1tdIGFy Z3MpIHsNCiAgICBKRnJhbWUgamZyYW1lID0gbmV3IEpGcmFtZSgiZnJhbWUi KTsNCiAgICBKTWVudUJhciBtYiA9IG5ldyBKTWVudUJhcigpOw0KDQogICAg Zm9yIChpbnQgaSA9IDE7IGkgPD0gNTsgaSsrKSB7DQogICAgICBKTWVudSBt ID0gbmV3IEpNZW51KCJNZW51ICIgKyBpKTsNCiAgICAgIA0KICAgICAgZm9y IChpbnQgaiA9IDE7IGogPD0gNTsgaisrKSB7DQogICAgICAgIEpNZW51SXRl bSBtaSA9IG5ldyBKTWVudUl0ZW0oIkl0ZW0gIiArIGkgKyBqKTsNCiAgICAg ICAgbS5hZGQobWkpOw0KICAgICAgfQ0KICAgICAgDQogICAgICBtYi5hZGQo bSk7DQogICAgfQ0KICAgIA0KICAgIGpmcmFtZS5zZXRKTWVudUJhcihtYik7 DQogICAgDQogICAgSlBhbmVsIGpwID0gbmV3IEpQYW5lbCgpOyAgICANCiAg ICBqcC5zZXRQcmVmZXJyZWRTaXplKG5ldyBEaW1lbnNpb24oNTAwLCA1MDAp KTsNCiAgICANCiAgICBqZnJhbWUuZ2V0Q29udGVudFBhbmUoKS5hZGQoanAp Ow0KICAgIGpmcmFtZS5zZXREZWZhdWx0Q2xvc2VPcGVyYXRpb24oSkZyYW1l LkVYSVRfT05fQ0xPU0UpOw0KICAgIA0KICAgIGpmcmFtZS5wYWNrKCk7DQog ICAgamZyYW1lLnNldFZpc2libGUodHJ1ZSk7DQogIH0NCg0KfQ0K ------_=_NextPart_001_01CB275F.66DA8A0B Content-Type: text/plain; charset=us-ascii Content-length: 223 -- 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/ ------_=_NextPart_001_01CB275F.66DA8A0B--