let_driver_post_the_activated_event.diff
src/com/goldencode/p2j/ui/client/gui/OverlayWindow.java 2016-01-13 09:05:40 +0000 | ||
---|---|---|
250 | 250 |
gd.selectWindow(id.asInt()); |
251 | 251 |
gd.setWindowVisible(true); |
252 | 252 |
gd.releaseWindow(); |
253 |
|
|
254 |
WindowManager.activateWindow(this); |
|
253 | 255 |
} |
254 | 256 | |
255 | 257 |
/** |
... | ... | |
568 | 570 |
@Override |
569 | 571 |
public void setFocus(Widget<GuiOutputManager> focus) |
570 | 572 |
{ |
571 |
// raise a window-activated event |
|
572 |
ThinClient.getInstance().postOSEvent(new WindowActivated(this, true, false)); |
|
573 | ||
574 | 573 |
// set the new focus window. a window can be set in ACTIVATED state even without being |
575 | 574 |
// the focus owner - so we can't set it as FOCUS owner when the window gets activated |
576 | 575 |
WindowManager.setFocusWindow(this); |
... | ... | |
668 | 667 |
@Override |
669 | 668 |
public void processEvent(Event event) |
670 | 669 |
{ |
670 |
super.processEvent(event); |
|
671 |
|
|
671 | 672 |
if (event instanceof WindowActivated) |
672 | 673 |
{ |
673 | 674 |
if (!((WindowActivated)event).isActivated()) |
... | ... | |
677 | 678 |
((DropDownGuiImpl)child).dismiss(); |
678 | 679 |
} |
679 | 680 |
} |
680 |
else |
|
681 |
{ |
|
682 |
WindowManager.moveToTop(this); |
|
683 |
} |
|
684 |
} |
|
685 |
else |
|
686 |
{ |
|
687 |
super.processEvent(event); |
|
688 | 681 |
} |
689 | 682 |
} |
690 | 683 |
} |
src/com/goldencode/p2j/ui/client/gui/driver/swing/SwingEmulatedWindow.java 2016-01-13 09:04:56 +0000 | ||
---|---|---|
304 | 304 |
// A LEAVE event is not raised; it will be raised by the 4GL window which received |
305 | 305 |
// the focus. If focus is received by another OS window, then no LEAVE needs to |
306 | 306 |
// be sent. |
307 |
|
|
307 | ||
308 | 308 |
TopLevelWindow<?> window = (TopLevelWindow<?>) WindowManager.findWindow(windowId); |
309 | 309 | |
310 |
// close overlay if exist first |
|
311 |
OverlayWindow ow = WindowManager.findOverlayWindow(); |
|
312 |
if (ow != null && ow != window) |
|
313 |
{ |
|
314 |
ThinClient.getInstance().postOSEvent(new WindowActivated(ow, false, false)); |
|
315 |
} |
|
316 | ||
317 | 310 |
if (window != null) |
318 | 311 |
{ |
319 | 312 |
boolean toOS = (e.getOppositeWindow() == null); |