public void openKeyWindow() {
if (controlPanel != null) {
controlPanel.getShell().setVisible(true);
+ SkinUtil.setTopMost(controlPanel.getShell(), isOnTop);
+
pairTagCanvas.setVisible(true);
return;
}
try {
controlPanel = new ControlPanel(shell, communicator, keyMapList);
+ SkinUtil.setTopMost(controlPanel.getShell(), isOnTop);
+
colorPairTag = controlPanel.getPairTagColor();
pairTagCanvas.setVisible(true);
controlPanel.open();
+ /* do not add at this line */
} finally {
controlPanel = null;
}
onTopItem.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
- final boolean isOnTop = onTopItem.getSelection();
+ isOnTop = onTopItem.getSelection();
logger.info("Select Always On Top : " + isOnTop);
// readyToReopen(EmulatorSkin.this, isOnTop);
if (SkinUtil.setTopMost(shell, isOnTop) == false) {
logger.info("failed to Always On Top");
+ } else {
+ if (controlPanel != null) {
+ SkinUtil.setTopMost(controlPanel.getShell(), isOnTop);
+ }
}
}
} );
}
public static boolean setTopMost(Shell shell, boolean isOnTop) {
+ if (shell == null) {
+ return false;
+ }
+
/* internal/Library.java::arch() */
String osArch = System.getProperty("os.arch"); /* $NON-NLS-1$ */
- logger.info(osArch);
+
if (osArch.equals("amd64") || osArch.equals("x86_64") ||
osArch.equals("IA64W") || osArch.equals("ia64")) {
/* $NON-NLS-1$ $NON-NLS-2$ $NON-NLS-3$ */
- logger.info("64bit architecture");
+ logger.info("64bit architecture : " + osArch);
return setTopMost64(shell, isOnTop); /* 64bit */
}
- logger.info("32bit architecture");
+ logger.info("32bit architecture : " + osArch);
return setTopMost32(shell, isOnTop); /* 32bit */
}
}