Thanks to the reviewer for checking out my bug post

Kevin Rushforth kevin.rushforth at oracle.com
Tue Oct 17 21:11:24 UTC 2017


Hi Paul,

A modal dialog disables the parent window (if Modality.WINDOW_MODAL) or 
all other windows (if Modality.APPLICATION_MODAL). This includes not 
processing mouse events, such as window_enter, which means that custom 
cursors don't get activated for the disabled window.

Native apps also tend to work this way. For example, when you run 
Notepad (Windows 7 or 10), it sets a custom cursor to the text insertion 
cursor (the I-bar cursor). If you type some text and then hit the close 
button, the modal "Save" dialog that comes up will prevent the custom 
cursor from being shown.

So yes, it is working as intended, and this is not a bug.

-- Kevin


Paul Russell wrote:
> Hi JavaFX mailing list,
>
> I posted this bug:
> http://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8189180
>
> I really appreciate how quickly this was looked into. However, I still
> can't see how this expected behaviour, unless there is a better way to
> create modal windows? My application is a game, and my hand-drawn cursor is
> distinct from the windows system cursor. Hence, this behaviour looks
> appalling, I've switched to
>
> .initModality(Modality.NONE);
>
> But disabling parent windows controls is cluttering my code.
>
> Thanks
>   


More information about the openjfx-dev mailing list