Received: (at submit) by bugs.x2go.org; 6 Jan 2015 14:07:47 +0000
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
	ymir.das-netzwerkteam.de
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham
	version=3.3.2
Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.10])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id 41D845DB53
	for <submit@bugs.x2go.org>; Tue,  6 Jan 2015 15:07:45 +0100 (CET)
Received: from [192.168.0.3] ([188.105.114.75]) by mrelayeu.kundenserver.de
 (mreue104) with ESMTPSA (Nemesis) id 0MFbev-1Y4tsr30kf-00EbrM for
 <submit@bugs.x2go.org>; Tue, 06 Jan 2015 15:07:44 +0100
Message-ID: <54ABEC61.7040006@baur-itcs.de>
Date: Tue, 06 Jan 2015 15:08:33 +0100
From: Stefan Baur <X2Go-ML-1@baur-itcs.de>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0
MIME-Version: 1.0
To: submit@bugs.x2go.org
Subject: Clone screens for touch-enabled devices
Content-Type: multipart/mixed;
 boundary="------------010005090706000906030202"
X-Provags-ID:  V03:K0:O245qqJyofUqH1ZnFxsdNd5/2KvVTatyr/AlIVaE2ye6BnFrIza
 XACwBaFowuyhfFEqq4s37kdq2UereMuaL2pNsTHvMtbs7qgM+ywX9UTq9/dn+0uj5pkTc39
 xmFY9bEGv6sgauVE0VJjnKrEP3a1SaAej/P9/El3vT9KsZajiUW8EQg6XeQWYPQHdYkUiIu
 rOQxQ2HNf1aQJZ+jwUWOg==
X-UI-Out-Filterresults: notjunk:1;

This is a multi-part message in MIME format.
--------------010005090706000906030202
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

package: x2gothinclient
version: 1.1.0.2
priority: wishlist
Control: tag -1 patch

Hi,

when using a touch-enabled device (like a tablet computer) as a
thinclient, the cursor isn't properly aligned when you try to run a
second display (non-touch-enabled) alongside with it.

What happens is that both displays get attached to form one large
virtual screen, however, your touch-enabled surface obviously still
only covers the primary display.

The X server doesn't understand this, and tries to map your movements
on the primary display to the entire virtual screen surface, so the
further to the side and to the bottom you get, the more off your mouse
pointer will be from the actual position where you touch your primary
display.

  PRI     SEC                 VIRT
+-----+ +-----+            +----------+
|X    | |     |            |O         |
|     | |     |            |          |
|     | |     |            |          |
|     | |     |            |          |
+-----+ +-----+            +----------+

+-----+ +-----+            +----------+
|     | |     |            |          |
|     | |     |            |          |
|   \ | |   / |            |       O  |
|     | |     |            |          |
+-----+ +-----+            +----------+


\ = where you touch
/ = where X draws the cursor in reality
X = overlapping \ and /
O = where X believes the cursor is, on the virtual screen

There's no sensible way to use a touch-enabled device with a second
screen and no additional, external pointing device, so I've added this
patch/workaround that switches to clone mode instead.

Of course, if you give up on using the touchscreen and plug in a USB
mouse or other external pointing device, you could use two screens.
This patch doesn't cover that situation.

Maybe someone else has an idea on what a sensible solution could look
like that covers this as well?  Like, scan for USB HID pointing
devices ("find /dev/input -name "mouse*" | wc -l") and, if present in
addition to a touchscreen, don't clone, but do side-by-side s if no
touch device was detected at all?
Tht might have some additional caveats, though, like the detection
mis-firing if the touch component of a tablet device "cloaks" as mouse
or offers some sort of mouse emulation support.
Also, in that case, it would probably be smart to disable the touch
interface completely so as to not confuse users why their touches
don't align with the cursor.  Does anybody know of a generic way to do
this?

Again, input/suggestions welcome.

- -Stefan

- -- 
BAUR-ITCS UG (haftungsbeschränkt)
Geschäftsführer: Stefan Baur
Eichenäckerweg 10, 89081 Ulm | Registergericht Ulm, HRB 724364
Fon/Fax 0731 40 34 66-36/-35 | USt-IdNr.: DE268653243
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (MingW32)

iQEcBAEBAgAGBQJUq+xgAAoJEG7d9BjNvlEZrjkIAKDP60/c6aMxGsYiA3uZZ0Iw
q2W6g3rsjE5t3r1wLjhCgq6VzH9hOvThT2g+ox6upAXoAtj3c9ePhIViboVmX5dH
8RBPucV14gjP7rXxeMlmQgBKo/y5wvtABxcDHO1jlzQoTL752bfANae7zzTrDQJS
vdF+fIScHg/W2Ft/KkyYjlOqawCJ9euZOzvOMUmTLFkSrIu6CKAtVF3YZOptnN25
+VcCoiltYUxmGzhYNmGMa9g+zMCZcaPSKloE/pK4YaxQjbCV5NJKuiiILC/E24qa
R3dssyt5m33muyQi+E8Ygger2faTe9efUrsDGMHnacCs94wqySUtTebQQzT12KE=
=hoaC
-----END PGP SIGNATURE-----

--------------010005090706000906030202
Content-Type: text/plain; charset=windows-1252;
 name="clone-screens-for-touch-enabled-devices-x2gothinclientd.patch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename*0="clone-screens-for-touch-enabled-devices-x2gothinclientd.patc";
 filename*1="h"

LS0tIC91c3Ivc2Jpbi94MmdvdGhpbmNsaWVudGQub3JpZyAgICAgIDIwMTUtMDEtMDYgMTQ6MjI6
NTIuNDE2Mjc4MDQ4ICswMDAwDQorKysgL3Vzci9zYmluL3gyZ290aGluY2xpZW50ZCAgIDIwMTUt
MDEtMDYgMTQ6Mzg6NTguNjAwMTMxNDcyICswMDAwDQpAQCAtMTExLDE2ICsxMTEsMjkgQEANCiAg
ICAgICAgICAgICAgICAgICAgICAgICMgd2FpdCBmb3IgWC1TZXJ2ZXIgdG8gY29tZSB1cA0KICAg
ICAgICAgICAgICAgICAgICAgICAgc2xlZXAoMyk7DQoNCi0gICAgICAgICAgICAgICAgICAgICAg
ICMgYWxpZ24gZGlzcGxheXMgbmV4dCB0byBlYWNoIG90aGVyIGluIG9yZGVyIG9mIGFwcGVhcmFu
Y2UgaW4geHJhbmRyDQorICAgICAgICAgICAgICAgICAgICAgICAjIEFsaWduIGRpc3BsYXlzIG5l
eHQgdG8gZWFjaCBvdGhlciBpbiBvcmRlciBvZiBhcHBlYXJhbmNlIGluIHhyYW5kciwgdW5sZXNz
IHRvdWNoDQorICAgICAgICAgICAgICAgICAgICAgICAjIGRldmljZXMgYXJlIGRldGVjdGVkIC0g
aW4gdGhhdCBjYXNlLCBjbG9uZSBkaXNwbGF5cyBzbyB0aGF0IHRvdWNoYWJsZSBhcmVhIGFuZCBk
aXNwbGF5DQorICAgICAgICAgICAgICAgICAgICAgICAjIHN0YXkgYWxpZ25lZC4gIFRoaXMgZml4
IGhhcyBiZWVuIGludHJvZHVjZWQgZm9yIGEgY2VydGFpbiBtYWtlIG9mIHdhY29tIHRvdWNoLXNl
bnNpdGl2ZQ0KKyAgICAgICAgICAgICAgICAgICAgICAgIyBkaXNwbGF5cy4gIElmIHlvdSBoYXZl
IGEgdG91Y2gtc2Vuc2l0aXZlIGRldmljZSB0aGF0IGlzbid0IGFmZmVjdGVkIGJ5IHRoaXMsIG9y
IHRoYXQNCisgICAgICAgICAgICAgICAgICAgICAgICMgaXMgbmVnYXRpdmVseSBhZmZlY3RlZCBi
eSB0aGlzIGZpeCwgcGxlYXNlIGxldCB1cyBrbm93IHNvIHdlIGNhbiBhZGQgYSBiZXR0ZXIgZGV0
ZWN0aW9uLg0KICAgICAgICAgICAgICAgICAgICAgICAgbXkgJHRoaXNfZGlzcGxheTsNCiAgICAg
ICAgICAgICAgICAgICAgICAgIG15ICRuZXh0X2Rpc3BsYXk7DQorICAgICAgICAgICAgICAgICAg
ICAgICBteSAkdG91Y2hkZXZpY2VzY291bnQ9YERJU1BMQVk9OjAgeHNldHdhY29tIC1kIGxvY2Fs
aG9zdDowLjAgLS1saXN0IGRldmljZXMgfCB3YyAtbGA7DQorDQogICAgICAgICAgICAgICAgICAg
ICAgICBmb3JlYWNoIChgRElTUExBWT06MCBMQU5HPUMgeHJhbmRyIDI+L2Rldi9udWxsIHwgZ3Jl
cCAnIGNvbm5lY3RlZCAnIHwgY3V0IC1kICcgJyAtZjFgKQ0KICAgICAgICAgICAgICAgICAgICAg
ICAgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkbmV4dF9kaXNwbGF5ID0gJF87
DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRuZXh0X2Rpc3BsYXkgPX4gcy9cbi8v
Ow0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZGVmaW5lZCgkdGhpc19kaXNw
bGF5KSkNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgew0KLSAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgIGBESVNQTEFZPTowIC91c3IvYmluL3hyYW5kciAtLW91
dHB1dCAkbmV4dF9kaXNwbGF5IC0tbGVmdC1vZiAkdGhpc19kaXNwbGF5YDsNCisgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoJHRvdWNoZGV2aWNlc2NvdW50ID4gMCkN
CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7DQorICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBgRElTUExBWT06MCAvdXNyL2Jpbi94
cmFuZHIgLS1vdXRwdXQgJG5leHRfZGlzcGxheSAtLXNhbWUtYXMgJHRoaXNfZGlzcGxheWA7DQor
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KKyAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UNCisgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICB7DQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICBgRElTUExBWT06MCAvdXNyL2Jpbi94cmFuZHIgLS1vdXRwdXQgJG5leHRfZGlzcGxh
eSAtLWxlZnQtb2YgJHRoaXNfZGlzcGxheWA7DQorICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICR0aGlzX2Rpc3BsYXkgPSAkbmV4dF9kaXNwbGF5Ow0K
ICAgICAgICAgICAgICAgICAgICAgICAgfQ0K

--------------010005090706000906030202
Content-Type: application/octet-stream;
 name="clone-screens-for-touch-enabled-devices-x2gothinclientd.patch.sig"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename*0="clone-screens-for-touch-enabled-devices-x2gothinclientd.patc";
 filename*1="h.sig"

iQEcBAABAgAGBQJUq+xgAAoJEG7d9BjNvlEZl+0H/0kAn/LzpjThignurEC08JfPZfZjC677eaIk
MYy2a36tAXdJdC0j33Q6Y6LdW1XH+31i7JCrYGSFiBUKTO+c8kRu/4H1xNdKwKQ3ewqAXn94Eo9D
vZPaUBdEUKdHepHAifZxeHYhhpKUxxGFoMN0P1XAU9MJXjL6Av9FOktH3SkSGYIxYMbuhfqa6m7y
xaP6JTr1U0aHaSuzOb7CX8FB4Qh/4RQWNiu5iQYaLfmdPXj4gzfAnMksUM2GMnaC+QEFN1BuXfxw
0Fk9wupe/ortbFdm68Ywgdq0rzW9Xf1zAxK0K/3HPiuYoCRm8iqSqU4MGcdWPD003Ju8vydBLTSX
pLI=

--------------010005090706000906030202--
