Extended Window Manager Hints
Prev |  | Next

# Other Root Window Messages

## _NET_CLOSE_WINDOW

    _NET_CLOSE_WINDOW

Pagers wanting to close a window MUST send a _NET_CLOSE_WINDOW client message request to the root window (type _NET_ACTIVE_WINDOW, format 32, l[0]=0 /*may be used later*/, window should be set to the window to close). The Window Manager MUST then attempt to close the window specified.

Rationale: A window manager might be more clever than the usual method (send WM_DELETE message if the protocol is selected, XKillClient otherwise). It might introduce a timeout, for example. Instead of duplicating the code, the Window Manager can easily do the job.

## _NET_WM_MOVERESIZE

    _NET_WM_MOVERESIZE
      window = target app window
      message_type = _NET_WM_MOVERESIZE
      format = 16
      data.s[0] = x_root
      data.s[1] = y_root
      data.s[2] = direction

This message allows an application to initiate window movement or resizing. This allows the application to define its own move and size "grips", whilst letting the window manager control the actual move/resize. This means that all moves / resizes can happen in a consistent manner as defined by the WM.

When sending this message, x_root and y_root SHOULD indicate the position of the mouse click [[PDW: with respect to what?]] and direction MUST indicate whether this is a move or resize event, and if it is a resize event, which edges of the window the size grip applies to.

    #define _NET_WM_MOVERESIZE_SIZE_TOPLEFT      0
    #define _NET_WM_MOVERESIZE_SIZE_TOP          1
    #define _NET_WM_MOVERESIZE_SIZE_TOPRIGHT     2
    #define _NET_WM_MOVERESIZE_SIZE_RIGHT        3
    #define _NET_WM_MOVERESIZE_SIZE_BOTTOMRIGHT  4
    #define _NET_WM_MOVERESIZE_SIZE_BOTTOM       5
    #define _NET_WM_MOVERESIZE_SIZE_BOTTOMLEFT   6
    #define _NET_WM_MOVERESIZE_SIZE_LEFT         7
    #define _NET_WM_MOVERESIZE_MOVE              8   /* Movement only */

[[PDW: Why do we need to indicate the direction? The WM could guess this from the click position - some WMs (eg. sawmill) have code for doing something similar when you hold eg. Meta + click in the client area... ]]

Prev | Home | Next
Root Window Properties (+Related Messages) |  | Application Window Properties