In my application, clicking on a button creates a popup window and clicking back the button makes it disapear. Simple! The problem I have is that the closed window does not disapear from the gui. I used the debugger to see what happen and all I see is that the window is in the closed stated and detached. I tried the close button of the window and the same thing happen so it is not my logic that is the problem. Something prevent the window from disapearing. When I click on menu items to change view, the window is still there.
What could be wrong?
Here is a code snippet if it helps:
if ( !notificationsWindow.isAttached() ) {
notificationsWindow.setPositionY( pEvent.getClientY() - pEvent.getRelativeY() + 40 );
UI.getCurrent().addWindow( notificationsWindow );
notificationsWindow.focus();
} else {
notificationsWindow.close();
}