Got sick of having to alt-tab every time I got xfired ingame, was reading up on it, and there is a workaround that seems to work fine.
Browse to:
"C:\ProgramData\Xfire"
and open the file 'xfire_games.ini', and do a text search for "Battlefield 3", it's game number 6894.
Change all the settings to the following:
[6894]
LongName=Battlefield 3
ShortName=bf3
LauncherDirKey=HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\EA GAMES\Battlefield 3\Install dir
LauncherUrl=http://battlelog.battlefield.com/bf3/
DetectExe=bf3.exe
Launch=%UA_LAUNCHER_URL% %UA_LAUNCHER_EXTRA_ARGS% %UA_LAUNCHER_NETWORK_ARGS%
InGameRenderer=D3D11
InGameFlags=USE_PRESENT|ENABLE_MOUSE|USE_WINDOWS_INPUT
RunElevated=1
Note, this appears to only work for DX11 cards, there is a workaround for DX10, but you have to change the "InGameRenderer=D3D11" to "InGameRenderer=D3D10".
Also, you may have a different registry entry for the installation directory for BF3 depending on 32bit or 64bit and Win version etc, so make sure to change it if so.
Apparently Steam Overlay can work as well by adding Origin to list of steam apps, haven't tried yet.
Edited 3 times, last edited 21/2/12 - 8:21pm.
Posted on Tuesday, 21st February 2012