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

Kevin Rushforth kcr at openjdk.java.net
Thu Jul 15 22:38:17 UTC 2021


On Sat, 10 Jul 2021 16:06:18 GMT, Thiago Milczarek Sayao <tsayao at 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`.
>
> Thiago Milczarek Sayao has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Remove unneeded test for modal

I verified that this fixes the problem, but it also changes the behavior of `APPLICATION_MODAL` dialogs on Linux to be "Always on Top" -- not just on top of other application windows (which is fine), but on top of all other windows an application might create, which is not desirable as a default behavior. This also makes it behave differently than Mac or Windows.

I think we should look for a solution that doesn't rely on forcing a dialog to be on top of other (no app) windows.

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

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


More information about the openjfx-dev mailing list