Skip to content

Commit 5855328

Browse files
author
zhourenjian
committed
Fixing bug that minimized Console window is not brought to top when Console icon is clicked.
1 parent b3fee8e commit 5855328

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

sources/net.sf.j2s.java.org.eclipse.swt/src/org/eclipse/swt/widgets/Console.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public class Console extends Shell {
2828
*/
2929
public static void openConsole() {
3030
if (console != null && !console.isDisposed()) {
31+
console.setMinimized(false);
3132
console.setVisible(true);
3233
console.bringToTop();
3334
return;

sources/net.sf.j2s.java.org.eclipse.swt/src/org/eclipse/swt/widgets/Shell.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public class Shell extends Decorations {
138138
//int hIMC, hwndMDIClient, toolTipHandle, lpstrTip;
139139
int minWidth = SWT.DEFAULT, minHeight = SWT.DEFAULT;
140140
//int [] brushes;
141-
boolean showWithParent;
141+
//boolean showWithParent;
142142
Control lastActive;
143143

144144
// SHACTIVATEINFO psai;
@@ -1464,13 +1464,13 @@ public void run() {
14641464
* to be deactivated. The fix is to call ShowOwnedPopups()
14651465
* to hide children before hiding the parent.
14661466
*/
1467-
if (showWithParent && !visible) {
1468-
// if (!OS.IsWinCE) OS.ShowOwnedPopups (handle, false);
1469-
}
1467+
// if (showWithParent && !visible) {
1468+
//// if (!OS.IsWinCE) OS.ShowOwnedPopups (handle, false);
1469+
// }
14701470
super.setVisible (visible);
14711471
if (isDisposed ()) return;
1472-
if (showWithParent == visible) return;
1473-
showWithParent = visible;
1472+
// if (showWithParent == visible) return;
1473+
// showWithParent = visible;
14741474
if (visible) {
14751475
// if (!OS.IsWinCE) OS.ShowOwnedPopups (handle, true);
14761476
SetWindowPos(handle, null, left, top, width, height, 0);
Loading

0 commit comments

Comments
 (0)