[Title] avoid unnecessary skin trimming
authorgiwoong.kim <giwoong.kim@samsung.com>
Mon, 10 Sep 2012 11:41:10 +0000 (20:41 +0900)
committergiwoong.kim <giwoong.kim@samsung.com>
Mon, 10 Sep 2012 11:47:39 +0000 (20:47 +0900)
[Type] enhancement
[Module] Emulator / skin
[Priority] major
[Jira#] N_SE-9642
[Redmine#]
[Problem]
[Cause]
[Solution]
[TestCase]

tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkin.java

index 8e51921..fb23c7d 100644 (file)
@@ -653,7 +653,9 @@ public class EmulatorSkin {
                                                        }
                                                }
 
-                                               SkinUtil.trimShell( shell, currentImage );
+                                               if (keyCode != 101) { // TODO: not necessary for home key
+                                                       SkinUtil.trimShell(shell, currentImage);
+                                               }
 
                                                KeyEventData keyEventData = new KeyEventData(
                                                                KeyEventType.RELEASED.value(), keyCode, 0, 0);
@@ -672,7 +674,7 @@ public class EmulatorSkin {
 
                                        EmulatorSkin.this.isMousePressed = true;
 
-                                       int keyCode = SkinUtil.getHardKeyCode( e.x, e.y, currentRotationId, currentScale );
+                                       final int keyCode = SkinUtil.getHardKeyCode(e.x, e.y, currentRotationId, currentScale);
 
                                        if ( SkinUtil.UNKNOWN_KEYCODE != keyCode ) {
                                                shell.setToolTipText(null);
@@ -702,8 +704,11 @@ public class EmulatorSkin {
 
                                                                                        gc.dispose();
 
-                                                                                       SkinUtil.trimShell(shell, currentKeyPressedImage,
-                                                                                               currentPressedRegion.x, currentPressedRegion.y, currentPressedRegion.width, currentPressedRegion.height);
+                                                                                       if (keyCode != 101) { // TODO: not necessary for home key
+                                                                                               SkinUtil.trimShell(shell, currentKeyPressedImage,
+                                                                                                               currentPressedRegion.x, currentPressedRegion.y,
+                                                                                                               currentPressedRegion.width, currentPressedRegion.height);
+                                                                                       }
 
                                                                                        currentPressedRegion = null;
                                                                                }