Subject: Re: [X2Go-Dev] Bug#883: Bug#883: Can be fixed by reverting winmultiwindow.patch

From: Oleksandr Shneyder <[email-masked]>
Date: Mon, 29 Jun 2015 11:36:19 +0200

Hello,

I'll try to explain why I wrote this patch. In x2go client you have
possibility to run x2go session in "full screen" mode on only one of
physical displays. It has nothing to do with xinerama. It is very useful
if you have a client with several monitors and you want to have the
native session on one monitor and  full screen remote session on second
monitor. It's also not a full screen mode, because you are using only a
part of virtual display, so you are not running a vcxsrv in full screen
mode. This scenario widely used in enterprise environments.

To create a full screen window on only one physical display you need to
 maximize the window on this display and remove the window decorations.
Unfortunately on some setups it was not possible to maximize an
X-window. As soon as you tried it, vcsrv resized a window with a size
that was bigger then physical display and reseted a window decorations.
After some investigation I figured out that it's only happening on the
displays with negative coordinates, for example if a secondary display
is left of or on the top of primary display. So I assumed that vcxsrv
doesn't work properly with negative coordinates. Unfortunately I didn't
manage to find a bug in vcxsrv, so I wrote a workaround that checking if
the windows size is bigger than a physical display and in this case
resizing a window on a screen size. Usually it is no ways to create a
windows that are bigger then a physical display, so that workaround
worked well. Unfortunately in the case described in this bug report,
nxagent creating window that is bigger then screen size, because screen
was resized. This is why a firefox or whatever window will be maximized
and window decorations will be erased by a workaround.

I don't think that we can remove this workaround, because it will brake
many productive x2go setups. At least as long as we won't find a bug
handling negative screen sizes in vcxsrv and now I have not sufficient
resources to do it.

I suggest to check in workaround if screen has negative coordinates and
omit any window that placed on the displays with positive coordinates.

Also in x2go client I'll check a window size and decoration flags and
reset it in the case if x2go session is not a multi window session.
This fill fix #883 and won't brake a multi monitor setups.
I'll do it today or tomorrow.

regards,
Alex

Am 24.06.2015 um 04:04 schrieb Mihai Moldovan:
> On 23.06.2015 09:22 PM, Oleksandr Shneyder wrote:
>> I'll look on it on Thursday-Monday,
> 
> I've had a look myself and played around with it, assisted by Mike#2.
> 
> I don't see any benefit in applying this patch and suggest dropping it.
> 
> As far as I've gathered, it's supposed to create a "fake" fullscreen window by
> removing the borders and title bar IFF the window extents are greater or equal
> the monitor's size, with "monitor" being the monitor that holds most of the
> window's contents.
> 
> 
> It doesn't make sense to do something like this in multiwindow mode. It *does*
> make sense to do something like this in fullscreen mode, but the patch targets
> multiwindow mode.
> 
> For this mode, it's plain wrong and only causing trouble. You can't fix it
> either, because you're missing a crucial bit of information: when *do* you want
> to have a "fake" fullscreen window?
> 
> 
> Why did you write the original patch exactly? What was the use case that this
> patch fixed?
> 
> 
> 
> Mihai
> 

-- 
-----------------------------------------------------------
Oleksandr Shneyder        | Email: [email-masked]
phoca GmbH                | Tel. : 0911 - 14870374 0
Ludwig-Feuerbach-str. 18  | Fax. : 0911 - 14870374 9
D-90489 Nürnberg          | Mobil: 0163 - 49 64 461

Geschäftsführung:
Dipl.-Inf. Oleksandr Shneyder

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