Created attachment 823721 [details, diff]
Don't warp the pointer when in DGA mode
This may be a duplicate of bug#296941.
After an @world update my x2vnc set-up that has been working fine for the past 2 years is broken.
Symptoms: x2vnc starts and connects fine to the remote VNC, however when moving the mouse pointer to the edge of the screen it no longer begins controlling the other (remote) screen.
I eventually tracked it down to some change in the tbehaviour of how motion events are generated by Xorg when DGA is enabled by a client (x2vnc correctly detects and attempts to use the XF86DGA extension). From looking at the code, it would seem that when in DGA mode x2vnc expects motion events to only be generated for 'real' mouse movements, whereas now events also include 'virtual' motion caused by XWarpPointer calls made by x2vnc itself.
The first patch - x2vnc_1_7_2_nowarp_dga.patch is a naive attempt at solving this by not warping the pointer any more and it _almost_ works however there are still other issues remaining:
1. The pointer 'jumps' when crossing screens instead smoothly entering the remote screen at the expected locatoin, so the initial coordinates on the remote screen must also not be computed correctly anymore.
2. The mouse buttons are reversed - I'm using a left handed mouse in X and previously this worked correctly - pressing the button under my left hand's index would cause a 'left click' event on the remote screen, whereas now it results in a 'right click'.
I'm therefore only including this patch to maybe serve as a basis for further fixes if anyone feels so inclined.
The easiest turned out to be to disable the use of DGA (and the reason for reporting the bug here) - the x2vnc_1_7_2_disable_dga.patch has the necessary changes to configure.in and x2vnc-1.7.2-r2.ebuild.eautoconf.patch adds an autoconf step to the build. Perhaps this should be done under the control of "USE=-dga" but that's beyound my ebuild-fu.
Created attachment 823723 [details, diff]
Disable DGA detection in configure.in
Created attachment 823725 [details, diff]
Ebuild patch to re-run autoconf
I have no idea about x2vnc but just to note that it looks like Debian still package it and have some patches: https://sources.debian.org/patches/x2vnc/1.7.2-6/.
Dunno if https://sources.debian.org/patches/x2vnc/1.7.2-6/multiscreen-cursor-stick.patch/ in particular is relevant.
(In reply to Sam James from comment #3)
> I have no idea about x2vnc but just to note that it looks like Debian still
> package it and have some patches:
> ht tps://sources.debian.org/patches/x2vnc/1.7.2-6/.
> Dunno if
> htt ps://sources.debian.org/patches/x2vnc/1.7.2-6/multiscreen-cursor-stick.
> patch/ in particular is relevant.
Gave that a quick try here, doesn't solve the reported problem.