summaryrefslogtreecommitdiffstats
path: root/src/newt/classes/jogamp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-08-30 16:46:36 +0200
committerSven Gothel <[email protected]>2011-08-30 16:46:36 +0200
commitbcea6b67bafaaabf2b1c43989fb13c0e4bf82c98 (patch)
tree0afdfb888c5f976a3982213e82b353ca548d7d64 /src/newt/classes/jogamp
parentbe7995cb57c4ffa1ea71f8fc292fc0b3df5de212 (diff)
Fix NEWT regression due to fix of bug 502, commit 9ed513e9a9616f6028084df4c650c8caf31ea49d
In case of exessive destroy/create (the NEWT reparenting test cases), some dpyEDT events are slipping through the event dispatcher. This fix uses issues more XSync on both Display connection in case of 'requestFocus' and 'closeWindow'. 'requestFocus' also uses the dpyEDT to issue the XSetInputFocus(..), since it's EDT related.
Diffstat (limited to 'src/newt/classes/jogamp')
-rw-r--r--src/newt/classes/jogamp/newt/driver/x11/X11Window.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/newt/classes/jogamp/newt/driver/x11/X11Window.java b/src/newt/classes/jogamp/newt/driver/x11/X11Window.java
index cbb43934b..57abd0b2d 100644
--- a/src/newt/classes/jogamp/newt/driver/x11/X11Window.java
+++ b/src/newt/classes/jogamp/newt/driver/x11/X11Window.java
@@ -107,7 +107,8 @@ public class X11Window extends WindowImpl {
}
protected void requestFocusImpl(boolean force) {
- requestFocus0(getDisplayHandle(), getWindowHandle(), force);
+ final X11Display display = (X11Display) getScreen().getDisplay();
+ requestFocus0(display.getHandle(), display.getEDTHandle(), getWindowHandle(), force);
}
@Override
@@ -133,7 +134,7 @@ public class X11Window extends WindowImpl {
int x, int y, int width, int height, boolean isVisible,
boolean parentChange, int fullScreenChange, int decorationChange);
private native void setTitle0(long display, long windowHandle, String title);
- private native void requestFocus0(long display, long windowHandle, boolean force);
+ private native void requestFocus0(long display, long displayEDT, long windowHandle, boolean force);
private native Object getRelativeLocation0(long display, int screen_index, long src_win, long dest_win, int src_x, int src_y);
private void windowReparented(long gotParentHandle) {