-
Notifications
You must be signed in to change notification settings - Fork 95
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
Drag/drop in data browser or display editor results in dead mouse on Linux #3132
Comments
can't reproduce this on windows (using the master branch with javafx 21) |
Thanks for checking! Do you see this on your Linux systems? |
Yes, I can reproduce this. There is just one warning I observe
|
I see this only when dragging and dropping initiated from the widget panel. When I drag and drop a PV name from another application it works fine... in the above case, once you have dragged and dropped a widget if you then proceed to do another drag and drop ( a pv from a pv table) then the problem resolves itself |
Since this only happens on Linux, I'm not sure if there's an issue in the Linux version of JavaFX, or if there's an error in the usage of the D&D API in the display editor, something that's generally wrong, but out of pure luck it doesn't matter on Mac and Windows. |
Do you see it when re-ordering widgets in the widget tree view of the editor? |
I can reproduce it when moving widgets. If I drag and drop a widget or move it in the widget tree and then loose the selection then the problem does not happen for me |
Indeed! Not sure what that means... |
I’ve tried various things to no avail. Disabled D&D from the palette and the drag response in the editor pane, so only the widget tree does any D&D, in case there’s some conflict between them. Simplified D&D from the widget tree to drag a simple” TEST" string, no custom drag data, no drag image. Your observation regarding the selection is very interesting. After the drag, manually clearing or changing the selection indeed avoids the problem. But when I automatically clear the selection in the “okToClose” handler just before the "..Save before closing?” dialog, the problem persists. .. unless I wait 100ms after clearing the selection, then perform the rest of the okToClose code. I’m starting to think this is internal to JFX on Linux. Since it’s fine on Windows, Mac, and even with some Linux setups, there may not be any error in the display editor code. It’s also no show stopper because we have workarounds: De-select widgets, File/Save/CTRL-S to clear the ‘dirty’ state, or use keyboard for dialog buttons in the "..Save before closing?” dialog. I happened to run into this error because I had to move some widget to the "front" in several displays, so I opened in editor, moved widget in tree view, close ... and was stuck, not being able to press "OK" on the save prompt. But that’s a special scenario, not how you typically use the editor. Besides, relying on the "Save before closing?" dialog to save your changes is like relying on the safety switch in the microwave when you simply open its door without pressing "Stop". Bad idea, https://xkcd.com/2886/, https://arxiv.org/abs/1504.02165 |
Not sure if related or same issue: |
Good catch! Yes, I think that's the same issue. The dialog still allows keyboard interaction, but no mouse, right? For the "Save before closing?" dialog I can hack around it by clearing the selection as Kunal had determined and waiting a little, shown below. But again that's a hack and not sure what one would do for the databrowser's add-PV dialog. Still, this suggests there's something happening when starting the drag on Linux.
|
Yes, the solution is to confirm dialog using keyboard. |
Also happens with dragging a PV from the data browser's archive search panel into the data browser plot. |
Since my users keep reporting on this: tried JavaFX 23 (Java 21) and 24-ea (Java 23) on Ubuntu under xfce. No change :-( |
Revisited this and found something possibly related: https://askubuntu.com/questions/934910/mouse-cursor-gets-stuck-in-drag-and-drop-mode/990649#990649. In particular, if a close dialog (as described in the beginning of this thread) is cancelled with ESC key and then relaunched on new close action, the mouse will work. Modified the Also put together a Swing-based demo of similar type, but issue not reproduced. Looks like a JavaFX/Linux thing. Will consider creating a ticket on OpenJFX. |
Just discovered that if a dialog is initialized with Also narrowed this down a bit: issue introduced between OpenJFX 17.0.9 (mouse events work) and 17.0.10 (mouse events blocked). |
@abrahamwolk has performed additional testing. Possible culprit: Another workaround (with side effects) |
For the sake of traceability and reproducibility, here is the content of the bug report I am unable to submit:
Search Oracle Technology Network Java Java SE Community Report a Bug Report Classification
JavaFX
17 update releases Previously worked in the Release Report Details
System / OS / Java Runtime Information Subsequent updates still problematic, verified in all major releases up to and including 24EA.
To be noted: if the added Alert dialog is initialized with Modality.NONE or Modality.WINDOW_MODAL, the issue is not reproduced. Confidential Field (hs_err file) Reproducing the Issue
Expected Result Actual Result Source code for an executable test case import javafx.application.Application; /**
Workaround Please ensure that you do not include any personal information outside of the “Submitter Information” section of the bug report. For example, ensure that your username is not part of the paths that might be included in the bug description or in the instructions on how to reproduce the bug. Submitter Information
Oracle respects your desire for privacy. The information from the Submitter Information section of the bug report will not be sold, given, or shared with organizations external to Oracle. Oracle will use data from that section for communications with you to clarify issues regarding the report and/or to provide you with status updates The information from other sections on the submission form may be made publicly available. If you are not comfortable with the above conditions, please do not press the Submit button. If you have any questions, please refer to our Privacy Policy.
Subscribe About Oracle Careers Contact Us Site Maps Legal Notices Terms of Use Your Privacy Rights Cookiepreferenser |
Finally managed - assisted by Oracle - to get a bug report in place: |
Good start into the new year! |
There is a strange side effect of drag & drop on Linux.
Create a new display or open existing display in editor.
Drag & drop something by either dragging a new “label” from the widget palette into the editor pane, or by moving existing widgets around in the tree view. As a result, the editor will be “dirty”.
Try to close the dirty editor. As expected, a dialog appears: “..has been modified. Save before closing?”.
But the No/Yes/Cancel buttons in the dialog do not react to mouse clicks, at least not on RHEL 9.4.
When running RHEL 8.7 via a Thinlinc remove desktop, nothing in the desktop reacts to the mouse.
It is possible to use cursor keys, escape/spare/enter to interact with the dialog, but the mouse is mostly dead.
There is no problem when using drag&drop, then saving via File/Save or Ctrl-S.
There’s also no problem when dragging a PV into the data browser. The “Add PV” dialog triggered by the PV drop functions fine.
The problem appears only when using drag&drop in the display editor, then trying to close the dirty editor right away, on Linux.
Tried JFX 20.0.2+3, 21.0.3+2, 22.0.2 and 24-ea+5, same problem.
With 20.0.2, both -Djdk.gtk.version=2 and 3 exhibit the same problem.
No problem on Mac OS, don't know about Windows.
The text was updated successfully, but these errors were encountered: