From: giwoong.kim Date: Tue, 18 Jun 2013 10:14:05 +0000 (+0900) Subject: skin: The negative bounds of monitor is considered X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~951 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=46808b28314fdd11fe00b76ccffaf50e838d743b;p=sdk%2Femulator%2Fqemu.git skin: The negative bounds of monitor is considered The negative bounds of monotor is considered for window position Change-Id: Ia1dc7a658aa5bdc2a25a5f97fbc4c5bb052b23cd Signed-off-by: GiWoong Kim --- 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 10106e2c98..cf5fbca2e1 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 @@ -1448,10 +1448,11 @@ public class EmulatorSkin { // } /* location correction */ - Rectangle emulatorBound = shell.getBounds(); + Rectangle monitorBounds = Display.getDefault().getBounds(); + Rectangle emulatorBounds = shell.getBounds(); shell.setLocation( - Math.max(emulatorBound.x, 0), - Math.max(emulatorBound.y, 0)); + Math.max(emulatorBounds.x, monitorBounds.x), + Math.max(emulatorBounds.y, monitorBounds.y)); } }); @@ -1528,10 +1529,11 @@ public class EmulatorSkin { // } /* location correction */ - Rectangle emulatorBound = shell.getBounds(); + Rectangle monitorBounds = Display.getDefault().getBounds(); + Rectangle emulatorBounds = shell.getBounds(); shell.setLocation( - Math.max(emulatorBound.x, 0), - Math.max(emulatorBound.y, 0)); + Math.max(emulatorBounds.x, monitorBounds.x), + Math.max(emulatorBounds.y, monitorBounds.y)); } }); 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 dadac594dc..77618eda7a 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 @@ -1,7 +1,7 @@ /** + * child window of skin * - * - * Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved. + * Copyright (C) 2011 - 2013 Samsung Electronics Co., Ltd. All rights reserved. * * Contact: * GiWoong Kim @@ -10,7 +10,7 @@ * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 - * of the License, or ( at your option ) any later version. + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -134,8 +134,8 @@ public class SkinWindow { } /* for left side */ - if (x < 0) { - shift = x * (-1); + shift = monitorBounds.x - x; + if (shift > 0) { x += shift; parent.setLocation(parentBounds.x + shift, parentBounds.y); }