-
-
Notifications
You must be signed in to change notification settings - Fork 172
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
Java applications running with JDK6 or older can produce windows 1 pixel high / wide #705
Comments
I have also tried:
So... that leaves tracing the X11 calls done by twm and comparing with xpra's. Oh joy. |
2014-10-28 20:50:01: totaam uploaded file
|
Interesting: by killing (
I also found a ticket which looks very similar: JOSM starts as few pixel width window. - but the resolution does not apply here. |
2014-10-31 10:28:40: totaam uploaded file
|
Comparing the two xtraces, edited from the moment of the button release that creates the new dialog window: twm does:
Which can be translated as (verbs are as seen from the application context):
|
with xpra it does this:
Some of the configure requests aren't honoured, and some of those don't make much sense!
Need to investigate:
|
Attacking this from different angles:
Since there are a few tricks in the Java source code based on the window manager name, I added r8025 which allows us to easily set it ( I've also tried setting: This looks like it could be related: [http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6632124] and [http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6429775], but we do set
Then stripping the date+time from the debug output with:
And comparing the buggy one (sun jdk -) with the working version (openjdk +), I see:
Looks like something is calculating based on the screen size, and getting it badly wrong! |
2014-11-01 16:04:44: totaam uploaded file
|
Found this in the Java patch -Otherwise we do some special casing. Actually the fallback code ("default" case) seems to cover most of the existing WMs (modulo Reparent/Configure order perhaps?).* -Fallback code tries to account for the two most common cases:*
This code is absolutely horrible, no wonder they refactored it in JDK 7! I think what is happening is that the code checks for the parent size, finds it is the same as the window (because we don't have any window decorations on the server!) and assumes that the real window frame has to be the grand parent... which is the root window, and it is huge which causes the crazy large inset calculations. Setting the window manager as Run xpra as of r8033 (will backport the important bits):
Keeping this ticket open as we may want to find a cleaner solution, one that does not involve lying about our window manager name! |
2014-11-02 08:20:42: totaam uploaded file
|
Backport in 8061. Closing. |
Attached is a very simple test case.
Click on the button and the dialog window appears correctly, close it and try again and it gets mapped as a 1 pixel high window..
I have tested many versions of Java, including the IBM SDK, opensdk, Sun's SDK, etc..
This only affects Java 6 and earlier. (which is the version supported in centos 5 and some centos 6 installations..)
r7959 added
CreateNotify
support for X11 event logging since the window seemed to be configured wrong by the time we get notified.So the problem occurs very early on, when we read the window's initial dimensions.
It looks like Java is caching something (in one of its numerous hidden event windows?) which causes the new dialog window to inherit the wrong size. During a reparent maybe?
This obviously does not happen with other window managers, so we must be doing something wrong.
This ticket was originally recorded as a JOGL bug - but as can be seen in the example code, that was wrong, JOGL has nothing to do with it.
The text was updated successfully, but these errors were encountered: