From 4fdc0f4f82d7030cb75675736ddffcb0e070e7e0 Mon Sep 17 00:00:00 2001 From: "giwoong.kim" Date: Mon, 14 Jan 2013 21:11:00 +0900 Subject: [PATCH] skin: move arrangeSkin to syncexec move arrangeSkin to syncexec for rotation & scaling Signed-off-by: GiWoong Kim --- .../org/tizen/emulator/skin/EmulatorSkin.java | 60 +++++++++++-------- 1 file changed, 36 insertions(+), 24 deletions(-) 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 8bd77213d2..3117f68365 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 @@ -1255,21 +1255,27 @@ public class EmulatorSkin { return; } - short rotationId = ((Short) item.getData()); + final short rotationId = ((Short) item.getData()); - Point location = new Point(100, 100); - if (skinInfo.isPhoneShape()) { /* TODO: */ - location = shell.getLocation(); - shell.setVisible(false); - } + shell.getDisplay().syncExec(new Runnable() { + @Override + public void run() { + Point location = new Point(100, 100); - skinComposer.arrangeSkin(currentState.getCurrentScale(), rotationId); + if (skinInfo.isPhoneShape()) { /* TODO: */ + location = shell.getLocation(); + shell.setVisible(false); + } - if (skinInfo.isPhoneShape()) { /* TODO: */ - shell.setVisible(true); - shell.setLocation(location); - SkinUtil.setTopMost(shell, isOnTop); - } + skinComposer.arrangeSkin(currentState.getCurrentScale(), rotationId); + + if (skinInfo.isPhoneShape()) { /* TODO: */ + shell.setVisible(true); + shell.setLocation(location); + SkinUtil.setTopMost(shell, isOnTop); + } + } + }); DisplayStateData lcdStateData = new DisplayStateData(currentState.getCurrentScale(), rotationId); @@ -1323,21 +1329,27 @@ public class EmulatorSkin { return; } - int scale = ((Scale) item.getData()).value(); + final int scale = ((Scale) item.getData()).value(); - Point location = new Point(100, 100); - if (skinInfo.isPhoneShape()) { /* TODO: */ - location = shell.getLocation(); - shell.setVisible(false); - } + shell.getDisplay().syncExec(new Runnable() { + @Override + public void run() { + Point location = new Point(100, 100); - skinComposer.arrangeSkin(scale, currentState.getCurrentRotationId()); + if (skinInfo.isPhoneShape()) { /* TODO: */ + location = shell.getLocation(); + shell.setVisible(false); + } - if (skinInfo.isPhoneShape()) { /* TODO: */ - shell.setVisible(true); - shell.setLocation(location); - SkinUtil.setTopMost(shell, isOnTop); - } + skinComposer.arrangeSkin(scale, currentState.getCurrentRotationId()); + + if (skinInfo.isPhoneShape()) { /* TODO: */ + shell.setVisible(true); + shell.setLocation(location); + SkinUtil.setTopMost(shell, isOnTop); + } + } + }); DisplayStateData lcdStateData = new DisplayStateData(scale, currentState.getCurrentRotationId()); -- 2.34.1