Solaris Common Desktop Environment: Programmer's Guide

To Identify Workspaces That Contain the Application Window

    Use DtWsmGetWorkspacesOccupied().

    rval = DtWsmGetWorkspacesOccupied(XtDisplay(toplevel)
                XtWindow(toplevel), &paWsIn, &numWsIn);

    where:

    • XtDisplay(toplevel) is the X display.

    • XtWindow(toplevel) is the window to be searched for in the workspaces.

    • paWsIn is the address of a pointer to a list of workspace names that have been converted to X atoms.

    • numWsIn is the address of an integer into which the number of workspaces in the list is placed.

    After this call, loops are set up to compare the list of workspaces (found in the procedure SetUpWorkspaceButtons() by DtWsmGetWorkspaceList()) with the list of workspaces in which the application window was found to reside. The toggle button resource XmNset is set to True for each toggle button that represents a workspace in which the application window resides.