From 7399c2be1c99c4b3f7d7a3a51433445f1a6fd063 Mon Sep 17 00:00:00 2001 From: GiWoong Kim Date: Thu, 18 Sep 2014 19:19:46 +0900 Subject: [PATCH] skin: add Timer for shell closing Change-Id: I169713e7667c1983a672c0eafdde2634abbb05ee Signed-off-by: GiWoong Kim --- .../client/src/org/tizen/emulator/skin/EmulatorSkin.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkin.java b/tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkin.java index 9a8aa996c8..e629aeef5d 100755 --- a/tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkin.java +++ b/tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkin.java @@ -159,6 +159,7 @@ public class EmulatorSkin { public boolean isKeyWindow; public boolean isOnKbd; private PopupMenu popupMenu; + private Timer closeTimer; public Color colorVM; private KeyWindowKeeper keyWindowKeeper; @@ -200,6 +201,7 @@ public class EmulatorSkin { this.isOnInterpolation = true; this.isOnKbd = false; this.isKeyWindow = false; + this.closeTimer = new Timer(); int style = SWT.NO_TRIM | SWT.DOUBLE_BUFFERED; this.shell = new Shell(Display.getDefault(), style); @@ -413,6 +415,7 @@ public class EmulatorSkin { logger.info("Main Window is closed"); if (isShutdownRequested) { + closeTimer.cancel(); removeShellListeners(); removeCanvasListeners(); @@ -501,7 +504,7 @@ public class EmulatorSkin { * sleep function. So, we need a bigger value than * that. */ - new Timer().schedule(new TimerTask() { + closeTimer.schedule(new TimerTask() { @Override public void run() { demanderFlag.set(false); -- 2.34.1