Amit Sharma
Amit Sharma

Reputation: 501

WPF Popup getting closed in a seamless citrix mode

First things first, this problem only happens while working in Citrix XenApp seamless mode (which, in simplest of words means the actual app is running on some citrix host but it is simulated as residing in your own desktop). I will take this up with Citrix Support as well but just wanted to poll the group in case someone faced a problem like this before.

I have a WPF app which uses Winforms NotifyIcon to reside in system tray until mouse clicked. In Citrix seamless mode, as user clicks the icon in system tray, the popup flashes and immediately closes on its own.

The Popup window is a vanilla one created with StaysOpen as FALSE and same works in every other environment.

Any suggestions ? This is what I've noticed so far:

  1. The window stays open if I use StaysOpen as true. But then I don't have a way to close the window manually when it loses focus. LostFocus Event doesn't get fired on popup when user clicks outside.
  2. In citrix seamless mode, the MouseEnter event is captured but MouseLeave is NOT so the approach of closing the window if user mouse is outside the window for X secs is not achievable.
  3. Tried the workaround of starting the popup with Staysopen as FALSE and then reset staysopen after like 2 secs so that the pop sticks. It works but a soon as I set StaysOpen as FALSE once the timer is hit, the pop up closes on its own.
  4. Without all these workarounds, if a user quickly clicks (leftclick) on the window before it disappears, the pop up sticks so I tried few ways to simulate the mouse click on the popup as it opens up but that doesn't cut it either.

Thanks

Upvotes: 1

Views: 1270

Answers (1)

donovan
donovan

Reputation: 1472

I can't help you with specific advice for tweaking your app to work around the issue, however there is always the hit it very hard with a hammer approach, i.e. tell consumers of your app to disable seamless for your application:

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

Update: I pinged the original seamless dev - he said it sounds like a bug where seamless is not correctly routing all the necessary mouse messages between client and server. He said the best way to diagnose this was to run the Spy++ tool on the XenApp server and on the client, and then compare the messages each side sees to identify what messages are not getting translated. Since it sounds like a genuine bug, your best bet is to raise a support ticket with Citrix support and provide them with a sample app that can repro the bug.

Upvotes: 0

Related Questions