<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">Hey guys, <DIV><BR class="khtml-block-placeholder"></DIV><DIV>I've been working on getting MPX [1] up-to-date with the current server for the last few weeks. (MPX is a patch against X.org to get multiple mouse cursors). Thanks to Daniel Stone's changes [2], MPX fits now snugly into the event generation. </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>MPX now </DIV><DIV>- is integrated rather than bolted on top</DIV><DIV>- has it's own extension protocol</DIV><DIV>- does proper mouse cursor rendering</DIV><DIV>- has a lot of still-unused stuff under the hood</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>This is the first set of patches I can offer for people to play with. It's not overly stable or mature yet. More features will be added but you can get a grip on what it does. </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>The short version:</DIV><DIV>=============================</DIV><DIV><A href="http://wearables.unisa.edu.au/mpx/?q=downloads">http://wearables.unisa.edu.au/mpx/?q=downloads</A></DIV><DIV><A href="http://wearables.unisa.edu.au/mpx/?q=patching">http://wearables.unisa.edu.au/mpx/?q=patching</A></DIV><DIV><A href="http://wearables.unisa.edu.au/mpx/?q=configuration">http://wearables.unisa.edu.au/mpx/?q=configuration</A></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>The long version:</DIV><DIV>=============================</DIV><DIV>I had a different approach with this version than with the first, initial MPX. </DIV><DIV>The previous MPX was built on two assumptions</DIV><DIV>1) I did not have a clue what the X.org code did</DIV><DIV>2) I did not want to modify the code base</DIV><DIV>Which resulted in MPX being rather bolted on and not very scaleable. It did prove the point though.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>This time, I didn't care about  2) and well, I do have a bit of a clue what is going on now.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>One of the main rules I tried to follow though was that the behaviour of X should not change if there is only one pointer. So the core pointer has been neither removed nor does it behave different. Everything in the core protocol tends to fall back on the core pointer, unless there is some intelligent solution to apply it to all. This is still work in progress.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>API changes</DIV><DIV>==========</DIV><DIV>I had to break a few APIs, resulting in miPointer, miSprite and miDC having DeviceIntPtr arguments now. This allows for some nifty things (see below). Wherever no device is given, the core pointer is used. Big parts of dix events have device arguments now as well. </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>The result of this is that, although the number of changes seems very high, it isn't actually that bad. The actual functionality changes are only little, most of the benefits come from passing the devices around.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>MPX extension</DIV><DIV>============</DIV><DIV>There is a bit of an MPX extension already. A few requests and events, with more to come. MPX does not change the input extension any more, it has it's own events (so far MPXMotionNotify, MPXButtonPress and MPXButtonRelease).</DIV><DIV>Currently, there is a XCB frontend for a client that wants to use MPX.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>The MPX extension borrows heavily from Xi. To be more precise, it uses some of Xi's function and takes a piggyback </DIV><DIV>ride on the XI event delivery. Again, this keeps the number of changes down. </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Current procol provides the following calls:</DIV><DIV>- query extension version</DIV><DIV>- list MPX devices</DIV><DIV>- get event base </DIV><DIV>- register for events</DIV><DIV>- query for a particular pointer's coordinates</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>more to come.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>The whole client-side part is currently XCB and I intend to maintain it that way for the near future. Providing an XCB frontend is much quicker than providing an Xlib frontend.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Cursor rendering</DIV><DIV>=============</DIV><DIV>Each cursor is it's own entity now, instead of sharing with the core pointer's cursor. That means that as you move one mouse into a textfield, only this one cursor changes to a caret. The API should cope with commands to change/warp etc. only one cursor but the protocol is not there yet. There are a few glitches left.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>A lot of stuff under the hood</DIV><DIV>=====================</DIV><DIV>Passing the devices around from everywhere gives us quite a few benefits. </DIV><DIV>The ability to query a particular pointer's position is already there, but some of the possibilities include grabbing only a single pointer, warping a certain cursor, getting pointer-specific enter/leave events, etc. </DIV><DIV>So far, there is none of the floor control I had in the old MPX but I'll add it to the protocol ASAP. Which means a client can then decide which window can receive events from pointers. </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Statistics</DIV><DIV>=====================</DIV><DIV>whot@hyena:~/X11R7/xserver$> git diff origin | diffstat | tail -n 1</DIV><DIV> 62 files changed, 3902 insertions(+), 1134 deletions(-)</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Download & patching</DIV><DIV>===========================</DIV><DIV>There's five parts to it:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><A href="http://wearables.unisa.edu/mpx/downloads/mpx-xorg-latest.patch">http://wearables.unisa.edu/mpx/downloads/mpx-xorg-latest.patch</A></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">      </SPAN>to be applied with patch -p1 in xserver</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">      </SPAN>against commit f9f7d7f3be53c808abb5eaceb7a1abc55744a210</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><A href="http://wearables.unisa.edu.au/mpx/downloads/mpx-proto-latest.diff">http://wearables.unisa.edu.au/mpx/downloads/mpx-proto-latest.diff</A></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">     </SPAN>to be applied with patch -p0 in proto/ (will create mpxproto)</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><A href="http://wearables.unisa.edu.au/mpx/downloads/mpx-xcb-latest.diff">http://wearables.unisa.edu.au/mpx/downloads/mpx-xcb-latest.diff</A></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">   </SPAN>to be applied with patch -p1 in xcb/libxcb</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">   </SPAN>against commit f486075fa093846c3f32b3e4b9624c039ea26ba4</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><A href="http://wearables.unisa.edu.au/mpx/downloads/mpx-xcbproto-latest.diff">http://wearables.unisa.edu.au/mpx/downloads/mpx-xcbproto-latest.diff</A></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">       </SPAN>to be applied with patch -p1 in xcb/proto</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">    </SPAN>against commit 701dec025966bd19dcd1a6ae6f277abf3f1abd16</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><A href="http://wearables.unisa.edu.au/mpx/downloads/mpx-modular-latest.patch">http://wearables.unisa.edu.au/mpx/downloads/mpx-modular-latest.patch</A></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">       </SPAN>to be applied with patch -p1 in util/modular</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>against commit 3fd2a827e19ff31f6efd73bc94724cb1fbd135f7</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>The last should adjust the build.sh script that you can just use it to rebuild the server (disable dmx and xnest though).</DIV><DIV>So far I only tried the nv driver. I don't know whether the others build or work.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Unfortunately, I can't provide a public git repository to clone from, the patches have to do until I can provide binaries. The patches probably only work against the commits I have merged in my git repository and not against later versions.</DIV><DIV>The list of compatible commits is <A href="http://wearables.unisa.edu.au/mpx/downloads/commits-latest.txt">http://wearables.unisa.edu.au/mpx/downloads/commits-latest.txt</A></DIV><DIV>A little script to patch and build: <A href="http://wearables.unisa.edu.au/mpx/downloads/mpx_patch_and_build.sh">http://wearables.unisa.edu.au/mpx/downloads/mpx_patch_and_build.sh</A></DIV><DIV>It's a pain. I know.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Thanks to Ben Close, Daniel Stone, Jamey Sharp, and all others who gave me input, feedback and provided help.</DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV>Cheers, </DIV><DIV>  Peter</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><DIV>[1] <A href="http://wearables.unisa.edu.au/mpx/">http://wearables.unisa.edu.au/mpx/</A></DIV><DIV>[2] <A href="http://lists.freedesktop.org/archives/xorg/2006-October/019007.html">http://lists.freedesktop.org/archives/xorg/2006-October/019007.html</A></DIV></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>--</DIV><DIV>Multi-Pointer X Server</DIV><DIV><A href="http://wearables.unisa.edu.au/mpx">http://wearables.unisa.edu.au/mpx</A></DIV><BR class="Apple-interchange-newline"></SPAN> </DIV><BR></BODY></HTML>