On Sun, 2011-11-06 at 17:12 +0000, Rui Tiago Cação Matos wrote: > On 31 October 2011 08:51, Giles Atkinson <giles.atkin...@eu.citrix.com> wrote: > > Now that this has been fully explained, it makes a lot of sense - at least > > to me. But that information should have been available in the patch, which > > shares a common fault of almost all software documentation: no description > > of purpose or semantics. > > Yes, I apologize for that. I've simplified the previous text and added > your paragraph at the end: > > <para> > _NET_WM_STATE_FOCUSED indicates whether window decorations are drawn in an > active state. Clients MUST regard it as a read only hint which they can't > change. The window given by _NET_ACTIVE_WINDOW will usually have this hint, > but at times other windows may as well, if they have a strong association with > the active window and will be considered as a unit with it by the > user. Clients that modify the appearance of internal elements when they expect > to receive input (keyboard or mouse) SHOULD use this indication in preference > to FocusIn or EnterNotify events, when it is available. By doing so they will > accurately reflect the intentions of the Window Manager. > </para> > > Do we agree on this?
I've now imported the wm-spec into the xdg-specs module in git. http://cgit.freedesktop.org/xdg/xdg-specs/ The attached is a patch against that repository that is your patch with some editorial revision. The only significant change I've made here (as far as I know), is that in Giles's text "clients that modify the appearance of internal elements when they expect to receive input (keyboard or mouse)", I've removed the "or mouse" part, since it doesn't seem applicable to me - _NET_WM_STATE_FOCUSED is more closely tied to traditional ideas of displaying keyboard focus. Double checking would be appreciated. I'll push this soon. - Owen
>From 7a26ab9d543c9e495e4f4d3eaebbe602855ee0ae Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" <otay...@fishsoup.net> Date: Wed, 9 Nov 2011 16:00:36 -0500 Subject: [PATCH] Add _NET_WM_STATE_FOCUSED MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch from Rui Tiago Cação Matos to add a a new _NET_WM_STATE atom that accurately tracks when the window manager shows the window decorations as active or inactive. This allows for better handling of cases where modal dialogs might be shown as a unit with a parent window, or where grabs cause a disjunction between X input focus and the focus displayed to the user. --- wm-spec/wm-spec.xml | 27 +++++++++++++++++++++++++-- 1 files changed, 25 insertions(+), 2 deletions(-) diff --git a/wm-spec/wm-spec.xml b/wm-spec/wm-spec.xml index 98f9f9b..5d40742 100644 --- a/wm-spec/wm-spec.xml +++ b/wm-spec/wm-spec.xml @@ -1,7 +1,7 @@ <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [ -<!ENTITY version "Draft version 1.4.draft-2"> -<!ENTITY date "Fri September 29, 2006"> +<!ENTITY version "Draft version 1.5.draft-1"> +<!ENTITY date "Fri November 29, 2011"> ]> <article id="index"> <articleinfo> @@ -1117,6 +1117,7 @@ _NET_WM_STATE_FULLSCREEN, ATOM _NET_WM_STATE_ABOVE, ATOM _NET_WM_STATE_BELOW, ATOM _NET_WM_STATE_DEMANDS_ATTENTION, ATOM +_NET_WM_STATE_FOCUSED, ATOM ]]></programlisting> <para> An implementation MAY add new atoms to this list. Implementations @@ -1207,6 +1208,20 @@ the window got the required attention (usually, that it got activated). </para> <para> +_NET_WM_STATE_FOCUSED indicates whether the window's decorations are drawn in an +active state. Clients MUST regard it as a read-only hint. It cannot be set at +map time or changed via a _NET_WM_STATE client message. The window given by +_NET_ACTIVE_WINDOW will usually have this hint, but at times other windows may +as well, if they have a strong association with the active window and will be +considered as a unit with it by the user. Clients that modify the appearance of +internal elements when a toplevel has keyboard focus SHOULD check for the +available of this state in _NET_WM_SUPPORTED_LIST list and, if it is available, +use it in preference to tracking focus via FocusIn events. By doing so they will +match the window decorations and accurately reflect the intentions of the Window +Manager. + </para> + + <para> To change the state of a mapped window, a Client MUST send a _NET_WM_STATE client message to the root window: </para> @@ -2240,6 +2255,14 @@ OR OTHER DEALINGS IN THE SOFTWARE. </sect1> <sect1> <title>Change history</title> + <sect2> + <title>Changes since 1.4draft</title> + <itemizedlist> + <listitem><para> +Added _NET_WM_STATE_FOCUSED. + </para></listitem> + </itemizedlist> + </sect2> <sect2> <title>Changes since 1.3</title> <itemizedlist> -- 1.7.7
_______________________________________________ wm-spec-list mailing list wm-spec-list@gnome.org http://mail.gnome.org/mailman/listinfo/wm-spec-list