Odd behaviour with Oxygen on Wayland
-
- Posts: 11
- Joined: Sat Mar 12, 2005 12:37 am
Odd behaviour with Oxygen on Wayland
Post by Martin Holmes »
Wayland is rapidly becoming the default on Linux, and when we upgrade our lab later this year, the machines will all be on Wayland rather than XOrg, In anticipation of this, we've been running Wayland on various machines to see what transpires. We're noticing a sporadic but persistent problem as follows:
- You're typing in Oxygen in text mode, and you hit a keyboard shortcut such as Control + E to insert a tag.
- The focus switches away from Oxygen to the last app you were using on that desktop, and anything you type after that goes into that app instead of Oxygen.
Has anyone else noticed this? If so, have you found any workarounds?
University of Victoria
-
- Posts: 160
- Joined: Mon Nov 24, 2014 1:49 pm
- Location: Greven/Germany
Re: Odd behaviour with Oxygen on Wayland
-
- Posts: 2883
- Joined: Tue May 17, 2005 4:01 pm
Re: Odd behaviour with Oxygen on Wayland
Unfortunately Java doesn't currently provide proper Wayland desktop support. There is an ongoing project regarding this,
OpenJDK Project Wakefield.
This is the most recent info I can find regarding this project:
https://inside.java/2024/03/24/openjdk-wakefield/
In the meantime, do note that Oxygen does not officially support Wayland, as mentioned on the download page:
I don't recommend switching to Wayland at this time, if you depend on Oxygen and/or Java apps. You may encounter some issues with Wayland that we cannot control.The version of Java bundled with Oxygen requires X.org. Wayland is not supported.
Regards,
Adrian
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 192
- Joined: Wed Apr 20, 2005 5:43 pm
- Location: Victoria, BC, Canada
Re: Odd behaviour with Oxygen on Wayland
Post by martindholmes »
-
- Posts: 192
- Joined: Wed Apr 20, 2005 5:43 pm
- Location: Victoria, BC, Canada
Re: Odd behaviour with Oxygen on Wayland
Post by martindholmes »
-
- Posts: 192
- Joined: Wed Apr 20, 2005 5:43 pm
- Location: Victoria, BC, Canada
Re: Odd behaviour with Oxygen on Wayland
Post by martindholmes »
1. Work in another application.
2. Alt + Tab to Oxygen. Oxygen receives the focus, and a cursor is apparent in the Oxygen editor.
3. Type or use the keyboard: nothing happens in Oxygen, although sometimes another application receives the keyboard events.
4. Click away from Oxygen and back again, OR move the mouse up to the Oxygen title bar and back again, and Oxygen does receive the focus properly, and typing now works.
This is happening many times a day. I'm using the latest Oxygen with its built-in Java.
-
- Posts: 2883
- Joined: Tue May 17, 2005 4:01 pm
Re: Odd behaviour with Oxygen on Wayland
We've recently tested Oxygen v26.1 on Ubuntu 24 Desktop but did not observe the described issues.
I'd like to point out that from this:
if the events get to another application and not Oxygen, it may be a window manager issue (app appears to be selected, but does not actually have keyboard focus, so it does not receive keyboard events). Or in the very least it's an issue between Java and the window manager.3. Type or use the keyboard: nothing happens in Oxygen, although sometimes another application receives the keyboard events.
What you can try is to install OpenJDK 17 JRE from the Ubuntu repository (apt install openjdk-17-jre). Do note that OpenJDK 21 or 22 are not supported by Oxygen v26, so we cannot recommend them.
Then rename the "jre" folder from the Oxygen installation folder (e.g. "jre.old") and run Oxygen like this. It will complain about the Java vendor at startup, but as long as the version if supported, it should allow you to continue.
You can check what version of Java is Oxygen using in Help > About, System properties, java.vm.vendor, java.vm.version.
Regards,
Adrian
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 192
- Joined: Wed Apr 20, 2005 5:43 pm
- Location: Victoria, BC, Canada
Re: Odd behaviour with Oxygen on Wayland and X
Post by martindholmes »
-
- Posts: 2883
- Joined: Tue May 17, 2005 4:01 pm
Re: Odd behaviour with Oxygen on Wayland
Comparing Oxygen with Eclipse isn't really apples too apples.
Eclipse uses SWT (native UI components), while Oxygen uses Swing (mimics UI components). It's usually the Swing implementation from Java that has issues.
Can you test with a different Java app that uses Swing, (e.g. IntelliJ IDEA or Netbeans)?
For starters, as long as it's not in production, you can test Oxygen 26.1 with OpenJDK 21, at least test for the issue you are encountering. It does run with 21, but you may experience some unforeseen issues.The problem is that we use OpenJDK 21 as our base Java install, so switching to 17 is going to be tricky.
Regards,
Adrian
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 192
- Joined: Wed Apr 20, 2005 5:43 pm
- Location: Victoria, BC, Canada
Re: Odd behaviour with Oxygen on Wayland
Post by martindholmes »
1. Open Oxygen and at least one other application.
2. Set the focus to Oxygen.
3. Select some text in an XML file and press Control + E to insert a tag; select a tag and hit return to apply it.
4. Try do do anything with the keyboard. The keyboard focus has been switched to the last other application that had the focus before Oxygen.
Pressing Alt + Tab to cycle through applications will eventually bring the focus back to Oxygen.
This is on Ubuntu 24.04, using the JRE packaged with Oxygen. It happens with both Wayland and X. We think it may have something to do with Oxygen showing a dialog box, then that dialog box being dismissed.
-
- Posts: 2883
- Joined: Tue May 17, 2005 4:01 pm
Re: Odd behaviour with Oxygen on Wayland
That seems to indicate a window hierarchy problem (focus should return to the parent window). What window manager are you using?
We've tested this in a Ubuntu Desktop 24 VM with Text Edit as the other app, but cannot reproduce the issue.
Are there any other specifics or particularities of the setup?
Perhaps multiple screens, or a specific graphics card/driver (if on metal)?
Do you have multiple systems/instances with this problem?
Regards,
Adrian
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 192
- Joined: Wed Apr 20, 2005 5:43 pm
- Location: Victoria, BC, Canada
Re: Odd behaviour with Oxygen on Wayland
Post by martindholmes »
We're now having to train people to alt-tab away and back again whenever they type and nothing happens. It's really quite frustrating.
Have you really had no other reports of this? It's hard to believe we're the only ones having it.
Cheers,
Martin
-
- Posts: 2883
- Joined: Tue May 17, 2005 4:01 pm
Re: Odd behaviour with Oxygen on Wayland
No, I'm afraid this is the only report we've had about this. So it's rather unusual that the issue is so spread in your environment. I would have expected this to fall under some hardware or software setup peculiarity which causes Java to misbehave...
I guess this may be something that only reproduces with real hardware (probably graphics card). I'll submit a task for our QA team to test this on metal, but it could take a while to set this up. We mostly use VMs for testing.
In the meanwhile, on one of the Ubuntu 24 systems that is affected, could you please send us a problem report from within Oxygen, Help > Report problem?
On another note, have you considered testing this with OpenJDK 21 that the Ubuntu repository has to offer?The problem is that we use OpenJDK 21 as our base Java install, so switching to 17 is going to be tricky.
Regards,... rename the "jre" folder from the Oxygen installation folder (e.g. "jre.old") and run Oxygen like this. It will complain about the Java vendor at startup, but as long as the version if supported, it should allow you to continue.
You can check what version of Java is Oxygen using in Help > About, System properties, java.vm.vendor, java.vm.version.
Adrian
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 192
- Joined: Wed Apr 20, 2005 5:43 pm
- Location: Victoria, BC, Canada
Re: Odd behaviour with Oxygen on Wayland
Post by martindholmes »
I'm going to install Oxygen 27.0 today and run with that for a few days to see if the problem goes away; for all we know it's something specific to 26.0 and the JRE that comes with it. If it's still there in 27.0, I'll try the JRE switch and see how that goes. If nothing works, I'll file a report from Oxygen.
Thanks,
Martin
-
- Posts: 192
- Joined: Wed Apr 20, 2005 5:43 pm
- Location: Victoria, BC, Canada
Re: Odd behaviour with Oxygen on Wayland
Post by martindholmes »
I'm going to stick with this for the rest of the day, and then next week some time I'll try renaming the JRE and letting it run under OpenJDK (currently openjdk 21.0.5 2024-10-15).
-
- Posts: 192
- Joined: Wed Apr 20, 2005 5:43 pm
- Location: Victoria, BC, Canada
Re: Odd behaviour with Oxygen on Wayland
Post by martindholmes »
Is there any chance this will ever be fixed? Is there anything we can do to help you fix it? It's very frustrating.
Cheers,
Martin
-
- Posts: 2883
- Joined: Tue May 17, 2005 4:01 pm
Re: Odd behaviour with Oxygen on Wayland
Build 2025032106 is actually v27.1 of Oxygen.
I still think this is down to something specific to your setup. We have tested in various environments with Wayland, but could not reproduce this specific behavior.Same problem, instantly, perfectly reproducible -- just Control + F search for something, then dismiss the search dialog, and your keyboard migrates to another app.
Did you ever give OpenJDK 21 a try?I'm going to stick with this for the rest of the day, and then next week some time I'll try renaming the JRE and letting it run under OpenJDK (currently openjdk 21.0.5 2024-10-15).
Regards,
Adrian
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 2883
- Joined: Tue May 17, 2005 4:01 pm
Re: Odd behaviour with Oxygen on Wayland
Other than OpenJDK 21, searching the web I found an env var that was proposed as a workaround for a different Wayland issue (blank windows).
But I guess it doesn't hurt to try it, if you have the opportunity:
Code: Select all
export _JAVA_AWT_WM_NONREPARENTING=1
Regards,
Adrian
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 192
- Joined: Wed Apr 20, 2005 5:43 pm
- Location: Victoria, BC, Canada
Re: Odd behaviour with Oxygen on Wayland
Post by martindholmes »
-
- Posts: 192
- Joined: Wed Apr 20, 2005 5:43 pm
- Location: Victoria, BC, Canada
Re: Odd behaviour with Oxygen on Wayland
Post by martindholmes »
Also, that parameter seems to break the app menus -- menus don't stay open when you click on them, so you can't select a subitem.
-
- Posts: 2883
- Joined: Tue May 17, 2005 4:01 pm
Re: Odd behaviour with Oxygen on Wayland
OK, let's backtrack a little, so do you see this with any dialog in Oxygen or only with the Find/Replace dialog in specific?
I'm asking because the Find/Replace dialog has a peculiarity, it's a non-modal dialog and there are some tricks in place to accommodate it's specific behavior. I'm guessing there may be a weird situation where it somehow "forgets" what parent window it has or the parent window is not correctly detected in the first place and remains null....
What window manager is used in Ubuntu, or is it an installation of Ubuntu desktop with default options?
Regards,
Adrian
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 192
- Joined: Wed Apr 20, 2005 5:43 pm
- Location: Victoria, BC, Canada
Re: Odd behaviour with Oxygen on Wayland
Post by martindholmes »
I didn't know you'd replied to me -- sorry.
I can reliably reproduce the problem with the find/replace dialog, which I use all the time. However, we're now getting reports from users on Windows 10 and on Mac OS 15.05, that they're seeing exactly the same thing, especially with the find/replace dialog. It turns out our research assistants had just assumed this was a known bug, after seeing in on Linux and learning how to work around it, and they just lived with it on the other OSes too without reporting it to us.
So this is clearly nothing to do with Ubuntu or Linux; it's everywhere. The only reliable way I can reproduce it is using the find dialog; although most users are not really clear on when/how it gets triggered, it's possible that it's always that dialog that's involved; that seems a good place to start. Is there a way to turn off the special behaviour of that dialog and make it modal for testing?
-
- Posts: 192
- Joined: Wed Apr 20, 2005 5:43 pm
- Location: Victoria, BC, Canada
Re: Odd behaviour with Oxygen on Wayland
Post by martindholmes »
If there's any way it's possible to have this dialog box just behave like a regular modal dialog, perhaps all these problems could be solved. Whatever it is that's being done to make it "special" seems to be at the root of these issues.
Cheers,
Martin
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service