From 4f82713ed0051330a783d4c3707812a1c6df6319 Mon Sep 17 00:00:00 2001 From: "giwoong.kim" Date: Mon, 14 Jan 2013 20:30:47 +0900 Subject: [PATCH] skin: save most recently dock position save most recently dock position when disable the popup menu item of key window. Signed-off-by: GiWoong Kim --- .../client/src/org/tizen/emulator/skin/EmulatorSkin.java | 6 +++++- .../emulator/skin/layout/GeneralPurposeSkinComposer.java | 1 + 2 files changed, 6 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 265937a33b..8bd77213d2 100644 --- a/tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkin.java +++ b/tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkin.java @@ -145,6 +145,7 @@ public class EmulatorSkin { private Menu contextMenu; private MenuItem keyWindowItem; /* key window menu */ public KeyWindow keyWindow; + public int recentlyDocked; public Color colorPairTag; public Canvas pairTagCanvas; public CustomProgressBar bootingProgress; @@ -188,6 +189,7 @@ public class EmulatorSkin { this.isOnTop = isOnTop; this.isKeyWindow = false; + this.recentlyDocked = SWT.NONE; int style = SWT.NO_TRIM | SWT.DOUBLE_BUFFERED; // if (skinInfo.isPhoneShape() == false) { @@ -1093,7 +1095,8 @@ public class EmulatorSkin { if (selectKeyWindow == true) { if (keyWindow == null) { - openKeyWindow(SWT.RIGHT | SWT.CENTER, false); + openKeyWindow(recentlyDocked, false); + recentlyDocked = SWT.NONE; } else { openKeyWindow(keyWindow.getDockPosition(), false); } @@ -1101,6 +1104,7 @@ public class EmulatorSkin { if (keyWindow != null && keyWindow.getDockPosition() != SWT.NONE) { /* close the Key Window if it is docked to Main Window */ + recentlyDocked = keyWindow.getDockPosition(); closeKeyWindow(); } else { hideKeyWindow(); diff --git a/tizen/src/skin/client/src/org/tizen/emulator/skin/layout/GeneralPurposeSkinComposer.java b/tizen/src/skin/client/src/org/tizen/emulator/skin/layout/GeneralPurposeSkinComposer.java index 86f461be9b..295cfaaa9d 100644 --- a/tizen/src/skin/client/src/org/tizen/emulator/skin/layout/GeneralPurposeSkinComposer.java +++ b/tizen/src/skin/client/src/org/tizen/emulator/skin/layout/GeneralPurposeSkinComposer.java @@ -159,6 +159,7 @@ public class GeneralPurposeSkinComposer implements ISkinComposer { public void mouseDown(MouseEvent e) { if (skin.isSelectKeyWindow() == true) { skin.closeKeyWindow(); + skin.recentlyDocked = SWT.RIGHT | SWT.CENTER; } else { skin.openKeyWindow(SWT.RIGHT | SWT.CENTER, true); } -- 2.34.1