summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/newt/classes/jogamp/newt/driver/android/NewtBaseActivity.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/newt/classes/jogamp/newt/driver/android/NewtBaseActivity.java b/src/newt/classes/jogamp/newt/driver/android/NewtBaseActivity.java
index 28c4da72f..c2379b648 100644
--- a/src/newt/classes/jogamp/newt/driver/android/NewtBaseActivity.java
+++ b/src/newt/classes/jogamp/newt/driver/android/NewtBaseActivity.java
@@ -59,8 +59,8 @@ public class NewtBaseActivity extends Activity {
}
public void setRootActivity(Activity rootActivity) {
- this.isDelegatedActivity = true;
this.rootActivity = rootActivity;
+ this.isDelegatedActivity = this != rootActivity;
}
public final boolean isDelegatedActivity() {
@@ -231,7 +231,11 @@ public class NewtBaseActivity extends Activity {
@Override
public android.view.Window getWindow() {
- return getActivity().getWindow();
+ if( isDelegatedActivity() ) {
+ return getActivity().getWindow();
+ } else {
+ return getWindow();
+ }
}
@Override