Compiz does not place Java windows correctly

Bug #1156919 reported by Damiön la Bagh
38
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Compiz
Invalid
Undecided
Unassigned
compiz (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

http://askubuntu.com/questions/77423/how-can-i-get-java-apps-to-follow-compiz-window-rules

I have this same issue with my POS terminals. When the employee brings up a Java dialog screen Compiz does not take over the Swing rules and place the window.

What ends up happening is that the dialog box moves further and further down the screen until the buttons are off screen and the dialog box is un-useable.

I've attached two screenshots of the behavior.

Steps to reproduce:
1.) Open a Java based application with a pop-up dialog box and open the dialog
2.) Open Compiz Setting Manager
3.) Choose Window Placement
4.) Click Fixed Window Placement
5.) Click New under Windows with fixed placement mode
6.) Click on the +
7.) Course Name
8.) Choose Get
9.) Select the window you want centered
10.) Click add
11.) Change mode to Centered
12.) click close
13.) Open and close the dialog box several times
14.) box moves towards and eventually off the screen after several open and closes.

What should happen
Compiz should place the window where it's told to place the window in the center of the screen overriding the Java Swing behavior.

Also Compiz should stop Dialog boxes from ever appearing below the screen line when automatically placed.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: compizconfig-settings-manager 0.9.5.92-0ubuntu3
ProcVersionSignature: Ubuntu 3.5.0-26.42~precise1-generic 3.5.7.6
Uname: Linux 3.5.0-26-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.0.1-0ubuntu17.1
Architecture: amd64
Date: Tue Mar 19 00:58:55 2013
InstallationMedia: Ubuntu 12.04.2 LTS "Precise Pangolin" - Release amd64 (20130213)
MarkForUpload: True
PackageArchitecture: all
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 LANG=nl_NL.UTF-8
 SHELL=/bin/bash
SourcePackage: compizconfig-settings-manager
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Damiön la Bagh (kat-amsterdam) wrote :
Revision history for this message
Damiön la Bagh (kat-amsterdam) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in compizconfig-settings-manager (Ubuntu):
status: New → Confirmed
Revision history for this message
eric o (ericforever) wrote :

I also experiment this bug, most notably (for me) with PHPStom.

Each time an option window is opened, it is slightly offset to the right and the bottom (even though Compiz is configured to place them 'Centered'). And, instead of stopping to offset when a window has reached the bottom edge of the screen, it stops when the window is slightly off screen... In most case, this results in the window's buttons being hidden, as described by the original reporter.

I have just found a workaround, which prevents the windows from being placed off screen, even if it does not make them comply with configured Compiz rules.

Workaround: in Compiz > Place Windows > General tab, there is a checkbox called "Solutions" (not sure of the name in English), which was checked by default on my install. Unchecking this prevents windows from being placed offscreen.

affects: compizconfig-settings-manager (Ubuntu) → compiz (Ubuntu)
tags: added: compiz-0.9
Revision history for this message
Wasurerarenai (mwboever) wrote :

I can confirm this bug for Ubuntu 10.04.4. CCSM has an option "Workarounds" with a check box in English in the Place Window plugin's General tab. Plugin "Workarounds" has a "Java Window Fix" enabled by default but this doesn't seem to affect this.

Versions:
Ubuntu - 10.04.4
compiz 1:0.8.4-0ubuntu15.3
compizconfig-settings-manager 0.8.2-0ubuntu1
compiz-plugins 1:0.8.4-0ubuntu15.3

Revision history for this message
Jeroen de Jong (jeroen-de-jong) wrote :

I have the same problem: The main window of my Java application is placed fine according to the Compiz rules, but every new window is place so far right that only part of the left border is still visible. It took me half an hour to find this window, since this border is hardly visible.

I tried to uncheck the "Workaround" in the Compiz -> Window Placement -> General tab, but that did not change anything. I also tried to force the placement of these windows to a fixed position by providing the window class. This did not have any effect either. Also, to me it looks like Compiz completely ignores the windows created by my Java application.

MC Return (mc-return)
Changed in compiz:
milestone: none → 0.9.10.0
MC Return (mc-return)
Changed in compiz:
milestone: 0.9.10.0 → 0.9.11.0
Revision history for this message
Yannick Mauray (yannick-mauray) wrote :

Easily reproductible with a simple Java testcase (attached below) : a window is placed at coordinates (100,100) (that part works fine), but is immediately moved and reported to be at (101, 128) : 1 pixel to the right, due to the window border, and 28 pixels below, which is the titlebar's height.

We ran this testcase on another window manager and the reported position is (100,100). We also ran it on other operating systems and they report (100,100) also.

Changed in compiz (Ubuntu):
assignee: nobody → Eleni Maria Stea (hikiko)
Revision history for this message
Eleni Maria Stea (hikiko) wrote :

Thank you for the bug report and the test cases provided. I ran the test case on Ubuntu Trusty (Compiz 0.9.11) and I was always getting position: (100, 100). The window is never placed on the screen center though which is certainly a problem, so, I'll get a look!

Revision history for this message
Eleni Maria Stea (hikiko) wrote :

I think this bug is related to this one: https://bugs.launchpad.net/unity/+bug/1228470 I can't fully reproduce it though...

Changed in compiz (Ubuntu):
assignee: Eleni Maria Stea (hikiko) → nobody
Changed in compiz:
status: New → Confirmed
Revision history for this message
fcole90 (fcole90) wrote :

Thank you for taking the time to report this bug. We have tried to recreate this on the latest release of Ubuntu and cannot reproduce it. This bug is being marked as Invalid. If you believe the problem to still exist in the latest version of Ubuntu please comment on why that is the case and change the bug status to NEW.

Changed in compiz:
status: Confirmed → Invalid
Changed in compiz (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.