Java dialogs which are relatively placed (with something like 'dialog.setLocationRelativeTo(al);') show up OK when they're started in the top-left frame.
When the upper-left corner is lower, the dialog is placed too low. If it is further to the right, the dialog is placed even more to the right.
A simple example app exhibiting the problem
added the java-6-sun implementation of setLocationRelativeTo
In ioncore_manage_clientwin the XWindowAttributes of the dialog are already relative to the screen, while the xlib documentation specifies this should be relative to the parent window's origin ( http://tronche.com/gui/x/xlib/window-information/XGetWindowAttributes.html ).
That would sort of indicate java (swing/awt) is wrong and ion is right. On the other hand, metacity does place the dialogs at the location you'd expect them. I guess we'd have to find out how/why.
The output of 'xwininfo -root -tree' reveals the 'Container' X window is not actually a parent window of the popup: they are next to each other.
On metacity, both Container and Dialog are under the root window. Since the parent window is the root window, having the coordinates relative to the screen instead of to the parent window does not make any difference at all here.
On Notion, on the other hand, Container and Dialog are both children of the enclosing frame. Java seems to erroneously specify the dialog coordinates relative to the top-left of the screen instead of the top-left of the frame, making the dialog show up too far to the lower right.
As this seems to be a Java problem, I'm not sure what we can do to fix this problem.
- We might somehow be able to recognize the error and compensate
- Perhaps the dialogs should float instead of being a child of the parent frame
- the problem might be mitigated by moving the dialog ensuring that at least the entire dialog is shown, instead of being moved 'off-screen'
I can override window placement parameters for transient windows, but not for those non-transient popups.
Help needed.
Possible fix: http://sourceforge.net/mailarchive/forum.php?thread_name=20110305004741.GJ24234%40bzzt.net&forum_name=notion-devel - testing/review needed :)
http://notion.git.sourceforge.net/git/gitweb.cgi?p=notion/notion;a=commit;h=0cd1e04960312d5c1c1a28efe5bc9f3453e33de2
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).