Contents

Window Controller

Generalities

Only 2 desktops are used:
- desktop 0 is the main desktop, and should be the only one active, at every moment in time
- desktop 1 is used only as a "hidden" desktop, it should never be active

A wrapper for wmctrl was created, and wmctrl commands are used directly in our code.

The wmctrl command-line application is not used, but it can be used for debugging purposes.

Legend (symbols)

Below, the corresponding command-line options are shown for each action.

'*>' is the symbol for corresponding command-line action.

'-x' options for wmctrl means to use the class-name to identify the windows

Window-Controller actions

Action - hide/show window

windows are not really hidden, they are moved to the desktop 1
*> wmctrl -x -r xcalc -t 1
windows are shown by moving them to the desktop 0
*> wmctrl -x -r xcalc -t 0
reason:
when a hide-window command is sent to the wm, the wm unmaps that window,
and this cause problems with GUI applications that expects their windows to be in a mapped state

Action - changing a window layer (similar, but not always as the same Z-order)

we use 3 layers: above, below, normal
wmctrl accepts the following layers: above, below
These layers are actually properties added for a window.