From o.shneyder@phoca-gmbh.de  Mon May 18 15:41:21 2015
Received: (at 872) by bugs.x2go.org; 18 May 2015 13:41:23 +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,URIBL_BLOCKED
	autolearn=ham version=3.3.2
Received: from mail.cowic.de (mx1.cowic.de [80.190.97.241])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTP id 18A775DA83
	for <872@bugs.x2go.org>; Mon, 18 May 2015 15:41:21 +0200 (CEST)
Received: from [192.168.0.108] (unknown [95.90.221.251])
	by mail.cowic.de (Postfix) with ESMTP id DC159380B86E;
	Mon, 18 May 2015 15:41:20 +0200 (CEST)
Message-ID: <5559EBF8.5090900@phoca-gmbh.de>
Date: Mon, 18 May 2015 15:41:12 +0200
From: Oleksandr Shneyder <o.shneyder@phoca-gmbh.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.4.0
MIME-Version: 1.0
To: uli42@gmx.de, 872@bugs.x2go.org
Subject: Re: [X2Go-Dev] Bug#872: Turn xinerama.conf file related code inside
 X2Go Client into legacy code (for NX agents << 3.6)
References: <20150515115912.Horde.GtfqM24QvRXo7Sd2CZWsHw1@mail.das-netzwerkteam.de> <55583925.1040206@phoca-gmbh.de> <20150518084055.Horde.mlraxHD7gXZTq0IPaU98Eg1@mail.das-netzwerkteam.de> <5559AF7A.9070803@phoca-gmbh.de> <CANVnVYJOtianqJR3jOx2TTne0-0xcg4AN7FcLYxQ0V0iMM1cqg@mail.gmail.com>
In-Reply-To: <CANVnVYJOtianqJR3jOx2TTne0-0xcg4AN7FcLYxQ0V0iMM1cqg@mail.gmail.com>
Content-Type: multipart/signed; micalg=pgp-sha1;
 protocol="application/pgp-signature";
 boundary="Frh4vtINWnQ46ERKoBbIcSOvAbNXdgHSJ"

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--Frh4vtINWnQ46ERKoBbIcSOvAbNXdgHSJ
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Hi Ulrich,

yes, if you moving window between two physical displays, without
resizing it, x2goagent doesn't know, that display configuration is
changed, because geometry of the x2goagent stays same. So I resized a
window to refresh a display configurations.

regards,
Alex
Am 18.05.2015 um 13:28 schrieb Ulrich Sibiller:
> On Mon, May 18, 2015 at 11:23 AM, Oleksandr Shneyder
> <o.shneyder@phoca-gmbh.de> wrote:
>> ok, let's wait till this feature is available in nxagent and I'll put
>> support for it in x2go client.
>=20
>=20
> Ok. But can you please explain the reason for that off-by-one window
> size code I found (see below)?
>=20
>>>>> On  Do 14 Mai 2015 23:32:03 CEST, Ulrich Sibiller wrote:
>>>>>
>>>>>> while testing my xinerama re-implementation I noticed that x2gocli=
ent
>>>>>> reports a wrong width sometimes when simply moving the window with=
out
>>>>>> changing the size. The reported size differs by one pixel  (too mu=
ch
>>>>>> or too little). When running x2goclient --debug you can see this:
>>>>>>
>>>>>> x2go-DEBUG-../src/onmainwindow.cpp:10160> "New proxy geometry: (x:=

>>>>>> 329, y: 214, w: 1440, h: 900"
>>>>>> x2go-DEBUG-../src/onmainwindow.cpp:10160> "New proxy geometry: (x:=

>>>>>> 365, y: 213, w: 1440, h: 900"
>>>>>> x2go-DEBUG-../src/onmainwindow.cpp:10160> "New proxy geometry: (x:=

>>>>>> 825, y: 190, w: 1440, h: 900"
>>>>>> x2go-DEBUG-../src/sshprocess.cpp:189> executing remote command via=

>>>>>> SshProcess object (24): "export DISPLAY=3D:50;printf '\''1095 0 34=
5
>>>>>> 900\n0 0 1095 900'\'' >
>>>>>> $HOME/.x2go/C-uli-50-1431636769_stDKDE_dp24/xinerama.conf"
>>>>>>
>>>>>> -> here the 345 should have been a 344.
>>>>>>
>>>>>> Interestingly my patched x2goagent (that completely ignores
>>>>>> xinerama.conf) sees that value. So I conclude that x2goclient is
>>>>>> manipulating the nxproxy window size by one pixel itself. Disablin=
g
>>>>>> xinerama in the session's configuration fixes the problem.
>>>>>>
>>>>>> That off-by-one behaviour is caused by this code in onmainwindow.c=
pp:
>>>>>>
>>>>>> void ONMainWindow::slotXineramaConfigured()
>>>>>> {
>>>>>>     if (resumingSession.fullscreen)
>>>>>>         return;
>>>>>>     if (xinSizeInc =3D=3D -1)
>>>>>>         xinSizeInc=3D1;
>>>>>>     else
>>>>>>         xinSizeInc=3D-1;
>>>>>> #ifdef Q_OS_LINUX
>>>>>>
>>>>>> lastDisplayGeometry.setWidth(lastDisplayGeometry.width()+xinSizeIn=
c);
>>>>>>     XSync(QX11Info::display(),false);
>>>>>>     XResizeWindow(QX11Info::display(), proxyWinId,
>>>>>>
>>>>>> lastDisplayGeometry.width(),lastDisplayGeometry.height());
>>>>>>     XSync(QX11Info::display(),false);
>>>>>> #endif
>>>>>> #ifdef Q_OS_WIN
>>>>>>     QRect geom;
>>>>>>     wapiWindowRect ( (HWND) proxyWinId, geom );
>>>>>>     wapiMoveWindow( (HWND) proxyWinId, geom.x(), geom.y(),
>>>>>> geom.width()+xinSizeInc, geom.height(),true);
>>>>>>     lastDisplayGeometry=3DproxyWinGeometry();
>>>>>> #endif
>>>>>>     xineramaTimer->start(500);
>>>>>> }
>>>>>>
>>>>>> If I set xinSizeInc to zero in all cases the off-by-one behaviour =
is
>>>>>> completely gone. Why does xinSizeInc exist at all?
>=20
> Uli
>=20


--=20
-----------------------------------------------------------
Oleksandr Shneyder        | Email: o.shneyder@phoca-gmbh.de
phoca GmbH                | Tel. : 0911 - 14870374 0
Ludwig-Feuerbach-str. 18  | Fax. : 0911 - 14870374 9
D-90489 N=C3=BCrnberg          | Mobil: 0163 - 49 64 461

Gesch=C3=A4ftsf=C3=BChrung:
Dipl.-Inf. Oleksandr Shneyder

Amtsgericht M=C3=BCnchen | http://www.phoca-gmbh.de
HRB 196 658         | http://www.x2go.org
USt-IdNr.: DE281977973
-----------------------------------------------------------


--Frh4vtINWnQ46ERKoBbIcSOvAbNXdgHSJ
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEARECAAYFAlVZ6/gACgkQxQmEC5b4kTMdYQCeLHc5v1brtQ27IL8c4+xudr3M
vaQAoKWoylm9orO2UAlJqtEbJX0zxgDu
=Woey
-----END PGP SIGNATURE-----

--Frh4vtINWnQ46ERKoBbIcSOvAbNXdgHSJ--

