Loose popups in Gnome

This is the forum for JIDE Common Layer which is open sourced at https://github.com/jidesoft/jide-oss. Please note, JIDE technical support doesn't monitor this forum as often as other forums. Please consider subscribe for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

Moderator: JIDE Support

Forum rules
Community driven forum for open source JIDE Common Layer. JIDE technical support doesn't monitor this forum as often as other forums. If you only use JIDE Common Layer, please consider subscribing for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

Loose popups in Gnome

Postby alf239 » Wed Dec 02, 2009 9:49 am

Hi everyone!

We recently bumped into a problem: in Gnome (CentOS 5.2), in Java Applet, the JIDE comboboxes have a strange glitch: if you open a combobox, and switch to other window, combobox stays on the screen, on top of all the windows though you'd expect it to hide :)

I took a liberty of searching the web, and found a bug, http://bugs.sun.com/bugdatabase/view_bu ... id=5070056 which looks very similar given that JidePopup uses JWindow. Digging in the JidePopup sources gave me the following code snippet, on which I'm stuck, as I don't really understand the comments, especially the "TODO: don't why DEACTIVATED event is fired" part. Could please anyone give me a clue on whether the EmbeddedPane check is still necessary?
Code: Select all
// The cases for window deactivated are too complex. Let's not consider it for now.
// One case the code below didn't consider is an dialog is shown while in another thread, alert is showing and the owner is the frame.
// At the end, frame received deactivated event and cause alert to hide immediately.
//
// 1/2/07: we have to put this code back because combobox's popup not hiding when the window is deactivated.
// But I also copied the code from MenuSelectionManager to check doUnpostPopupOnDeactivation. Hopefully that addresses the issue above.
else if (isTransient()
        && e.getID() == WindowEvent.WINDOW_DEACTIVATED
        && !(e.getWindow() instanceof  EmbeddedFrame)) {
    // TODO: don't why DEACTIVATED event is fired when popup is showing only if the applet is in browser mode.
    // so the best solution is to find out why. For now just skip the case if the frame is a EmbeddedFrame.
    if (doUnpostPopupOnDeactivation()) {
        if (e.getOppositeWindow() != getTopLevelAncestor()) {
            hidePopup(true);
        }
    }
}
Alexey "Alf" Filippov
alf239
 
Posts: 8
Joined: Wed Dec 02, 2009 9:06 am

Re: Loose popups in Gnome

Postby JIDE Support » Wed Dec 02, 2009 11:34 am

EmbeddedFrame is a dummy parent frame for applet. In applet, when we try to show a popup, the EmbeddedFrame get deactivated event, which we response and hide the popup. So the popup will never be shown without this "if" check.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: Loose popups in Gnome

Postby alf239 » Wed Dec 02, 2009 11:45 am

JIDE Support wrote:So the popup will never be shown without this "if" check.


In other words, there's no chance to fix this problem until we switch from applet to WebStart or something similar?

How come it's Gnome-only problem? Is it because in Gnome, Java popup windows are just windows, with no "real" relation to its parents?
Alexey "Alf" Filippov
alf239
 
Posts: 8
Joined: Wed Dec 02, 2009 9:06 am

Re: Loose popups in Gnome

Postby JIDE Support » Wed Dec 02, 2009 12:09 pm

Window management is quite different on different OS. Unfortunately it happens only to GNOME. You could change the code in JidePopup and give it a try and see what it behaves like on GNOME without this "if" check. Maybe you can find a solution after trying it.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: Loose popups in Gnome

Postby alf239 » Thu Dec 03, 2009 8:33 am

Hi again,

Thank you for the advice! It worked like an eye-opener: nothing's changed, the popup stays loose. What solves the problem was jarsigner: so for the test with a single dropdown, the problem was an inability to subscribe on window events due to sandbox restrictions.

Commercial version has the same problem, though, and jarsigner doesn't help... Is JidePopup any different in commercial version (sorry for asking here: my group access is not approved so far), or should I better try and find out what else could be the cause?

Cheers,

Alf
Alexey "Alf" Filippov
alf239
 
Posts: 8
Joined: Wed Dec 02, 2009 9:06 am


Return to JIDE Common Layer Open Source Project Discussion (Community Driven)

Who is online

Users browsing this forum: No registered users and 62 guests