On Mon, 28 Jun 2021 16:56:44 GMT, Thiago Milczarek Sayao <tsa...@openjdk.org> 
wrote:

> The PR approach is to set  `gtk_window_set_keep_above` to true on 
> APPLICATION_MODAL windows, so they will not stay behind non APPLICATION_MODAL 
> windows.
> 
> This is passed on WindowStage.java:198 as a mask.
> 
> The weird thing is that `_enterModal()` is never called. This seems the right 
> function to be called for `APPLICATION_MODAL`, as `_enterModalWithWindow` 
> fits for `WINDOW_MODAL`.

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`

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?

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

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

Reply via email to