summaryrefslogtreecommitdiff
path: root/tizen
diff options
context:
space:
mode:
authorSangho Park <sangho1206.park@samsung.com>2014-05-12 23:11:25 -0700
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>2014-05-12 23:11:25 -0700
commitc691cd7613c551c4cce6e86643d5d8548056857b (patch)
tree45e552c61a3635650ac5b5b408b2eb5e49250fd4 /tizen
parent22a343aa1f3c1ac4814f69dc1dc313436df47d14 (diff)
parentaf657297a2cc58ebc66da099b8d4ebf5a5455696 (diff)
downloadqemu-c691cd7613c551c4cce6e86643d5d8548056857b.tar.gz
qemu-c691cd7613c551c4cce6e86643d5d8548056857b.tar.bz2
qemu-c691cd7613c551c4cce6e86643d5d8548056857b.zip
Merge "skin: prevent disposed widget accessing" into tizen
Diffstat (limited to 'tizen')
-rw-r--r--tizen/src/skin/client/src/org/tizen/emulator/skin/custom/SkinWindow.java4
-rw-r--r--tizen/src/skin/client/src/org/tizen/emulator/skin/menu/KeyWindowKeeper.java11
-rw-r--r--tizen/src/skin/client/src/org/tizen/emulator/skin/menu/PopupMenu.java1
3 files changed, 12 insertions, 4 deletions
diff --git a/tizen/src/skin/client/src/org/tizen/emulator/skin/custom/SkinWindow.java b/tizen/src/skin/client/src/org/tizen/emulator/skin/custom/SkinWindow.java
index a333fed298..b74c5dea4c 100644
--- a/tizen/src/skin/client/src/org/tizen/emulator/skin/custom/SkinWindow.java
+++ b/tizen/src/skin/client/src/org/tizen/emulator/skin/custom/SkinWindow.java
@@ -65,6 +65,10 @@ public class SkinWindow {
public void dock(int dockValue,
boolean correction, boolean enableLogger) {
+ if (shell.isDisposed() == true) {
+ return;
+ }
+
int x = 0;
int y = 0;
diff --git a/tizen/src/skin/client/src/org/tizen/emulator/skin/menu/KeyWindowKeeper.java b/tizen/src/skin/client/src/org/tizen/emulator/skin/menu/KeyWindowKeeper.java
index 4a496dc6be..6342540572 100644
--- a/tizen/src/skin/client/src/org/tizen/emulator/skin/menu/KeyWindowKeeper.java
+++ b/tizen/src/skin/client/src/org/tizen/emulator/skin/menu/KeyWindowKeeper.java
@@ -65,7 +65,7 @@ public class KeyWindowKeeper {
}
public void openKeyWindow(int dockValue, boolean recreate) {
- if (keyWindow != null) {
+ if (getKeyWindow() != null) {
if (recreate == false) {
/* show the Key Window */
selectKeyWindowMenu(skin.isKeyWindow = true);
@@ -136,7 +136,7 @@ public class KeyWindowKeeper {
public void closeKeyWindow() {
selectKeyWindowMenu(skin.isKeyWindow = false);
- if (keyWindow != null) {
+ if (getKeyWindow() != null) {
keyWindow.getShell().close();
keyWindow = null;
}
@@ -147,7 +147,7 @@ public class KeyWindowKeeper {
public void hideKeyWindow() {
selectKeyWindowMenu(skin.isKeyWindow = false);
- if (keyWindow != null) {
+ if (getKeyWindow() != null) {
keyWindow.getShell().setVisible(false);
}
@@ -155,6 +155,11 @@ public class KeyWindowKeeper {
}
public SkinWindow getKeyWindow() {
+ if (keyWindow != null &&
+ keyWindow.getShell().isDisposed() == true) {
+ keyWindow = null;
+ }
+
return keyWindow;
}
diff --git a/tizen/src/skin/client/src/org/tizen/emulator/skin/menu/PopupMenu.java b/tizen/src/skin/client/src/org/tizen/emulator/skin/menu/PopupMenu.java
index cbb9ee8e53..911f47e004 100644
--- a/tizen/src/skin/client/src/org/tizen/emulator/skin/menu/PopupMenu.java
+++ b/tizen/src/skin/client/src/org/tizen/emulator/skin/menu/PopupMenu.java
@@ -118,7 +118,6 @@ public class PopupMenu {
contextMenu = new Menu(shell);
addMenuItems(contextMenu);
- shell.setMenu(contextMenu);
}
private void addMenuItems(final Menu menu) {