Citrix Seamless Applications lose focus. FIXED!

Fun with Citrix and Legacy Applications

Legacy applications sometimes have issues when you publish them as a seamless application in Citrix Xenapp. We recently came across this when publishing McKesson Practice Plus and found a fix that seems to work well. I wanted to pass this along since im sure there are plenty of Citrix admins that have had this issue and reverted to a published desktop to help with the issue and maybe this will help someone out there.

 

Summary of the issue:

When using the application (which is a couple of .exe files) the test users would complain that then worked mainly with the keyboard and sometimes in the middle of working on the program, another application would launch. we thought it was a hotkey they were pressing and we chased our tail looking for answers. It turns out the application was losing focus and the thin client desktop became the focus and pressing enter launched whatever the cursor was last on. The following article on Citrix had a listing of “SeamlessFlags” and we found that 0x8000 was the value we needed to stop this behavior.

We also added 0x100 to control how users launch applications and to set the preference to re-use existing sessions in favor of load balancing.

Seamless Global Registry Flags

These values affect all Seamless connections to a server.

To configure a Global Seamless Flag, create the value SeamlessFlags, and then specify a value corresponding to one or more of the choices listed below:

Registry Key: HKEY_LOCAL_MACHINE/System/CurrentControlSet/Control/Citrix/wfshell/TWI
Value Name: SeamlessFlags
Value Type: REG_DWORD
Values: 0x8000

Seamless Configuration Settings – Read the link below for all settings you can use.

Document ID: CTX101644 /   Created On: Apr 23, 2003   /   Updated On: May 5, 2011

http://support.citrix.com/article/CTX101644

Case Study: Seamless Flag Troubleshooting – Read this article if you want to understand how to quickly find the settings that you may need to apply.

Document ID: CTX127043 /   Created On: Nov 4, 2010   /   Updated On: Nov 4, 2010

http://support.citrix.com/article/CTX127043

We ended up using the following settings:

14. DON’T SEND DISABLE, DISABLE LOAD CHECK
Value: 0x8000, 0x100  combined to 0x8100
Explanation: Setting this Flag reverses the behavior introduced in version 8.0 of the Win32 ICA client for Seamless connections of sending the WS_DISABLED Window Style to the client. Supporting this Window Style would cause a small number of custom applications to lose focus to a local application window running on the workstation when the Seamless Application would set this Window Style and also have an invisible window in the background. The reason for introducing the ability to send the WS_DISABLE window style to the client was to support the implementation of Seamless application windows responding to the “Minimize All” or “Show Desktop” feature on Windows workstations. Therefore, setting this Flag has an affect on how Seamless Windows will respond to the windows messages sent by using the “Minimize All” or “Show Desktop” feature. 

Support for this Seamless Flag can only be activated by applying both a Win32 client and Server update that support it. See the following requirements.

 

Explanation: By default Load Balancing takes precedence over Session Sharing on a fully loaded server. New connections are routed to other less busy servers, rather than have their sessions shared with existing connections. Setting this Flag along with the required updates listed below, will allow session sharing of connections on fully loaded servers. Without this, Registry Value set or setting this value to 0x0 retains the default load balancing behavior

Supported Platforms and Required Hotfixes:

Not needed for xenapp 4.5 and 5