import java.util.logging.Logger;
import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.ImageData;
import org.eclipse.swt.widgets.Display;
import org.tizen.emulator.skin.config.EmulatorConfig;
import org.tizen.emulator.skin.dbi.EmulatorUI;
}
/* set window size */
- if (currentState.getCurrentImage() != null) {
- ImageData imageData = currentState.getCurrentImage().getImageData();
- shell.setMinimumSize(imageData.width, imageData.height);
- }
-
- shell.pack();
-
if (currentState.getCurrentImage() != null) {
ImageData imageData = currentState.getCurrentImage().getImageData();
shell.setSize(imageData.width, imageData.height);
public void paintControl(final PaintEvent e) {
if (currentState.isNeedToUpdateDisplay() == true) {
currentState.setNeedToUpdateDisplay(false);
-
-// if (skin.communicator.isSensorDaemonStarted() == true) {
-// /* Let's do one more update for sdl display surface
-// while skipping of framebuffer drawing */
-// DisplayStateData lcdStateData = new DisplayStateData(
-// currentState.getCurrentScale(), currentState.getCurrentRotationId());
-// skin.communicator.sendToQEMU(
-// SendCommand.CHANGE_LCD_STATE, lcdStateData, false);
-// }
}
/* set window size once again (for ubuntu 12.04) */
SWT.ICON_ERROR, config);
System.exit(-1);
}
- logger.info("lcd bounds : " + lcdBounds);
+ logger.info("display bounds : " + lcdBounds);
currentState.setDisplayBounds(lcdBounds);
- if (SwtUtil.isMacPlatform() == true) {
- lcdCanvas.setBounds(currentState.getDisplayBounds());
- }
/* arrange the skin image */
Image tempImage = null;
tempKeyPressedImage.dispose();
}
+ if (SwtUtil.isMacPlatform() == true) {
+ lcdCanvas.setBounds(currentState.getDisplayBounds());
+ }
+
/* arrange the progress bar */
if (skin.bootingProgress != null) {
skin.bootingProgress.setBounds(lcdBounds.x,
lcdBounds.y + lcdBounds.height + 1, lcdBounds.width, 2);
}
- /* set window size */
- if (currentState.getCurrentImage() != null) {
- ImageData imageData = currentState.getCurrentImage().getImageData();
- shell.setMinimumSize(imageData.width, imageData.height);
- }
-
- shell.pack();
-
/* set window size */
if (currentState.getCurrentImage() != null) {
ImageData imageData = currentState.getCurrentImage().getImageData();
public void paintControl(final PaintEvent e) {
if (currentState.isNeedToUpdateDisplay() == true) {
currentState.setNeedToUpdateDisplay(false);
+
if (SwtUtil.isMacPlatform() == false) {
lcdCanvas.setBounds(currentState.getDisplayBounds());
}
-
-// if (skin.communicator.isSensorDaemonStarted() == true) {
-// /* Let's do one more update for sdl display surface
-// while skipping of framebuffer drawing */
-// DisplayStateData lcdStateData = new DisplayStateData(
-// currentState.getCurrentScale(), currentState.getCurrentRotationId());
-// skin.communicator.sendToQEMU(
-// SendCommand.CHANGE_LCD_STATE, lcdStateData, false);
-// }
}
/* set window size once again (for ubuntu 12.04) */
* Copyright (C) 2011 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
*
* Contact:
+ * Munkyu Im <munkyu.im@samsung.com>
* GiWoong Kim <giwoong.kim@samsung.com>
* YeongKyoon Lee <yeongkyoon.lee@samsung.com>
* HyunJun Son
this.config = config;
this.scaleLevel = 100d;
- shell = new Shell(parent, SWT.SHELL_TRIM);
+ if (SwtUtil.isMacPlatform() == false) {
+ shell = new Shell(parent, SWT.SHELL_TRIM);
+ } else {
+ shell = new Shell(parent.getDisplay(), SWT.SHELL_TRIM);
+ }
shell.setText("Screen Shot - " + SkinUtil.makeEmulatorName(config));
/* To prevent the icon switching on Mac */
- if (!SwtUtil.isMacPlatform()) {
+ if (SwtUtil.isMacPlatform() == false) {
if (icon != null) {
shell.setImage(icon);
}
shell.addListener(SWT.Close, new Listener() {
@Override
public void handleEvent(Event event) {
+ logger.info("ScreenShot Window is closed");
+
if (null != image) {
if (!reserveImage) {
image.dispose();