From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22586 invoked by alias); 21 Jul 2010 19:11:23 -0000 Received: (qmail 22577 invoked by uid 22791); 21 Jul 2010 19:11:22 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from smtpout.karoo.kcom.com (HELO smtpout.karoo.kcom.com) (212.50.160.34) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 21 Jul 2010 19:11:17 +0000 Received: from 213-152-38-55.dsl.eclipse.net.uk (HELO byron) ([213.152.38.55]) by smtpout.karoo.kcom.com with ESMTP; 21 Jul 2010 20:11:15 +0100 From: Jon TURNEY To: cygwin-xfree@cygwin.com Cc: Jon TURNEY Subject: [PATCH] Cygwin/X: Internal WM workaround for Java AWT bug Date: Wed, 21 Jul 2010 19:11:00 -0000 Message-Id: <1279739474-5128-1-git-send-email-jon.turney@dronecode.org.uk> In-Reply-To: <4C474580.3090309@dronecode.org.uk> References: <4C474580.3090309@dronecode.org.uk> 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/msg00080.txt.bz2 Java applications using AWT on JRE 1.6.0 break with non-reparenting WMs AWT doesn't explicitly know about (See sun bug #6434227) XDecoratedPeer.handleConfigureNotifyEvent() only processes non-synthetic ConfigureNotify events to update window location if it's identified the WM as a non-reparenting WM it knows about (compiz or lookingglass) Rather than tell all sorts of lies to get XWM to recognize us as one of those, simply send a synthetic ConfigureNotify for every non-synthetic one Signed-off-by: Jon TURNEY --- hw/xwin/winmultiwindowwm.c | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+), 0 deletions(-) diff --git a/hw/xwin/winmultiwindowwm.c b/hw/xwin/winmultiwindowwm.c index 52921f3..9edde6e 100644 --- a/hw/xwin/winmultiwindowwm.c +++ b/hw/xwin/winmultiwindowwm.c @@ -1127,6 +1127,30 @@ winMultiWindowXMsgProc (void *pArg) } } } + else if (event.type == ConfigureNotify) + { + if (!event.xconfigure.send_event) + { + /* + Java applications using AWT on JRE 1.6.0 break with non-reparenting WMs AWT + doesn't explicitly know about (See sun bug #6434227) + + XDecoratedPeer.handleConfigureNotifyEvent() only processes non-synthetic + ConfigureNotify events to update window location if it's identified the + WM as a non-reparenting WM it knows about (compiz or lookingglass) + + Rather than tell all sorts of lies to get XWM to recognize us as one of + those, simply send a synthetic ConfigureNotify for every non-synthetic one + */ + XEvent event_send = event; + event_send.xconfigure.send_event = TRUE; + event_send.xconfigure.event = event.xconfigure.window; + XSendEvent(event.xconfigure.display, + event.xconfigure.window, + True, StructureNotifyMask, + &event_send); + } + } else if (event.type == PropertyNotify && event.xproperty.atom == atmWmName) { -- 1.7.1 -- 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/