More XI 1.5 questions

Thomas Jäger thjaeger at
Mon Dec 22 10:31:34 PST 2008

On Mon, Dec 22, 2008 at 12:20 PM, Peter Hutterer
<peter.hutterer at> wrote:
> Yes and no. Devices configured with SendCoreEvents (yes by default) are always
> attached to either VCK or VCP. There's a DeviceControl that may support it,
> though I don't actually know if it works.
Fair enough, I'm going the other route now.

>> Wouldn't it make more sense to
>> always have the function succeed and generate appropriate Press/Release
>> events if the state of a button changes?
> If it's in the core protocol spec you will to get a presidential pardon to
> change it. Sorry.
I see.  The way I solved this is that I'm releasing all buttons via
XTest now if XSetPointerMapping fails.  It works better than I
thought, but there's always the chance that the button may have been
released on the device while I'm pretending it is in the up state.
But that's not a big deal (if it happens at all) since the user can
always restore a consistent state by pressing the button again.

>> 3. What is the intended behavior of Xinput button grabs with
>> GrabModeSync?  The two devices that I have here behave differently
>> (xserver  The trackpoint will still send motion events
>> (clearly the more useful behavior), while the stylus works the same way
>> the core pointer does and queues them up until an appropriate
>> XAllowDeviceEvents call.  I wonder if this is related to the fact that
>> bug #19034 only applies to the track point, not the stylus.
> this is a weird bug and I don't quite know why the trackpoint is different
> here. they should look the same to the server.
> The indended behaviour is (and this is server >= 1.6).
> Grabbing the VCP/VCK does not affect the physical device. Grabbing the
> physical device does not affect VCP/VCK events. If a device is frozen through
> GrabModeSync, all events must be enqueued until the device is thawed.
All right, I'll look into that a little bit more.  The first two
conditions are satisfied, it's just the third one that isn't.  By the
way, browsing through the source, it seems that XAllowEvents and
XAllowDeviceEvents do the same thing in most cases (AllowSome()'s core
parameter doesn't have any effect).  Although I doubt that they are
any clients out there that depend on that (my program doesn't use
XAllowDeviceEvents at all).


More information about the xorg mailing list