Package: nxagent Severity: important Tags: patch Version: 3.5.99.18-1Recently, one of our upstream devs fixed an issue in nxagent. With the fix, rootless sessions now ignore the -geometry option after session resumption.
This solves all sorts of weird behaviour and unexpected outcomes (like GUI windows not accessible anymore after session resumption).
Patch is attached. Mike -- DAS-NETZWERKTEAM c\o Technik- und Ökologiezentrum Eckernförde Mike Gabriel, Marienthaler str. 17, 24340 Eckernförde mobile: +49 (1520) 1976 148 landline: +49 (4354) 8390 139 GnuPG Fingerprint: 9BFB AEE8 6C0A A5FF BF22 0782 9AF4 6B30 2577 1B31 mail: mike.gabriel@das-netzwerkteam.de, http://das-netzwerkteam.de
>From 34e4291de2c261f9dd047a7e18cf46eeaf84662a Mon Sep 17 00:00:00 2001
From: Ulrich Sibiller <uli42@gmx.de>
Date: Thu, 7 Feb 2019 23:04:23 +0100
Subject: [PATCH] Screen.c: simplify and fix handling of rootless mode
Fixes: ArcticaProject/nx-libs#765
---
nx-X11/programs/Xserver/hw/nxagent/Screen.c | 40 +++++++++------------
1 file changed, 17 insertions(+), 23 deletions(-)
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c
index 19057dfe12..103cd1dbf0 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c
@@ -1050,8 +1050,22 @@ Bool nxagentOpenScreen(ScreenPtr pScreen,
nxagentChangeOption(RootY, (h - nxagentOption(RootHeight)) / 2);
}
}
- else
+ else if (nxagentOption(Rootless))
{
+ nxagentChangeOption(X, 0);
+ nxagentChangeOption(Y, 0);
+
+ nxagentChangeOption(RootX, 0);
+ nxagentChangeOption(RootY, 0);
+
+ nxagentChangeOption(RootWidth, w);
+ nxagentChangeOption(RootHeight, h);
+
+ nxagentChangeOption(Width, w);
+ nxagentChangeOption(Height, h);
+ }
+ else /* window mode */
+ {
/*
* screen is initialized for the first time
*/
@@ -1080,26 +1094,12 @@ Bool nxagentOpenScreen(ScreenPtr pScreen,
if (nxagentOption(Width) > w)
{
- if (nxagentOption(Rootless))
- {
- nxagentChangeOption(Width, w);
- }
- else
- {
- nxagentChangeOption(Width, w * 3 / 4);
- }
+ nxagentChangeOption(Width, w * 3 / 4);
}
if (nxagentOption(Height) > h)
{
- if (nxagentOption(Rootless))
- {
- nxagentChangeOption(Height, h);
- }
- else
- {
- nxagentChangeOption(Height, h * 3 / 4);
- }
+ nxagentChangeOption(Height, h * 3 / 4);
}
/*
@@ -1135,12 +1135,6 @@ Bool nxagentOpenScreen(ScreenPtr pScreen,
nxagentChangeOption(SavedHeight, nxagentOption(RootHeight));
}
- if (nxagentOption(Rootless))
- {
- nxagentChangeOption(RootWidth, w);
- nxagentChangeOption(RootHeight, h);
- }
-
nxagentChangeOption(SavedRootWidth, nxagentOption(RootWidth));
nxagentChangeOption(SavedRootHeight, nxagentOption(RootHeight));
Attachment:
pgpOuWPnYFLFA.pgp
Description: Digitale PGP-Signatur