--- /usr/sbin/x2gothinclientd.orig 2015-01-06 14:22:52.416278048 +0000 +++ /usr/sbin/x2gothinclientd 2015-01-06 14:38:58.600131472 +0000 @@ -111,16 +111,29 @@ # wait for X-Server to come up sleep(3); - # align displays next to each other in order of appearance in xrandr + # Align displays next to each other in order of appearance in xrandr, unless touch + # devices are detected - in that case, clone displays so that touchable area and display + # stay aligned. This fix has been introduced for a certain make of wacom touch-sensitive + # displays. If you have a touch-sensitive device that isn't affected by this, or that + # is negatively affected by this fix, please let us know so we can add a better detection. my $this_display; my $next_display; + my $touchdevicescount=`DISPLAY=:0 xsetwacom -d localhost:0.0 --list devices | wc -l`; + foreach (`DISPLAY=:0 LANG=C xrandr 2>/dev/null | grep ' connected ' | cut -d ' ' -f1`) { $next_display = $_; $next_display =~ s/\n//; if (defined($this_display)) { - `DISPLAY=:0 /usr/bin/xrandr --output $next_display --left-of $this_display`; + if ($touchdevicescount > 0) + { + `DISPLAY=:0 /usr/bin/xrandr --output $next_display --same-as $this_display`; + } + else + { + `DISPLAY=:0 /usr/bin/xrandr --output $next_display --left-of $this_display`; + } } $this_display = $next_display; }