diff options
author | Jon TURNEY <jon.turney@dronecode.org.uk> | 2010-07-21 18:11:13 +0100 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2011-03-03 18:19:12 +0000 |
commit | 29192c2d3546c210e76f2a30c15fdb00969f5eac (patch) | |
tree | 0aa7c133d5a065fbfdc552e3ed2f5c09b1fb3299 | |
parent | 4829a782eb67675d5a9405a829cb5cf6597dbe36 (diff) |
Cygwin/X: Internal WM workaround for Java AWT bug
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
-rw-r--r-- | 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 c03d54adf..2d9fc516d 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) { |