Common Desktop Environment: Programmer's Overview

Workspace Manager

The Common Desktop Environment Workspace Manager provides support for multiple workspaces. Each workspace is a virtual screen. Windows can be placed in a single workspace, all workspaces, or any combination of individual workspaces. Workspaces can be added, deleted, or renamed dynamically by the user.

The Workspace Manager API provides functions for applications that need to know in which workspaces their windows reside, or that need to have some control over how the windows are placed in the workspaces. Additionally, the API enables applications to monitor changes to the overall workspace state, such as which workspace is the current one.

The Common Desktop Environment does not require applications to use the Workspace Manager API to run on the desktop. Most desktop applications can run as expected without knowledge of the Workspace Manager. In particular, if your application has a single, main, top-level window and complies with ICCCM 1.1 and Motif 1.2, you do not have to integrate with the Common Desktop Environment Workspace Manager for the application to run on the desktop.

However, more complex applications with multiple top-level windows need to use the Workspace Manager API in conjunction with the Session Manager API to properly save and restore the application's state. The Workspace Manager API enables an application to find out which workspaces each of its windows is in. The API also enables an application to display its windows in the correct workspace when the session resumes.

The Workspace Manager API addresses the following tasks:

All Workspace Manager API functions share the prefix DtWsm.

Library and Header Files

The desktop services library, libDtSvc, provides access to many desktop APIs, including that for Workspace Manager. Include the Dt/Dt.h and Dt/Wsm.h header files to access the Workspace Manager API.


Note -

If your application uses any of the Workspace Manager APIs, it must first initialize the libDtSvc library by calling either DtInitialize() or DtAppInitialize(). Refer to the DtInitialize(3) or DtAppInitialize(3) man page for more information.


Demo Programs

You can find the Workspace Manager demos in /usr/dt/examples/dtwsm. Read the README file for detailed information on the demos.

Related Documentation

For more information on Workspace Manager, see the relevant man pages and the Solaris Common Desktop Environment: Programmer's Guide.