RFR: 8269429: Linux: Only the last APPLICATION_MODAL window behaves correctly [v2]

Thiago Milczarek Sayao tsayao at openjdk.java.net
Tue Jun 29 21:58:38 UTC 2021


On Tue, 29 Jun 2021 21:05:06 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

> I tried the test program attached to the JBS bug, and I'm not seeing the problem. Are there any special steps I need to take to see the bug? I also left a question about `WINDOW_MODAL` vs `APPLICATION_MODAL` windows.
> 
> Regarding the `{enter/exit/is}Modal` methods in `Window.java`, it looks like they stubs that are never called. Modality is handled by the toolkit using (as you found out) only the `setEnabled` method.
> 
> Finally, you have a typo in the title of both this PR and the JBS bug: `corretly` --> `correctly`

- Added steps to reproduce on JBS. Basically the window manager will let you click the window in the back (primary stage in the example) and the APPLICATION_MODAL will go behind it, still blocking events;
- Fixed the typo.

> modules/javafx.graphics/src/main/native-glass/gtk/glass_window.cpp line 741:
> 
>> 739:     } else if (modal) {
>> 740:         //this is used for APPLICATION_MODAL
>> 741:         gtk_window_set_keep_above(GTK_WINDOW(gtk_widget), TRUE);
> 
> Won't this also be set for `WINDOW_MODAL` windows? And if so, is this really what we want?

Yes. I have refactored it.

-------------

PR: https://git.openjdk.java.net/jfx/pull/551


More information about the openjfx-dev mailing list