Unity: wrong window dimensions / location in Java applications
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Compiz |
Fix Released
|
High
|
Sam Spilsbury | ||
0.9.9 |
Fix Released
|
High
|
Sam Spilsbury | ||
JOSM |
Unknown
|
Medium
|
|||
compiz (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
openjdk-7 (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
In Java applications, the functions to set and get window dimensions and position do not work as expected. This problem is only observed in Unity but not gnome, Win., etc.
Details:
* Call setSize(200, 200) and setLocation(
* If you call getSize() and getLocation() directly after making the JDialog visible, the result will be (200,200) and (300,400). Calling getSize() and getLocation() again, a split second later, the result is now (200,200) and (301,428). In both cases, the values are wrong, the size and location is actually (202,229) and (300,400) as shown by a screen capture.
Consequences:
* If the dialog is designed to reach to the bottom of the screen, the lower end will be cut off about 30 pixel, so the window needs to be moved by the user each time to see the lower button row (e.g. settings dialog in netbeans on medium resolution screen).
* In applications that save and restore window position and size, the window will move down 28 pixel each time it is opened an closed (e.g. JOSM, preference dialog).
Expected behavior:
* The result of getLocation() should be constant for one window unless the user moves the window
* setSize(dx,dy) should not set the size of the content pane, but the size of the entire window, including window decorations
* be consistent for all Window objects, e.g. in the attached sample, the JFrame works correctly, but the JDialog shows the described bug
Output of the sample code (press button "click", then press button "click2"):
dlg.getLocation
dlg.getLocation
Note: Both getLocation() and getLocationOnSc
Observed for the following Java versions:
java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.5) (6b24-1.
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
and
java version "1.7.0_09"
OpenJDK Runtime Environment (IcedTea7 2.3.4) (7u9-2.
OpenJDK 64-Bit Server VM (build 23.2-b09, mixed mode)
Ubuntu 12.10
unity-6.
update: same behavior in gnome classic with compiz running
Related branches
- Andrea Azzarone: Approve
- PS Jenkins bot (community): Approve (continuous-integration)
- MC Return: Approve
-
Diff: 19 lines (+8/-1)1 file modifiedplugins/decor/src/decor.cpp (+8/-1)
Changed in josm: | |
importance: | Unknown → Medium |
description: | updated |
Changed in compiz: | |
milestone: | 0.9.9.2 → 0.9.10.0 |
Changed in compiz: | |
status: | Fix Committed → Fix Released |
Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https:/ /wiki.ubuntu. com/Bugs/ FindRightPackag e. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.
To change the source package that this bug is filed about visit https:/ /bugs.launchpad .net/ubuntu/ +bug/1110138/ +editstatus and add the package name in the text box next to the word Package.
[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]