skin: modified initail position of the KeyWindow
authorgiwoong.kim <giwoong.kim@samsung.com>
Thu, 23 May 2013 03:10:12 +0000 (12:10 +0900)
committergiwoong.kim <giwoong.kim@samsung.com>
Fri, 24 May 2013 05:05:35 +0000 (14:05 +0900)
The initail position of the KeyWindow shifted to
the inside of monitor bounds.

Change-Id: I744e204f5f7792dde3d64815c64590726a502c8f
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
tizen/src/skin/client/src/org/tizen/emulator/skin/custom/SkinWindow.java

index d7f2b5fc0e6ad83610393aa1d0781564cbeb9c24..dadac594dcf42600d6ba087c2839d030754cb805 100644 (file)
@@ -125,12 +125,20 @@ public class SkinWindow {
 
                /* correction of location */
                if (correction == true) {
+                       /* for right side */
                        int shift = (monitorBounds.x + monitorBounds.width) -
                                        (x + childBounds.width);
                        if (shift < 0) {
                                x += shift;
                                parent.setLocation(parentBounds.x + shift, parentBounds.y);
                        }
+
+                       /* for left side */
+                       if (x < 0) {
+                               shift = x * (-1);
+                               x += shift;
+                               parent.setLocation(parentBounds.x + shift, parentBounds.y);
+                       }
                }
 
                shell.setLocation(x, y);