Re: [rfbproto] [PATCH] ExtendedDesktopSize extension

2009-05-15 Thread Pierre Ossman
On Thu, 14 May 2009 15:56:35 +0200
Peter Rosin p...@lysator.liu.se wrote:

 Den 2009-05-11 13:27 skrev Pierre Ossman:
  
  That sounds a bit like this look like crap, but pff, what do I
  care? :)
 
 Well, that's stretching it, but exactly one person has commented
 (in public) on your encoding and you have shot down all
 suggestions I have made (not counting editorial nitpicks). So,
 what do you expect?
 

I can be a bit confrontational, but it was not my intention to put you
off and I apologize if I've been too harsh. I really value your input
to the discussion.

Although I didn't incorporate you changes in this extension, I have
been thinking about them and I think they should be added, but as
separate extensions. As such, your comments have been very valuable to
me.

  Oh, and I still think it would cleaner to hook into the tight
  extension for the start-up difficulties.
 
  
  I agree, but I'm concerned it will severely limit how many will
  implement it. We could redefine the behaviour in the future, given
  that the server and client have negotiated via some other mechanism
  (like tight).
 
 No good, you would still need to keep the old code to cope with
 the old style negotiation to stay compatible all the legacy
 installations and the flourish of alternate implementations. I
 predict that you will stick with whatever negotiation you start
 out with.
 

We could avoid the extra roundtrip though, so there is some gain
outside of the complexity.

Rgds
-- 
Pierre OssmanOpenSource-based Thin Client Technology
System Developer Telephone: +46-13-21 46 00
Cendio ABWeb: http://www.cendio.com


signature.asc
Description: PGP signature
--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects___
tigervnc-rfbproto mailing list
tigervnc-rfbproto@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tigervnc-rfbproto


Re: [rfbproto] [PATCH] ExtendedDesktopSize extension

2009-05-15 Thread Pierre Ossman
On Mon, 4 May 2009 13:50:34 +0200
Pierre Ossman oss...@cendio.se wrote:

This extension adds multi-head support to RFB, and allows the client to
request framebuffer and screen layout changes on the server.

Signed-off-by: Pierre Ossman oss...@cendio.se
---

This version includes the restriction that a server may not send both a
DesktopSize and an ExtendedDesktopSize rectangle. It also mentions the
DesktopSize mess in the Screen Model chapter.

Lastly, I clarified the CopyRect behaviour in the Screen Model chapter.

Rgds
-- 
Pierre OssmanOpenSource-based Thin Client Technology
System Developer Telephone: +46-13-21 46 00
Cendio ABWeb: http://www.cendio.com
Index: rfbproto.rst
===
--- rfbproto.rst	(revision 3809)
+++ rfbproto.rst	(working copy)
@@ -69,6 +69,56 @@
 ignored, resulting in less network traffic and less drawing for the
 client.
 
+Screen Model
+
+
+In its simplest form, the RFB protocol uses a single, rectangular
+framebuffer. All updates are contained within this buffer and may not
+extend outside of it. A client with basic functionality simply presents
+this buffer to the user, padding or cropping it as necessary to fit
+the user's display.
+
+More advanced RFB clients and servers have the ability to extend this
+model and add multiple screens. The purpose being to create a
+server-side representation of the client's physical layout.
+Applications can use this information to properly position themselves
+with regard to screen borders.
+
+In the multiple-screen model, there is still just a single framebuffer
+and framebuffer updates are unaffected by the screen layout. This
+assures compatibility between basic clients and advanced servers.
+Screens are added to this model and act like viewports into the
+framebuffer. A basic client acts as if there is a single screen
+covering the entire framebuffer.
+
+The server may support up to 255 screens, which must be contained fully
+within the current framebuffer. Multiple screens may overlap partially
+or completely.
+
+The client must keep track of the contents of the entire framebuffer,
+not just the areas currently covered by a screen. Similarly, the server
+is free to use encodings that rely on contents currently not visible
+inside any screen. For example it may issue a *CopyRect* rectangle from
+any part of the framebuffer that should already be known to the client.
+
+The client can request changes to the framebuffer size and screen
+layout. The server is free to approve or deny these requests at will,
+but must always inform the client of the result. See the
+`SetDesktopSize`_ message for details.
+
+If the framebuffer size changes, for whatever reason, then all data in
+it is invalidated and considered undefined. The server must not use
+any encoding that relies on the previous framebuffer contents. Note
+however that the semantics for *DesktopSize* are not well-defined and
+do not follow this behaviour in all server implementations. See the
+`DesktopSize Pseudo-encoding`_ chapter for full details.
+
+Changing only the screen layout does not affect the framebuffer
+contents. The client must therefore keep track of the current
+framebuffer dimensions and compare it with the one received in the
+*ExtendedDesktopSize* rectangle. Only when they differ may it discard
+the framebuffer contents.
+
 Input Protocol
 ==
 
@@ -508,7 +558,7 @@
 254, 127VMWare
 253 `gii (General Input Interface) Client Message`_
 252 tight
-251 Pierre Ossman SetDesktopSize
+251 `SetDesktopSize`_
 250 Colin Dean xvp
 === ===
 
@@ -1043,6 +1093,72 @@
 
 The event reports *count* valuators starting with *first*.
 
+SetDesktopSize
+--
+
+Requests a change of desktop size. This message is an extension and
+may only be sent if the client has previously received an
+*ExtendedDesktopSize* rectangle.
+
+The server must send an *ExtendedDesktopSize* rectangle for every
+*SetDesktopSize* message received. Several rectangles may be
+sent in a single *FramebufferUpdate* message, but the rectangles must
+not be merged or reordered in any way. Note that rectangles sent for
+other reasons may be interleaved with the ones generated as a result
+of *SetDesktopSize* messages.
+
+Upon a successful request the server must send an *ExtendedDesktopSize*
+rectangle to the requesting client with the exact same information the
+client provided in the corresponding *SetDesktopSize* message.
+*x-position* must be set to 1, indicating a client initiated event, and
+*y-position* must be set to 0, indicating success.
+
+The server must also send an *ExtendedDesktopSize* rectangle to all
+other connected clients, but with *x-position* set to 2, indicating a
+change initiated by another client.
+
+If the server can not or will not satisfy the request, it must send