josmas / openwonderland

Automatically exported from code.google.com/p/openwonderland
GNU General Public License v2.0
3 stars 5 forks source link

Main window should have focus on Mac clients too #201

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The default behaviour in Linux/Windows is that the client starts up and the 
main window has the focus, so the avatar can be controlled straight away.

In mac, the SIP communicator window grabs the focus from the main client, so 
the main window has to be clicked in order to move the avatar.

In other platforms the softphone does not create a window.

Original issue reported on code.google.com by josmasfl...@gmail.com on 7 Sep 2011 at 10:10

GoogleCodeExporter commented 9 years ago
Comments from issue 92:

executing the process in a headless way makes the softphone crash. It can be 
done by adding the flag:
java -Djava.awt.headless=true

source (with further link to more elaborate info): 
http://zzamboni.org/brt/2007/12/07/disable-dock-icon-for-java-programs-in-mac-os
x-howto/index.html

The code to start the softphone is here:
http://code.google.com/p/openwonderland/source/browse/trunk/core/src/classes/org
/jdesktop/wonderland/client/softphone/SoftphoneControlImpl.java#271

Feel free to add the java.awt.headless property and see if it works. My only 
concern is whether you can turn off the headless option, for example when we 
use tools->audio->show softphone.  If not, it looks like startSoftphone() waits 
until the softphone process is started. So presumably you could find where that 
is called (probably in audio-manager), and after it returns, grab focus back to 
the main screen.

No luck with the flag. It crashes the softphone on startup. and it seems that 
making it headless friendly is somehow rather involved. 
http://java.sun.com/developer/technicalArticles/J2SE/Desktop/headless/

Original comment by josmasfl...@gmail.com on 7 Sep 2011 at 10:13