Implement pressure barriers and releases (server, try 1)

Jasper St. Pierre jstpierre at
Tue Nov 20 11:50:40 PST 2012

This is a heavy modification of RAOF's patch set that's used in Ubuntu
for Unity and was was once proposed here. This implements the server side:
xiproto [1] and libXi [2] patches are boring and bland, and read as you
pretty much expect. If there isn't too much turbulence with this current
patch set, I'll go and attach them here for a more formal review of
those. I'd like to get this in for 1.14, and I understand this is sort of
a tight schedule.

There are a few limitations and issues with the current patch set, but
hopefully these can live as-is for now, fixing up the implementation


    1. Barriers on screen edges will not get events, due to
       unintended interactions between RANDR and barriers. Multiple
       solutions have been discussed on #xorg-devel, but none of them
       are easy and convenient to fix. This is an extension of bug
       #48008 [3] in some ways.

    2. Overlapping barriers will not work: only one will receive
       events. This is an extreme edge case, considering that
       window managers are supposed to be the intended user of
       barriers, and that they control their own destiny.

    3. Releasing a barrier will lose pointer acceleration across
       the barrier. Unity's current use case includes releasing
       a barrier when the pointer is at high velocity, so it may
       be worth re-introducing a "velocity barrier", which is only
       solid at speeds less than some threshold.

    4. The interaction with grabs hasn't been decided yet; as with
       existing barriers, a pointer grab will still allow barriers
       to constrain the cursor. Currently, an event is sent to the
       appropriate client when a barrier is hit, always, even when
       a different client has a grab on the pointer. Semantics can
       and probably should be tweaked here.

[1] On GitHub at
[2] On GitHub at

More information about the xorg-devel mailing list