Skip to content

Modal dialog with wrong parent can lock up the application #5987

@rkeen-siemens

Description

@rkeen-siemens

Apache NetBeans version

Apache NetBeans 17

What happened

DialogDisplayerImpl.notify sets the wrong parent when the currently active window is a modal dialog. When running with FlatLaf providing window decorations via setDefaultLookAndFeelDecorated on Linux, this allows the user to click the previously active modal dialog to bring it to the front due to JDK-8306001.

How to reproduce

Start a platform application with the following run before creating any UI (e.g. in an override of ModuleInstall.validate):

JFrame.setDefaultLookAndFeelDecorated(true);
JDialog.setDefaultLookAndFeelDecorated(true);

Then from within an open model dialog invoke another using DialogDisplayer.notify and click the originally open dialog. This dialog will come to the front and if the new dialog is completely hidden there is nothing the user can do but kill the application.

Did this work correctly in an earlier version?

No / Don't know

Operating System

Linux

JDK

JDK 17

Apache NetBeans packaging

Apache NetBeans platform

Anything else

No response

Are you willing to submit a pull request?

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind:bugBug report or fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions