← Back to team overview

ubuntu-x-swat team mailing list archive

[Bug 373367] Re: Pointer goes offscreen on non-rectangular dual-head

 

*** This bug is a duplicate of bug 389519 ***
    https://bugs.launchpad.net/bugs/389519

I agree that it would be difficult to fix the mouse grab issue within X.
I find that the only issue is when I click the mouse, so I don't click
the mouse.  I find the edge first, without the mouse clicked, then I
click the mouse and move away from the edge.  It would be nice to handle
the action directly, but again, I don't think X provides any
notification to the window when it is entered while the mouse is
attached to another window (the clicked in window).

Anyhow, I tweaked the code further.  However, I left in 'modes' for
those that want that behavior, but I changed the default (no mode
specified) to block on all edges.  I also fixed the need to specify a
void that doesn't exactly match the offscreen size.  It is still
possible to sneak the mouse past the edge, but it is much less likely
now, and the simply solution is to just drag the mouse horizontal or
vertically (depending on the void orientation) and the mouse will come
back (not actually stuck, just lost...).  Making the void bigger in the
negative space may help too (I didn't try it because I found it very
difficult to lose the mouse anymore).  I added a makefile, just type
'make' to build (or 'make debug' if you want more verbose output from
the executable...).

I think there is already a mouse capture project under SourceForge, and
that may provide a more robust solution, but I stuck with
XCreateMouseVoid because it is so small...and I'm providing my tweaks
because it appears to work better on my machine now...


** Attachment added: "XCreateMouseVoid.tar.gz"
   https://bugs.launchpad.net/ubuntu/+source/libxrandr/+bug/373367/+attachment/1968593/+files/XCreateMouseVoid.tar.gz

-- 
You received this bug notification because you are a member of Ubuntu-X,
which is subscribed to libxrandr in Ubuntu.
https://bugs.launchpad.net/bugs/373367

Title:
  Pointer goes offscreen on non-rectangular dual-head