-
Notifications
You must be signed in to change notification settings - Fork 493
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8269429: Linux: Only the last APPLICATION_MODAL window behaves correctly #551
Conversation
Merge master
Merge from jfx
merge from jfx
Merge upstream
Merge from upstream
Update from master
Merge from upstream
Merge with main
Merge master
Merge master
Update from jfx
Pull from origin
Merge master
👋 Welcome back tsayao! A progress list of the required criteria for merging this PR into |
It's odd that glass I would refactor that some day :) |
Webrevs
|
It's working as expected: If there's two APPLICATION_MODAL (*1) and (*2) and a WINDOW_MODAL (*3) as a child of the primary stage the order of the windows on the screen will be (*2) (*1) (*3). Will run the tests and post here. |
/reviewers 2 |
@kevinrushforth |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
Outdated
Show resolved
Hide resolved
|
The first approach was to make the window not clickable or not "activable" when |
I tried this on Ubuntu 20.04 and I see that the patch does solve the issue by bringing the Alert window above the primary window |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine to me. I'll test it on a couple different systems. I left one comment inline.
modules/javafx.graphics/src/main/native-glass/gtk/glass_window.cpp
Outdated
Show resolved
Hide resolved
I verified that this fixes the problem, but it also changes the behavior of 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. |
Will try to find a solution to disable events on disabled windows |
This is also fixed by #581. |
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 forAPPLICATION_MODAL
, as_enterModalWithWindow
fits forWINDOW_MODAL
.Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jfx pull/551/head:pull/551
$ git checkout pull/551
Update a local copy of the PR:
$ git checkout pull/551
$ git pull https://git.openjdk.java.net/jfx pull/551/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 551
View PR using the GUI difftool:
$ git pr show -t 551
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jfx/pull/551.diff