|
|
 |
 |
 |
 |
XDS 2007 |
 |
 |
 |
 |
 |
 |
 |
 |
Submitted by peter on Friday, September 14, 2007 - 06:19 |
General information |
 |
 |
XDS 2007 is over. And it was great, X hackers are a cool bunch.
I gave a talk about MPX (including demo, woohey!) which was very well recieved. And there is a preliminary timeframe: XGE should be in the next release, MPX in the one after that. So about 12 months from now if I'm correct. Let's see how that goes.
Keithp pointed out some semantic issues that need to be fixed before that, which right now means we need to introduce a device hierarchy. I'll keep you posted once I got it solved.
I did get to do some hacking, the event list for frozen events should work with Generic Events now, which might fix the sync bug I experienced before I left. But since my testbox is on the other side of the planet right now, these patches are untested and won't be up until the 26th.
That's it for now, I need to get some sleep.
|
 |
 |
 |
 |
 |
 |
 |
 |
Bug hunting |
 |
 |
 |
 |
 |
 |
 |
 |
Submitted by peter on Wednesday, August 22, 2007 - 16:51 |
General information |
 |
 |
After long hours of git-bisecting, I finally found the commit. Not the bug yet, unfortunately.
I can so far only reproduce it by starting windowmaker and then xeyes or gnome-calculator. Some other apps, inlcuding xterm, gnome-terminal or even firefox don't trigger it.
Tracked it down to [0] (Mar 8), but most likely it wasn't visible until [1] (Mar 27), when Composite was enabled by default.
Anyway, if you check out [0], cherry-pick [1] and [2] and then link in efence, you get a SIGSEGV in fb24_32BltDown(), fb24_32.c:123.
0xb60c35f0 in fb24_32BltDown (
srcLine=0xa6dc8aa4 "[shortened]"..., srcStride=608, srcX=1,
dstLine=0xa6e06000 "", dstStride=300, dstX=0, width=150,
height=0, alu=3, pm=4294967295) at fb24_32.c:123
123 WRITE((CARD32 *)dst, (s0 & 0xffffff) | (s1 << 24));
This isn't my code, but since the whole problem doesn't happen in master, I must be corrupting memory somewhere, somehow.
But anyway, when I tried resetting to a version before that (after git-bisect reset), it keeps crashing there too. I could swear this bug is running around...
Joy. Joy. Joy.
[0] ceca5670fee99b5feceaa2453f1ac32d1bfe7dcd
[1] 1af2ef0b25fd8017a3271e624a5f1548f02b09f9
[2] 72b243caead62d2ee5a073f4d9b03fcc92da937d
|
 |
 |
 |
 |
 |
 |
 |
 |
Named Objects |
 |
 |
 |
 |
 |
 |
 |
 |
Submitted by peter on Friday, August 10, 2007 - 16:06 |
MPX updates |
 |
 |
Some touch-tables can recognise objects. Some can do it on arbitrary objects through optical recognition (e.g. MS Surface). Others can do detection of a set of objects, but can do it in the device directly (e.g. through RFID). Now this is fundamentally different. The first method is recognition, the second method is detection of already known objects.
Let's ignore the first case, as this generally isn't done in the device, but rather in the client. The second is more interesting, as all the detection is done in the device, the client just gets the information. Two examples: metaDESK and reactable.
So I sat down and started thinking about how these objects could be supported.
And after some heated discussions with my lab mates, I found everything is already there, as part of XInput.
Let's summarise the common properties of such an object:
- known to the system and thus can be given a name
- unique
- position information in 2D (or optionally 3D)
- rotation information optionally
That's pretty much it. It is simply something we know of, that exists in space. So how can you get this into the system?
Simple - create a new device. Does your detection system support 3D position? Give it three valuators. Does it support 3D rotational information? Give it another three valuators. All done. You now have a device that gives your client 6DOF.
Now the only thing you need is to be able to mark the device as a Named Object. The result of today's main coding session:
diff --git a/XI.h b/XI.h
index 05eb2b4..689e0a8 100644
--- a/XI.h
+++ b/XI.h
@@ -152,6 +152,7 @@ SOFTWARE.
#define XI_EYETRACKER "EYETRACKER"
#define XI_CURSORKEYS "CURSORKEYS"
#define XI_FOOTMOUSE "FOOTMOUSE"
+#define XI_NOBJECT "NAMED OBJECT"
#define Dont_Check 0
#define XInput_Initial_Release 1
How to use this? (client side)
We have hotplugging now, so create the device as it appears, and remove it as it disappears again. Or create it once, and just send events when it actually does change it's position.
The client will see that there is a device, and if it checks for the type (which it should), it will see that it's a Named Object, and can thus behave like whatever you need it to do.
And if you don't set it up to send core events, it won't even interfere with your apps on the screen.
ahh, it feels good when one line of code fixes the problem.
|
 |
 |
 |
 |
 |
 |
 |
 |
Some more grab insanity. |
 |
 |
 |
 |
 |
 |
 |
 |
Submitted by peter on Wednesday, August 8, 2007 - 13:52 |
MPX updates |
 |
 |
I just pushed the change to allow flexible devices for passive core grabs. Problem: when a client requests a passive grab to be put on a key/button, it doesn't specify the device (for core grabs only, that is).
What MPX did before was create the grab with the ClientPointer, and then go from there. This is ok, but makes the desktop virtually unusable unless you have MPX-aware window manager that obediently sets the ClientPointer all the time. In short, it sucks.
This latest push simply means that when a passive grab is activated, the device is swapped to the one that caused the grab to activate. The grab then stays active on this device, even when the client then explicitly gets an active grab. So in short, the passive grabs pick their device on demand, and release it later.
Since a core grab has to imply exclusive client access for the duration of the grab, this is much better solution than before.
In terms of interaction: no matter what the ClientPointer setting is, if you click on a menu, the pointer that clicked will get the grab and can use the menu. Whoopee. Something that seems obvious, but I only thought of it two days ago. Well.
This has implications for MPX-aware apps too. A passive device grab allows you to explicitly specify the modifier device (keyboard). MPX doesn't override this. So you may have to re-create all passive device grabs each time the pairing changes. Oh well. Tough luck.
|
 |
 |
 |
 |
|
 |
 |
 |
 |
Browse archives |
 |
 |
 |
 |
 |
 |
 |
 |
« November 2009
| |
|
|
|
|
|
1 |
| 2 |
3 |
4 |
5 |
6 |
7 |
8 |
| 9 |
10 |
11 |
12 |
13 |
14 |
15 |
| 16 |
17 |
18 |
19 |
20 |
21 |
22 |
| 23 |
24 |
25 |
26 |
27 |
28 |
29 |
| 30 |
|
|
|
|
|
|
|
 |
 |
 |
 |
|