diff options
author | Sangho Park <sangho1206.park@samsung.com> | 2014-05-12 23:11:25 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@review.vlan103.tizen.org> | 2014-05-12 23:11:25 -0700 |
commit | c691cd7613c551c4cce6e86643d5d8548056857b (patch) | |
tree | 45e552c61a3635650ac5b5b408b2eb5e49250fd4 /tizen | |
parent | 22a343aa1f3c1ac4814f69dc1dc313436df47d14 (diff) | |
parent | af657297a2cc58ebc66da099b8d4ebf5a5455696 (diff) | |
download | qemu-c691cd7613c551c4cce6e86643d5d8548056857b.tar.gz qemu-c691cd7613c551c4cce6e86643d5d8548056857b.tar.bz2 qemu-c691cd7613c551c4cce6e86643d5d8548056857b.zip |
Merge "skin: prevent disposed widget accessing" into tizen
Diffstat (limited to 'tizen')
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) { |