[jitsi-dev] positioning PreCallDialog and CallDialog on same screen as MainFrame


In Linux (and others?), both PreCallDialog and CallDialog always appear on
the "primary" monitor, instead of the same monitor where jitsi (MainFrame)
is running.

To fix this, a call to:

window.setLocationRelativeTo(Component c)

needs to be used, where 'c' is some component on the desired screen.

Instead of using the MainFrame directly as the component, I used a dummy
frame created with the same GraphicsConfiguration as the MainFrame.
Something like

JFrame dummy = new


(This solution came from stackoverflow).

This preserves the "centering on screen" that was there before, but on the
correct monitor.

I'd send a patch but there are licensing issues? I can sign something if
you point me in the right direction.

Anyway, it's only about 5 lines of code, and the result is that the dialogs
appear on the correct monitor.


David Mansfield,
Cobite, INC.