diff options
author | Sven Gothel <[email protected]> | 2012-04-18 21:50:14 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-04-18 21:50:14 +0200 |
commit | 73fbf6b19732c76b69f00697a399a594c121c577 (patch) | |
tree | fab0738923b2537e4d945d6aac28662e0c42fd23 /src/newt | |
parent | 1152d3c3cb5d13b4e5543387bff7a73e78e27a71 (diff) |
NEWT/Android: Fix requestFocus() - run impl. on UI thread.
Diffstat (limited to 'src/newt')
-rw-r--r-- | src/newt/classes/jogamp/newt/driver/android/AndroidWindow.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/newt/classes/jogamp/newt/driver/android/AndroidWindow.java b/src/newt/classes/jogamp/newt/driver/android/AndroidWindow.java index d2b35136e..4547db831 100644 --- a/src/newt/classes/jogamp/newt/driver/android/AndroidWindow.java +++ b/src/newt/classes/jogamp/newt/driver/android/AndroidWindow.java @@ -278,8 +278,12 @@ public class AndroidWindow extends jogamp.newt.WindowImpl implements Callback2 { protected void requestFocusImpl(boolean reparented) { if(null != androidView) { Log.d(MD.TAG, "requestFocusImpl: reparented "+reparented); - androidView.requestFocus(); - androidView.bringToFront(); + androidView.post(new Runnable() { + public void run() { + androidView.requestFocus(); + androidView.bringToFront(); + } + }); } } @@ -357,7 +361,7 @@ public class AndroidWindow extends jogamp.newt.WindowImpl implements Callback2 { getX()+"/"+getY()+" "+nWidth+"x"+nHeight+", visible: "+isVisible()); if(isVisible()) { - setVisible(true); + setVisible(true); } } sizeChanged(false, aWidth, aHeight, false); |