![]() |
![]() |
| |
Chapter 6Integrating with the Workspace ManagerThe Workspace Manager provides the means for an application to manage its windows within the desktop's multiple workspace environment. An application can perform four major tasks by communicating with the Workspace Manager:
Normally, Session Manager will get your application main window into the right workspace without your intervention. However, if your application has multiple top-level windows, you should use the Workspace Manager API to figure out where your windows are and save this data as part of your session state. See Chapter 4, Integrating with Session Manager for details on saving application-related information between sessions. Communicating with the Workspace ManagerAn application communicates with the Workspace Manager by using functions provided by the desktop. These functions allow you to quickly and easily perform a variety of tasks associated with workspace management. The following is a list of these functions:
Segments of code from two demo programs (occupy.c and wsinfo.c) illustrate the use of these functions. Listings for occupy.c, wsinfo.c, and makefiles for several brands of workstations are in the directory /usr/dt/examples/dtwsm. See the applicable man page for more information on each function. Placing an Application Window in WorkspacesAn application can place its windows in any or all of the existing workspaces. DtWsmOccupyAllWorkspaces() places the windows in all currently defined workspaces, while DtWsmSetWorkspacesOccupied() places the windows in all workspaces named in a list that is passed to the function.
|
DtWsmOccupyAllWorkspaces (XtDisplay(toplevel),
XtWindow(toplevel));
|
where:
XtDisplay(toplevel) is the X display.
XtWindow(toplevel) is the window to be placed in all workspaces.
See the DtWsmOccupyAllWorkspaces() man page for more information on this function.
Previous Contents Index Next ![]() |