Bidirectional Content Redirection: Local web browser window does not become foreground

Bidirectional Content Redirection: Local web browser window does not become foreground

book

Article ID: CTX692078

calendar_today

Updated On:

Description

The logic of Bidirectional Content Redirection feature is that if the URL is opened via a client-side redirect. Bidirectional Content Redirection feature is using the Microsoft API SetForegroundWindow() directly to bring the window to the foreground, but it still doesn't work as expected in the customer's environment. 

As the result, the local web browser windows opened by the Bidirectional Content Redirection feature might not become foreground. The window is not always brought to foreground even after it is set to foreground, the taskbar icon flash indicating that the background app was attempted to be made active, however it was not brought to foreground.

 

Resolution

Configure following entries to 0 using Registry Editor.

Key: HKCU\Control Panel\Desktop
Name: ForegroundFlashCount 
Name: ForegroundLockTimeout 

 

ForegroundFlashCount, determines the number of times the taskbar button flashes to alert the user that the system has activated a background window. 

ForegroundLockTimeout, specifies that if the time since the last user input surpasses this value, the window is brought to the foreground.


Problem Cause

The issue arises due to a setting in the Windows OS that interacts with the Bidirectional Content Redirection feature in CWA for Windows. 

This OS feature enables windows to move between the session and the endpoint, and vice versa. When a window is brought from the session to the endpoint, it is treated as a child window of an already-running application on the endpoint. In such cases, Windows OS settings notify the user about this action. The current design of Windows OS is affecting Bidirectional Content Redirection work. 
The registry keys (ForegroundFlashCount and ForegroundLockTimeout) control how child windows are displayed to the user.