From d19973809ebcc6a2acb0e1c8ca441b7a6a4ef463 Mon Sep 17 00:00:00 2001 From: llunak Date: Tue, 16 Dec 2003 13:56:02 +0000 Subject: Support for focus stealing prevention (http://mail.gnome.org/archives/wm-spec-list/2003-October/msg00039.html). --- wm-spec/wm-spec.xml | 93 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 88 insertions(+), 5 deletions(-) (limited to 'wm-spec/wm-spec.xml') diff --git a/wm-spec/wm-spec.xml b/wm-spec/wm-spec.xml index 0e03aa5..cfcc8b3 100644 --- a/wm-spec/wm-spec.xml +++ b/wm-spec/wm-spec.xml @@ -436,9 +436,26 @@ _NET_ACTIVE_WINDOW window = window to activate message_type = _NET_ACTIVE_WINDOW format = 32 - data.l[0] = 0 /* may be used later */ + data.l[0] = source indication + data.l[1] = timestamp + data.l[2] = requestor's currently active window, 0 if none other data.l[] elements = 0 ]]> + +Source indication should be 1 when the request comes from an application, and 2 +when it comes from a pager. Clients using older version of this spec use 0 +as source indication, see for details. +The timestamp is Client's last user activity timestamp (see _NET_WM_USER_TIME) +at the time of the request, and the currently active window +is the Client's active toplevel window, if any (the Window Manager may +be e.g. more likely to obey the request if it will mean transferring +focus from one active window to another). + + +Depending on the information provided with the message, the Window Manager may +decide to refuse the request (either completely ignore it, or e.g. use +_NET_WM_STATE_DEMANDS_ATTENTION). + _NET_WORKAREA + _NET_RESTACK_WINDOW + + + Pagers wanting to restack a window SHOULD send a _NET_CLOSE_WINDOW client + message request to the root window: + + + + This request is similar to ConfigureRequest with CWSibling and CWStackMode flags. It should be used only by pagers, + applications can use normal ConfigureRequests. The source indication field should be therefore set to 1, + see for details. + + + Rationale: A Window Manager may put restrictions on configure requests from applications, for example it may + under some conditions refuse to raise a window. This request makes it clear it comes from a pager or similar + tool, and therefore the Window Manager should always obey it. + + Application Window Properties @@ -944,6 +990,7 @@ _NET_WM_STATE_HIDDEN, ATOM _NET_WM_STATE_FULLSCREEN, ATOM _NET_WM_STATE_ABOVE, ATOM _NET_WM_STATE_BELOW, ATOM +_NET_WM_STATE_DEMANDS_ATTENTION, ATOM ]]> An implementation MAY add new atoms to this list. Implementations @@ -1022,6 +1069,15 @@ windows (see for details). hint should be used in that case, see ).' + +_NET_WM_STATE_DEMANDS_ATTENTION indicates that some action in or with the window +happened. For example, it may be set by the Window Manager if the window requested +activation but the Window Manager refused it, or the application may set it if it +finished some work. This state may be set by both the Client and +the Window Manager. It should be unset by the Window Manager when it decides +the window got the required attention (usually, that it got activated). + + To change the state of a mapped window, a Client MUST send a _NET_WM_STATE client message to the root window (window is the respective window, type @@ -1278,10 +1334,11 @@ window took place. Clients should keep the last timestamp from user interaction. and set this timestamp in this property on every new toplevel window before mapping it. A client that only deals with core events, might, for example, use the -timestamp of the last KeyPress, ButtonPress, or ButtonRelease -event. KeyRelease events should not generally be considered to -be user interaction, because an application may receive KeyRelease -events from global keybindings. Clients should start setting the property +timestamp of the last KeyPress or ButtonPress event. ButtonRelease and KeyRelease +events should not generally be considered to be user interaction, because an application +may receive KeyRelease events from global keybindings, and generally release events +may have later timestamp than actions that were triggered by the matching press events. +Clients should start setting the property only after receiving the first event from user interaction, they shouldn't set it before receiving first input event. The special value of zero on a newly mapped window means that the window shouldn't initially get focus after being mapped. @@ -1711,6 +1768,22 @@ int net_get_hostname (char *buf, size_t maxlen) focus. + + + Source indication in requests + + Some requests from Clients include type of the Client, for example + the _NET_ACTIVE_WINDOW message. Currently the types can be + 1 for normal applications, and 2 for pagers and other Clients + that represent direct user actions (the Window Manager may decide + to treat requests from applications differently than requests + that are result of direct user actions). + Clients that support only older version of this spec will have 0 + as their source indication, thus not specifying their source at all. + This also may mean that some of the fields in the message comply + only with the older specification version. + + References @@ -1799,6 +1872,16 @@ OR OTHER DEALINGS IN THE SOFTWARE. Changes since 1.2 +Added new state _NET_WM_STATE_DEMANDS_ATTENTION. + + +Added timestamp, source indication and requestor's active window +fields to the _NET_ACTIVE_WINDOW message. + + +Added _NET_RESTACK_WINDOW message. + + Added new property _NET_WM_STRUT_PARTIAL to allow partial-width struts. -- cgit v1.2.3-70-g09d2