This is the mail archive of the
cygwin-xfree
mailing list for the Cygwin XFree86 project.
[PATCH] Cygwin/X: Internal WM workaround for Java AWT bug
- From: Jon TURNEY <jon dot turney at dronecode dot org dot uk>
- To: cygwin-xfree at cygwin dot com
- Cc: Jon TURNEY <jon dot turney at dronecode dot org dot uk>
- Date: Wed, 21 Jul 2010 20:11:14 +0100
- Subject: [PATCH] Cygwin/X: Internal WM workaround for Java AWT bug
- References: <4C474580.3090309@dronecode.org.uk>
- Reply-to: cygwin-xfree at cygwin dot com
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 <jon.turney@dronecode.org.uk>
---
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/