Re: Drag and drop initiation protocol



Sorry there's some extra garbage at the end of the post.  Ignore
"(11:36PM) [readams notos ~]$ grep PING wm-spec.sgml" and after.

On Sun, 2003-03-02 at 23:38, Rob Adams wrote:
> Drag and drop is a bit hard to deal with right now for window managers
> that raise windows on mouse down.  This is a first crack at a protocol
> to try to deal with this.
> 
> Comments appreciated, of course.
> 
> -Rob 
> 
> --- wm-spec.sgml.offic	2003-03-02 23:16:40.000000000 -0800
> +++ wm-spec.sgml	2003-03-02 23:35:22.000000000 -0800
> @@ -1245,6 +1245,49 @@ respond to this protocol within a reason
>  See also the implementation notes on <link
> linkend="KILLINGWINDOWS">killing hung processes</link>.
>  		</para>
>  	</sect2>
> +	<sect2>
> +		<title>_NET_WM_IS_DRAG_START</title>
> +		<para>
> +This protocol allows the Window Manager to determine if a mouse click
> +in a Client window could be the beginning of a logical drag and drop
> +operation.  The Client window would then respond to the query to
> +inform the Window Manager whether a mouse down event at the specified
> +mouse coordinates could initiate a drag and drop operation across
> +applications (for example, a mouse down over a file icon in a file
> +manager).  The Window Manager MAY use this information to determine
> +whether it will raise the Client window on a mouse down or whether it
> +will wait for a mouse up event to raise the Client.  A Client SHOULD
> +indicate that it is willing to participate in this protocol by listing
> +_NET_WM_IS_DRAG_START in the WM_PROTOCOLS property of the client
> +window.
> +		</para>
> +		<para>
> +A Window Manager can use this protocol at any time by sending a client
> +message as follows:
> +		</para>
> +		<programlisting><![CDATA[
> +type = ClientMessage
> +window = the respective client window
> +message_type = WM_PROTOCOLS
> +format = 32
> +data.l[0] = _NET_WM_IS_DRAG_START
> +data.l[1] = timestamp
> +data.l[2] = x coordinate
> +data.l[3] = y coordinate
> +data.l[4] = client response field
> +]]></programlisting>
> +		<para>
> +A participating Client receiving this message MUST determine whether a
> +mouse down at the specified x and y coordinates could initiate a drag
> +operation, and then send the message back to the root window by
> +setting window = root and setting data.l[4] to 0 if no drag
> +might be initiated and data.l[4] to 1 if a drag might be initiated.
> +		</para>
> +		<para>
> +Note that the Window Manager SHOULD avoid using the protocol unless
> +the result of the returned message will change some Window Manager
> behavior.
> +		</para>
> +	</sect2>
>  </sect1>
>  <sect1>
>  	<title>Implementation notes</title>
> (11:36PM) [readams notos ~]$ grep PING wm-spec.sgml
> respond to the _NET_WM_PING protocol.
> 		<title>_NET_WM_PING</title>
> this protocol by listing _NET_WM_PING in the WM_PROTOCOLS property of
> the
> data.l[0] = _NET_WM_PING
> If processes fail to respond to the _NET_WM_PING protocol _NET_WM_PID
> may be
> Killing Hung Processes implementation note added. _NET_WM_PID and
> _NET_WM_PING now link to this.
> Added _NET_WM_PING protocol
> 
> 
> _______________________________________________
> wm-spec-list mailing list
> wm-spec-list gnome org
> http://mail.gnome.org/mailman/listinfo/wm-spec-list
> 




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