Solaris Common Desktop Environment: Motif Transition Guide

Tips

Here are some tips about writing applications for the CDE desktop.

Floating Menus

To ensure that your application works properly on the CDE desktop, any functionality you put into floating menus should also be provided by some pulldown menu. This will enable your application to work with both two-button and three-button mouse devices.

Colormap Behavior

Colormap installation is handled differently under CDE than it was in the OpenWindows environment. This difference is most visible for applications that specify a list of subwindows that use colormaps other than the default colormap. This list of subwindows is specified in the WM_COLORMAP_WINDOWS property.

In the OpenWindows environment, applications need only to specify a list of subwindows in this property. As the user moves the pointer around the screen, the OpenWindows window manager (olwm) installs the appropriate colormap for whatever window is under the pointer.

The CDE window manager, dtwm, does not provide this behavior. Applications that relied on olwm's pointer-based colormap installation will likely not display in their proper colors when run under CDE. There are several things that you can do to avoid this problem:

The user can also modify the key bindings of dtwm to bind the f.next_cmap() and f.prev_cmap() functions to keyboard keys. These functions will step forward and backward through the WM_COLORMAP_WINDOWS list and install a different colormap each time the user presses the appropriate keys.