Window manager

From GNUstepWiki

(Difference between revisions)
Revision as of 03:23, 30 March 2007
Martin (Talk | contribs)

← Previous diff
Revision as of 03:33, 30 March 2007
Martin (Talk | contribs)

Next diff →
Line 45: Line 45:
=Window Style= =Window Style=
Window style is more or less unchanged, except GNUstep want to display edited document: <tt>GSDocumentEditedFlag</tt> Window style is more or less unchanged, except GNUstep want to display edited document: <tt>GSDocumentEditedFlag</tt>
 +
 +=Window Type=
 +EWMH defines:
 + _NET_WM_WINDOW_TYPE_DESKTOP, ATOM
 + _NET_WM_WINDOW_TYPE_DOCK, ATOM
 + _NET_WM_WINDOW_TYPE_TOOLBAR, ATOM
 + _NET_WM_WINDOW_TYPE_MENU, ATOM
 + _NET_WM_WINDOW_TYPE_UTILITY, ATOM
 + _NET_WM_WINDOW_TYPE_SPLASH, ATOM
 + _NET_WM_WINDOW_TYPE_DIALOG, ATOM
 + _NET_WM_WINDOW_TYPE_DROPDOWN_MENU, ATOM
 + _NET_WM_WINDOW_TYPE_POPUP_MENU, ATOM
 + _NET_WM_WINDOW_TYPE_TOOLTIP, ATOM
 + _NET_WM_WINDOW_TYPE_NOTIFICATION, ATOM
 + _NET_WM_WINDOW_TYPE_COMBO, ATOM
 + _NET_WM_WINDOW_TYPE_DND, ATOM
 + _NET_WM_WINDOW_TYPE_NORMAL, ATOM

Revision as of 03:33, 30 March 2007

In Windows and Mac OS X the window manager is tied into the OS. That's not the case for Linux or BSD. Window Maker is the recommended window manager for GNUstep, but a standard feature-set is needed. GNUstep-based applications have additional needs beyond traditional window managers, like handling the dock icon or the menus. Collecting the requirements here will lead to a specification, so any window manager can clearly state whether or not it is GNUstep-compliant.

Contents

Backend WM Attributes

Headers/x11/XGServerWindow.h defines

 unsigned long flags
 unsigned long window_style
 unsigned long window_level
 unsigned long reserved
 Pixmap miniaturize_pixmap;    // pixmap for miniaturize button
 Pixmap close_pixmap;          // pixmap for close button.
 Pixmap miniaturize_mask;      // miniaturize pixmap mask
 Pixmap close_mask;            // close pixmap mask
 unsigned long extra_flags;
 #define GSWindowStyleAttr                   (1<<0)
 #define GSWindowLevelAttr                   (1<<1)
 #define GSMiniaturizePixmapAttr             (1<<3)
 #define GSClosePixmapAttr                   (1<<4)
 #define GSMiniaturizeMaskAttr               (1<<5)
 #define GSCloseMaskAttr                     (1<<6)
 #define GSExtraFlagsAttr                    (1<<7)
 #define GSDocumentEditedFlag                (1<<0)
 #define GSWindowWillResizeNotificationsFlag (1<<1)
 #define GSWindowWillMoveNotificationsFlag   (1<<2)
 #define GSNoApplicationIconFlag             (1<<5)
 #define WMFHideOtherApplications            10
 #define WMFHideApplication                  12

Window Level

GNUstep needs arbitrary window levels. EWMH defines these two:

 _NET_WM_STATE_ABOVE, ATOM
 _NET_WM_STATE_BELOW, ATOM

The rest depends on the function of a window. To obtain good interoperability between different Desktop Environments, the following layered stacking order is recommended, from the bottom to the top:

  1. windows of type _NET_WM_TYPE_DESKTOP
  2. windows having state _NET_WM_STATE_BELOW
  3. windows not belonging in any other layer
  4. windows of type _NET_WM_TYPE_DOCK (unless they have state _NET_WM_TYPE_BELOW) and windows having state _NET_WM_STATE_ABOVE
  5. focused windows having state _NET_WM_STATE_FULLSCREEN

Windows that are transient for another window should be kept above this window.

The window manager may choose to put some windows in different stacking positions, for example to allow the user to bring currently active window to the top and return it back when the window loses focus.

Window Style

Window style is more or less unchanged, except GNUstep want to display edited document: GSDocumentEditedFlag

Window Type

EWMH defines:

 _NET_WM_WINDOW_TYPE_DESKTOP, ATOM
 _NET_WM_WINDOW_TYPE_DOCK, ATOM
 _NET_WM_WINDOW_TYPE_TOOLBAR, ATOM
 _NET_WM_WINDOW_TYPE_MENU, ATOM
 _NET_WM_WINDOW_TYPE_UTILITY, ATOM
 _NET_WM_WINDOW_TYPE_SPLASH, ATOM
 _NET_WM_WINDOW_TYPE_DIALOG, ATOM
 _NET_WM_WINDOW_TYPE_DROPDOWN_MENU, ATOM
 _NET_WM_WINDOW_TYPE_POPUP_MENU, ATOM
 _NET_WM_WINDOW_TYPE_TOOLTIP, ATOM
 _NET_WM_WINDOW_TYPE_NOTIFICATION, ATOM
 _NET_WM_WINDOW_TYPE_COMBO, ATOM
 _NET_WM_WINDOW_TYPE_DND, ATOM
 _NET_WM_WINDOW_TYPE_NORMAL, ATOM