icewm hints, etc... (Was: Re: Are their public standards for "window manager compatability"?)



The primary destination of this mail is GNOME mailing list. I have
included
in the cc: other people that have mailed me about icewm / hints.

raster@redhat.com wrote:
 
> Well I can't find any docs on the ICEWM hints anywhere - I don't know
> if they are planned or have ben coded, but here's E 0.14's Extended
> hints:

I attached the current icewm hints plans. Comments are very welcome. I
am
fully willing to make necessary changes and would really like that
people
would agree on one set of hints. If somebody wants to add a clean
extension
to current icewm hints to suit other gui styles better I certanly add
and suport them (icewm is strongly oriented towards CUA gui style. I
haven't
ever used NeX?t or a Mac).

Note: this proposal assumes that Motif and standard X hints are
supported
in a sensible way. Do we need a hint for 'X' decoration button (does CDE
have any extensions to Motif hints)?

I welcome comments on icewm hints (WinMgr.h attached). The proposal
seems
a bit large and involved, but I have tried to be thorough.

I will also make icewm 0.9.1 snapshot available today (experimental, 
there were lots of changes - but seems stable so far). It implements
some
of the proposed hints and registers with Session Manager and can
be restarted in a session. There is no support for saving window state
yet.

Experimental Enlightenment hints follow: 
> #define EXTENDED_HINT_STICKY            (1<<0)
> #define EXTENDED_HINT_ONTOP             (1<<1)
> #define EXTENDED_HINT_ONBOTTOM          (1<<2)
> #define EXTENDED_HINT_NEVER_USE_AREA    (1<<3)
> #define EXTENDED_HINT_DESKTOP           (1<<4)
> 
> typedef struct _extended_hints
> {
>    int flags;
>    int desktop;
> } ExtendedHints;
> 
> void
> GNOME_GetHints(EWin *ewin)
> {
>    Atom                a1, a3;
>    unsigned long       lnum, ldummy;
>    int                 dummy;
>    ExtendedHints       *eh;
> 
>    a1 = XInternAtom(disp, "WM_EXTENDED_HINTS", False);
>    eh = NULL;
>    XGetWindowProperty(disp, ewin->client.win, a1, 0, sizeof(ExtendedHints)/
>                       sizeof(unsigned long), False, a1, &a3, &dummy, &lnum,
>                       &ldummy, (unsigned char **)&eh);
>    if (eh)
>      {
>         if (eh->flags & EXTENDED_HINT_STICKY)
>           ewin->sticky = 1;
>         if (eh->flags & EXTENDED_HINT_ONTOP)
>           ewin->ontop = 1;
>         if (eh->flags & EXTENDED_HINT_ONBOTTOM)
>           ewin->onbottom = 1;
>         if (eh->flags & EXTENDED_HINT_NEVER_USE_AREA)
>           ewin->never_use_area = 1;
>         if (eh->flags & EXTENDED_HINT_DESKTOP)
>           ewin->desktop = eh->desktop&0x1f;
>         XFree(eh);
>      }
> }
> 
> most fields/flags should be self-explanatory, except
> EXTENDED_HINT_NEVER_USE_AREA, whihc basically if for something like the
> panel- so if you "maximise" an app it disregards the space the panel
> window takes up as part of the screen only maximising the app to the
> edge of the panel and no further.

The hints are simple enough, but seem only suited for setting defaults.
There don't seem to be a way for an application/wm sensibly change
the hints/state dynamically.


I believe someone has volunteered some time ago to write a desktop
switching
applet for the panel. Still with us?

I believe there is also a need for a simple/generic -properties program
that would be used to configure the most basic window manager
properties:
  - focus style (click,mouse)
  - colormap focus 
  - workspaces (count/names).
  - move opaque-vs-outline
  - ?

The information could be saved in a rc file and later used by wm
specific
program to update the configration if possible. When things get better
integeated an option could be added to the wms to read gnome rc files
directly.

Mark
-- 
... MouseDevice="/dev/null"
--------_--------------------------------------------------------------
Marko.Macek@snet.fri.uni-lj.si      http://ixtas.fri.uni-lj.si/~markom/
#ifndef __WINMGR_H
#define __WINMGR_H

/* all of this is still experimental -- feedback welcome */

#define XA_WIN_PROTOCOLS       "WIN_PROTOCOLS"
/* Type: array of Atom
 *       set on Root window by the window manager.
 *
 * This property contains all of the protocols/hints supported by
 * the window manager (WM_HINTS, MWM_HINTS, WIN_*, etc.
 */

#define XA_WIN_ICONS           "WIN_ICONS"
/* Type: array of XID, alternating between Pixmap and Mask for icons
 *       set by applications on their toplevel windows.
 *
 * This property contains additional icons for the application.
 * if this property is set, the WM will ignore default X icon hints
 * and KWM_WIN_ICON hint.
 *
 * There are two values for each icon: Pixmap and Mask (Mask can be None
 * if transparency is not required).
 *
 * Icewm currenty needs/uses icons of size 16x16 and 32x32 with default
 * depth. Applications are recommended to set several icons sizes
 * (recommended 16x16,32x32,48x48 at least)
 *
 * TODO: WM should present a wishlist of desired icons somehow. (standard
 * WM_ICON_SIZES property is only a partial solution). 16x16 icons can be
 * quite small on large resolutions.
 */

/* workspace */
#define XA_WIN_WORKSPACE       "WIN_WORKSPACE"
/* Type: CARD32
 *       Root Window: current workspace, set by the window manager
 *
 *       Application Window: current workspace. The default workspace
 *       can be set by applications, but they must use ClientMessages to
 *       change them. When window is mapped, the propery should only be
 *       updated by the window manager.
 *
 * Applications wanting to change the current workspace should send
 * a ClientMessage to the Root window like this:
 *     xev.type = ClientMessage;
 *     xev.window = root_window or toplevel_window;
 *     xev.message_type = _XA_WIN_WORKSPACE;
 *     xev.format = 32;
 *     xev.data.l[0] = workspace;
 *     xev.data.l[1] = timeStamp;
 *     XSendEvent(display, root, False, SubstructureNotifyMask, (XEvent *) &xev);
 *
 */
 
#define XA_WIN_WORKSPACE_COUNT "WIN_WORKSPACE_COUNT"
/* Type: CARD32
 *       workspace count, set by window manager
 *
 * NOT FINALIZED/IMPLEMENTED YET
 */

#define XA_WIN_WORKSPACE_NAMES "_WIN_WORKSPACE_NAMES"
/* Type: StringList (TextPropery)
 *
 * IMPLEMENTED but not FINALIZED.
 */

#define WinWorkspaceInvalid    0xFFFFFFFFUL

/* layer */
#define XA_WIN_LAYER           "WIN_LAYER"
/* Type: CARD32
 *       window layer
 *
 * Window layer.
 * Windows with LAYER=WinLayerDock determine size of the Work Area
 * (WIN_WORKAREA). Windows below dock layer are resized to the size
 * of the work area when maximized. Windows above dock layer are
 * maximized to the entire screen space.
 *
 * The default can be set by application, but when window is mapped
 * only window manager can change this. If an application wants to change
 * the window layer it should send the ClientMessage to the root window
 * like this:
 *     xev.type = ClientMessage;
 *     xev.window = toplevel_window;
 *     xev.message_type = _XA_WIN_LAYER;
 *     xev.format = 32;
 *     xev.data.l[0] = layer;
 *     xev.data.l[1] = timeStamp;
 *     XSendEvent(display, root, False, SubstructureNotifyMask, (XEvent *) &xev);
 *
 * TODO: A few available layers could be used for WMaker menus/submenus
 * (comments?)
 *
 * WORKAREA negotiation is not implemented yet.
 */
 
#define WinLayerCount          16
#define WinLayerInvalid        0xFFFFFFFFUL

#define WinLayerDesktop        0UL
#define WinLayerBelow          2UL
#define WinLayerNormal         4UL
#define WinLayerOnTop          6UL
#define WinLayerDock           8UL
#define WinLayerAboveDock      10UL

/* state */
#define XA_WIN_STATE           "WIN_STATE"

/* Type CARD32[2]
 *      window state. First CARD32 is the mask of set states,
 *      the second one is the state.
 *
 * The default value for this property can be set by applications.
 * When window is mapped, the property is updated by the window manager
 * as necessary. Applications can request the state change by sending
 * the client message to the root window like this:
 *
 *   xev.type = ClientMessage;
 *   xev.window = toplevel_window;
 *   xev.message_type = _XA_WIN_WORKSPACE;
 *   xev.format = 32;
 *   xev.data.l[0] = mask; // mask of the states to change
 *   xev.data.l[1] = state; // new state values
 *   xev.data.l[2] = timeStamp;
 *   XSendEvent(display, root, False, SubstructureNotifyMask, (XEvent *) &xev);
 */

#define WinStateSticky         (1 << 0)   // appears on all workspaces
#define WinStateMinimized      (1 << 1)
#define WinStateMaximized      (1 << 2)   // maximized (fully/vertically/...)
#define WinStateHidden         (1 << 3)   // not on taskbar if any, but still accessible
#define WinStateRollup         (1 << 4)   // only titlebar visible
#define WinStateHidWorkspace   (1 << 5)   // not on current workspace
#define WinStateHidTransient   (1 << 6)   // hidden due to invisible owner window

#define WinStateDockHorizontal (1 << 7)   //
/*
 * This state is necessary for correct WORKAREA negotiation when
 * a window is positioned in a screen corner. If set, it determines how
 * the place where window is subtracted from workare.
 *
 * Imagine a square docklet in the corner of the screen (several WMaker docklets
 * are like this).
 *
 * HHHHD
 * ....V
 * ....V
 * ....V
 *
 * If WinStateDockHorizontal is set, the WORKAREA will consist of area
 * covered by '.' and 'V', otherwise the WORKAREA will consist of area
 * covered by '. and 'H';
 *
 * NOT IMPLEMENTED YET. Comments/improvements welcome.
 */

/* hints */
#define XA_WIN_HINTS           "WIN_HINTS"
#define WinHintsSkipFocus      (1 << 0)
#define WinHintsSkipWindowMenu (1 << 1)
#define WinHintsSkipTaskBar    (1 << 2)
#define WinHintsGroupTransient (1 << 3)

/* Type CARD32[2]
 *      additional window hints
 *
 *      Handling of this propery is very similiar to WIN_STATE.
 *
 * NOT IMPLEMENTED YET.
 */

/* work area */
#define XA_WIN_WORKAREA        "WIN_WORKAREA"
/*
 * CARD32[4]
 *     minX, minY, maxX, maxY of workarea.
 *     set/updated only by the window manager
 *
 * When windows are maximized they occupy the entire workarea except for
 * the titlebar at the top (in icewm window frame is not visible).
 *
 * Note: when WORKAREA changes, the application window are automatically
 * repositioned and maximized windows are also resized.
 */

/// possible
// WIN_MAXIMIZED_GEOMETRY
// WIN_RESIZE (protocol that allows applications to start sizing the frame)
// WIN_FOCUS (protocol for focusing)

#endif



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]