From 46808b28314fdd11fe00b76ccffaf50e838d743b Mon Sep 17 00:00:00 2001 From: "giwoong.kim" Date: Tue, 18 Jun 2013 19:14:05 +0900 Subject: [PATCH] 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 --- .../src/org/tizen/emulator/skin/EmulatorSkin.java | 14 ++++++++------ .../org/tizen/emulator/skin/custom/SkinWindow.java | 10 +++++----- 2 files changed, 13 insertions(+), 11 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 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); } -- 2.34.1