/* display should be redrawn When host OS wakes up from suspend
on Ubuntu */
- if (SwtUtil.isLinuxPlatform() == true) {
+ if (SwtUtil.isLinuxPlatform() == true && shell.getRegion() != null) {
if (shell.getRegion().getBounds().x == e.x
&& shell.getRegion().getBounds().y == e.y
&& shell.getRegion().getBounds().width == e.width
/* display should be redrawn When host OS wakes up from suspend
on Ubuntu */
- if (SwtUtil.isLinuxPlatform() == true) {
+ if (SwtUtil.isLinuxPlatform() == true && shell.getRegion() != null) {
if (shell.getRegion().getBounds().x == e.x
&& shell.getRegion().getBounds().y == e.y
&& shell.getRegion().getBounds().width == e.width
imageRegistry.getKeyWindowImage(
GeneralKeyWindowImageName.KEYWINDOW_PATCH_RB));
- this.keyMapList = keyMapList; //TODO: null
+ this.keyMapList = keyMapList;
this.grabPosition = new Point(0, 0);
shell.setText(parent.getText());
- shell.setImage(parent.getImage());
+ shell.setImage(parent.getImage()); /* icon */
/* load image for HW key button */
imageNormal = imageRegistry.getKeyWindowImage(
GeneralKeyWindowImageName.KEYBUTTON_PUSHED);
/* calculate the key window size */
+ int cntButton = Math.min(keyMapList.size(), BUTTON_DEFAULT_CNT);
+
widthBase = imageNormal.getImageData().width;
- heightBase = (imageNormal.getImageData().height * BUTTON_DEFAULT_CNT) +
- (BUTTON_VERTICAL_SPACING * (BUTTON_DEFAULT_CNT - 1));
+ heightBase = (imageNormal.getImageData().height * cntButton) +
+ (BUTTON_VERTICAL_SPACING * (cntButton - 1));
widthScrollbar = SCROLLBAR_SIZE_WIDTH + SCROLLBAR_HORIZONTAL_SPACING;
int heightHeaderPart = (PAIRTAG_CIRCLE_SIZE + PAIRTAG_MARGIN_BOTTOM);
/* make a frame image */
if (keyMapList != null) {
- this.cntHiddenButton = keyMapList.size() - BUTTON_DEFAULT_CNT;
+ this.cntHiddenButton = keyMapList.size() - cntButton;
}
this.imageFrame = frameMaker.getPatchedImage(