[sip-comm-dev] Dialog and Frame location problem


#1

Hi,
I use two screens on linux, and my problem is that all dialogs and frames of
sip-communicator appears in the middle between my two screens (one half of
the dialog is on the left screen, the other half on the right screen).
The problem is that the dialog is centered using
Toolkit.getDefaultToolkit().getScreenSize()

But that two screens are seen as one big large screen of 2560 pixel width.
Instead of calculating the center position of the screen, why not using
setLocationRelativeTo(null) method that will center the dialog in the middle
of the main screen, and when we have a parent frame
setLocationRelativeTo(parent) ?
If you think that the idea is good I could try to write a patch for that

Matthieu


#2

Hey Matthieu,

This does make sense so yes, a patch would be nice.

I am not sure if setLocationRelativeTo(null) may have any unwanted side
effects though (e.g. weird positioning in some OS/java version/screen
configuration scenarios) so we'd need to be careful.

Cheers,
Emil

Matthieu Casanova написа:

···

Hi,
I use two screens on linux, and my problem is that all dialogs and
frames of sip-communicator appears in the middle between my two screens
(one half of the dialog is on the left screen, the other half on the
right screen).
The problem is that the dialog is centered using
Toolkit.getDefaultToolkit().getScreenSize()

But that two screens are seen as one big large screen of 2560 pixel width.
Instead of calculating the center position of the screen, why not using
setLocationRelativeTo(null) method that will center the dialog in the
middle of the main screen, and when we have a parent frame
setLocationRelativeTo(parent) ?
If you think that the idea is good I could try to write a patch for that

Matthieu

--
Emil Ivov, Ph.D. 67000 Strasbourg,
Project Lead France
SIP Communicator
emcho@sip-communicator.org PHONE: +33.1.77.62.43.30
http://sip-communicator.org FAX: +33.1.77.62.47.31

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net