|Manuals

Change Browser Behavior Using ClientSettings

ClientSettings is an additional interface available in the Thinfinity VirtualUI Library that allows developers to remotely and programmatically configure particular browser settings, including cursor visibility, touch action behaviors, and session lifecycle options.

There is also a Javascript ClientSettings object version. Learn how to use it.

The following is a detailed reference of the ClientSettings interface properties:

CursorVisible

Used to set the mouse pointer to “show” or “hide”.

  • Type: Boolean
  • Default value: True
  • Available in: All Library Versions

MouseMoveGestureStyle

Defines whether the mouse movement is read as relative or absolute in touch devices.

  • Type: Enum
  • Values: MM_STYLE_RELATIVE (0), MM_STYLE_ABSOLUTE (1)
  • Default value: MM_STYLE_RELATIVE
  • Available in: All Library Versions

MouseMoveGestureAction

Indicates if the dragging should be interpreted as scrolling or turning of the mouse wheel, affecting only the component on which the action is triggered.

  • Type: Enum
  • Values: MM_ACTION_MOVE (0), MM_ACTION_WHEEL (1)
  • Default value: MM_ACTION_MOVE
  • Available in: All Library Versions

UseViewportSize

Indicates which measure values will be used to define the application’s screen size.

  • Type: Boolean
  • Values: True (use viewport size), False (use window screen based size)
  • Default value: False
  • Available in: Javascript only

DockMenu

Manages the visibility of the bottom menu and its options. Available in Javascript only.

Property Description Type Default
Enabled Enables/disables the complete Dock Menu Boolean True
Pinned Indicates when the DockMenu is pinned (visible, fixed) or unpinned (with autohide) Boolean False
Items Name/value pairs item collection
Items.WindowList Enables/disables the “Windows list” option Boolean True
Items.ErrorReporting Enables/disables the “Error Reporting” option Boolean True
Items.Keyboard Enables/disables the “Keyboard” option (mobile only) Boolean True
Items.FullScreen Enables/disables the “Full Screen” option (mobile only, if supported) Boolean True

AutoDisconnectConnection

Controls whether the connection is automatically disconnected when the user’s login session is lost. When this parameter is not set, the connection is auto-disconnected by default; set it to false to keep the connection alive across authentication drops.

  • Type: Boolean
  • Values: True (auto-disconnect on login loss), False (keep connection alive)
  • Available in: Javascript only

Most of these properties were created to provide a better end-user experience when using touch devices.

When using a touch device, it is unusual for a mouse pointer to be displayed. Instead, finger gestures are interpreted by the device as different commands, acting on the element or elements that are located where the gesture is made.

But this is not always the best way, especially when the applications were not designed for these gestures. Most of the time, the best solution to this issue is to show the pointer and simulate the mouse actions using the captured gestures.

The properties that we have presented above will help us define the ideal settings to enjoy the best possible and intuitive user experience for our application.

The following example shows how to recognize a touch or mobile device, and to change the pointer behavior when it’s detected. Warning: The detection list is not complete:

vui = new VirtualUI();
userAgent = vui.BrowserInfo.UserAgent.ToLower();

if ((userAgent.IndexOf("touch") != -1) || (userAgent.IndexOf("mobile") != -1) ||
    (userAgent.IndexOf("iphone") != -1) || (userAgent.IndexOf("ipod") != -1) ||
    (userAgent.IndexOf("ipad") != -1) || (userAgent.IndexOf("android") != -1) ||
    (userAgent.IndexOf(" cros ") != -1)) {
    vui.ClientSettings.MouseMoveGestureStyle = MouseMoveGestureStyle.MM_STYLE_ABSOLUTE;
    vui.ClientSettings.MouseMoveGestureAction = MouseMoveGestureAction.MM_ACTION_WHEEL;
}

See also