marnanel: (Default)
Monument ([personal profile] marnanel) wrote2010-10-21 05:31 pm
Entry tags:

Current problem with xzibit

Here is a current problem I have with xzibit.

I am implementing what I call "doppelganger cursors". These are mouse pointers which appear on a shared window as the mouse pointer moves across the other window. They have the icon of the person on the other end appended. Here's a video of what they currently look like.

Currently, these are implemented by creating a new, extra pointer using XInput2, and then doing a pointer grab on that one pointer in order to change it into the new image. This is good as far as it goes, but if your client has a pointer grab then MotionNotify events aren't reported for any other pointer, which means that we can't detect movement on that window: so it's impossible to get doppelgangers working in each direction.

Possible workarounds:
  1. Find a way to do a grab and still get MotionNotify events.
  2. Don't do a grab.  Set the pointer per-window instead.
  3. Don't use an extra pointer.  Use an undecorated window and float it about in the right place.
Your thoughts are welcome.

(Anonymous) 2010-10-23 12:28 am (UTC)(link)
If you select for MotionNotify events using XI2 rather than the old core XSelectInput API, you'll continue to get events, even when you have a grab on one device.

ajjzIvOjnFf

(Anonymous) 2011-09-29 04:45 am (UTC)(link)
8gKa2E Good! Wish everybody wrote so:D