Re: Source Indication



On Tue, May 04, 2004 at 03:41:05PM +0200, Lubos Lunak wrote:
> On Friday 30 of April 2004 11:59, Olivier Chapuis wrote:
> > Hello,
> >
> > I've recently reread the wm-spec (from cvs). I've noted
> > the new "source indication" field to a _NET_ACTIVE_WINDOW
> > and a _NET_RESTACK_WINDOW window.
> >
> > I suggest to add such a field to the _NET_CLOSE_WINDOW,
> > _NET_WM_MOVERESIZE, _NET_MOVERESIZE_WINDOW, _NET_WM_DESKTOP and
> > _NET_WM_STATE messages with the same motivation (at least we will
> > use it in FVWM if set).
> >
> > A patch is against the current wm-spec cvs is attached against the current.
> > I may help for future implementations.
> 
>  I don't like much the way it's specified in the _NET_MOVERESIZE_WINDOW 
> message. The idea with the source indication field was that there can be 
> possibly more values in the future. There's no more room in this message for 
> that :(, but could you at least use bits 14 and 15 (so that it can be easily 
> extended to the left if necessary) and say simply that it's the source 
> indication value specified using only 2 bits?
>

Yep, good idea. New patch attached which also corrects the source
indication value in the _NET_RESTACK_WINDOW section.
 
Regards, Olivier
? build
? build.or
? current_diff
? missprint
? requestor-mail
? wm-spec.html
? wm-spec.xml.or
? wm-spec_or.html
Index: wm-spec.xml
===================================================================
RCS file: /cvs/icccm-extensions/wm-spec/wm-spec.xml,v
retrieving revision 1.9
diff -u -r1.9 wm-spec.xml
--- wm-spec.xml	29 Jan 2004 13:19:58 -0000	1.9
+++ wm-spec.xml	4 May 2004 20:27:28 -0000
@@ -659,11 +659,12 @@
   window = window to close
   message_type = _NET_CLOSE_WINDOW
   format = 32
-  data.l[0] = 0 /* may be used later */
+  data.l[0] = source indication
   other data.l[] elements = 0
 ]]></programlisting>
 	<para>
 The Window Manager MUST then attempt to close the window specified.
+See <xref linkend="sourceindication"/> for details on the source indication.
 	</para>
 	<para>
 	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.
@@ -688,7 +689,10 @@
 	(6), SouthWest (7), South (8), SouthEast (9) and Static (10). A 
 	gravity of 0 indicates that the Window Manager should use the gravity
 	specified in WM_SIZE_HINTS.win_gravity. The bits 8 to 11 indicate the
-	presence of x, y, width and height. 
+	presence of x, y, width and height. The bits 12 to 15 indicate the 
+	source (see <xref linkend="sourceindication"/>), so 0001 indicates
+	the application and 0010 indicates a Pager or a Taskbar.
+	The remaining bits should be set to zero.
         </para>
 	<para>
 	Pagers wanting to move or resize a window may send a
@@ -717,14 +721,15 @@
   data.l[1] = y_root
   data.l[2] = direction
   data.l[3] = button
-  other data.l[] elements = 0
+  data.l[4] = source indication
 ]]></programlisting>
 	<para>
 	This message allows Clients to initiate window movement or 
         resizing.  They can define their own move and size
 	"grips", whilst letting the Window Manager control the actual operation.
 	This means that all moves/resizes can happen in a consistent manner as 
-	defined by the Window Manager.
+	defined by the Window Manager. See <xref linkend="sourceindication"/>
+	for details on the source indication.
 	</para>
 	<para>
 	When sending this message in response to a button press event, button 
@@ -781,7 +786,7 @@
 ]]></programlisting>
 	<para>
         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,
+        applications can use normal ConfigureRequests. The source indication field should be therefore set to 2,
         see <xref linkend="sourceindication"/> for details.
 	</para>
 	<para>
@@ -901,9 +906,12 @@
   message_type = _NET_WM_DESKTOP
   format = 32
   data.l[0] = new_desktop
+  data.l[1] = source indication
   other data.l[] elements = 0
 ]]></programlisting>
 	<para>
+	See <xref linkend="sourceindication"/> for details on the source
+	indication.
 	The Window Manager MUST keep this property updated on all windows.
 	</para>
 	</sect2><sect2><title>_NET_WM_WINDOW_TYPE</title>
@@ -1109,13 +1117,24 @@
 
 	<para>
 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
-_NET_WM_STATE, format 32, l[0]=&lt;the action, as listed below&gt;,
-l[1]=&lt;First property to alter&gt;, l[2]=&lt;Second property to alter&gt;).
+client message to the root window:
+	</para>
+<programlisting><![CDATA[
+  window  = the respective client window
+  message_type = _NET_WM_STATE
+  format = 32
+  data.l[0] = the action, as listed below
+  data.l[1] = first property to alter
+  data.l[2] = second property to alter
+  data.l[3] = source indication
+  other data.l[] elements = 0
+]]></programlisting>
+	<para>
 This message allows two properties to be changed simultaneously, specifically
 to allow both horizontal and vertical maximization to be altered together.
-l[2] MUST be set to zero if only one property is to be changed. l[0], the
-action, MUST be one of:
+l[2] MUST be set to zero if only one property is to be changed.
+See <xref linkend="sourceindication"/> for details on the source indication.
+l[0], the action, MUST be one of:
 	</para>
 	<programlisting><![CDATA[
 _NET_WM_STATE_REMOVE        0    /* remove/unset property */
@@ -1905,6 +1924,7 @@
                 <para>Lubos Lunak</para>
                 <para>Rob Adams</para>
                 <para>Thomas Fitzsimmons</para>
+                <para>Olivier Chapuis</para>
 	</sect1>
   <sect1>
     <title>Change history</title>
@@ -1912,6 +1932,10 @@
  		<title>Changes since 1.2</title>
  		<itemizedlist>
  			<listitem><para>
+Added source indication to _NET_CLOSE_WINDOW, _NET_WM_MOVERESIZE,
+_NET_MOVERESIZE_WINDOW, _NET_WM_DESKTOP and _NET_WM_STATE message.
+			</para></listitem>
+ 			<listitem><para>
 Added _NET_REQUEST_FRAME_EXTENTS and _NET_FRAME_EXTENTS to allow a
 client to retrieve its window's frame extents.
  			</para></listitem>


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