// }
/* 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));
}
});
// }
/* 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));
}
});
/**
+ * 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 <giwoong.kim@samsung.com>
* 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
}
/* 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);
}