hg: openjfx/8/graphics/rt: [RT-26877] - EGLFB: Modal child stage is not closed when showAndWait is used

hang.vo at oracle.com hang.vo at oracle.com
Mon May 6 03:33:12 PDT 2013

Changeset: c3c71a3bf100
Author:    Assaf Yavani
Date:      2013-05-06 13:21 +0300
URL:       http://hg.openjdk.java.net/openjfx/8/graphics/rt/rev/c3c71a3bf100

[RT-26877] - EGLFB: Modal child stage is not closed when showAndWait is used

Problem reported:
Modal child stage is not closed when showAndWait is used.

The problem was actually not related to showAndWait, but rather to the fact that when we close a window we don't check if the closing window is an owner of other windows that required to be closed as well.

Search the window tree to see if closing window has decedents and close them by sending a WindowEvent.CLOSE event. When the event is been processed (LensWindow.java::_notifyClose()) use it as a hook to tell Glass to actually close the window. This is required as we don't have a native window manager to send us the proper events and handle the closing in native layer.
This fix is supporting both scenarios where window have cascading generations related to it (i.e window1->window2->window3->window4....) and also for window with multiply generations related to it (i.e window1->window2->window3... and window1->windowA->windowB...)
As the window tree traversing is done in native layer, which will send close notification (to the relevant windows) to Java layer,  will not cause a direct recursion of window closing in native, but rather the close event processing in Java will call back native window close, which in effect is something like indirect recursion.

Tested on the beagle/DFB (egll is currently broken) using the bug attached application on variety of scenarios (not only the one reported in the bug).

! glass/glass-lib-lens/src/LensWindow.c
! glass/glass/src/com/sun/glass/ui/lens/LensWindow.java

More information about the openjfx-dev mailing list