From 71ab6050ee4413deed1ab51875755569a1afabd5 Mon Sep 17 00:00:00 2001 From: Bojan Smojver Date: Mon, 15 Jan 2018 16:37:40 +1100 Subject: [PATCH] Add patch for gnome-settings-daemon crash. --- xrdp-0.9.5-gamma.patch | 59 ++++++++++++++++++++++++++++++++++++++++++ xrdp.spec | 6 ++++- 2 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 xrdp-0.9.5-gamma.patch diff --git a/xrdp-0.9.5-gamma.patch b/xrdp-0.9.5-gamma.patch new file mode 100644 index 0000000..c0218d7 --- /dev/null +++ b/xrdp-0.9.5-gamma.patch @@ -0,0 +1,59 @@ +From 5efd50268694d037186018997251a02ac96c4177 Mon Sep 17 00:00:00 2001 +From: matt335672 <30179339+matt335672@users.noreply.github.com> +Date: Tue, 2 Jan 2018 15:26:26 +0000 +Subject: [PATCH] Expand result of XRRGetCrtcGamma() call + +The call XRRGetCtrcGamma() is now compatible with tigervnc-server +--- + module/rdpRandR.c | 24 +++++++++++------------- + 1 file changed, 11 insertions(+), 13 deletions(-) + +diff --git a/module/rdpRandR.c b/module/rdpRandR.c +index 0ea4155..309f46a 100644 +--- a/module/rdpRandR.c ++++ b/module/rdpRandR.c +@@ -178,19 +178,6 @@ rdpRRCrtcGetGamma(ScreenPtr pScreen, RRCrtcPtr crtc) + { + LLOGLN(0, ("rdpRRCrtcGetGamma: %p %p %p %p", crtc, crtc->gammaRed, + crtc->gammaBlue, crtc->gammaGreen)); +- crtc->gammaSize = 1; +- if (crtc->gammaRed == NULL) +- { +- crtc->gammaRed = g_new0(CARD16, 16); +- } +- if (crtc->gammaBlue == NULL) +- { +- crtc->gammaBlue = g_new0(CARD16, 16); +- } +- if (crtc->gammaGreen == NULL) +- { +- crtc->gammaGreen = g_new0(CARD16, 16); +- } + return TRUE; + } + +@@ -332,6 +319,7 @@ rdpRRAddOutput(rdpPtr dev, const char *aname, int x, int y, int width, int heigh + xRRModeInfo modeInfo; + char name[64]; + const int vfreq = 50; ++ int i; + + sprintf (name, "%dx%d", width, height); + memset (&modeInfo, 0, sizeof(modeInfo)); +@@ -355,6 +343,16 @@ rdpRRAddOutput(rdpPtr dev, const char *aname, int x, int y, int width, int heigh + RRModeDestroy(mode); + return 0; + } ++ /* Create and initialise (unused) gamma ramps */ ++ RRCrtcGammaSetSize (crtc, 256); ++ for (i = 0 ; i < crtc->gammaSize; ++i) ++ { ++ unsigned short val = (0xffff * i) / (crtc->gammaSize - 1); ++ crtc->gammaRed[i] = val; ++ crtc->gammaGreen[i] = val; ++ crtc->gammaBlue[i] = val; ++ } ++ + output = RROutputCreate(dev->pScreen, aname, strlen(aname), NULL); + if (output == 0) + { diff --git a/xrdp.spec b/xrdp.spec index 504165c..1960b07 100644 --- a/xrdp.spec +++ b/xrdp.spec @@ -7,7 +7,7 @@ Summary: Open source remote desktop protocol (RDP) server Name: xrdp Epoch: 1 Version: 0.9.5 -Release: 1%{?dist} +Release: 2%{?dist} License: ASL 2.0 Group: Applications/Internet URL: http://www.xrdp.org/ @@ -23,6 +23,7 @@ Patch1: xrdp-0.9.5-xrdp-ini.patch Patch2: xrdp-0.9.4-service.patch Patch3: xrdp-0.9.2-setpriv.patch Patch4: xrdp-0.9.2-scripts-libexec.patch +Patch5: xrdp-0.9.5-gamma.patch BuildRequires: libX11-devel BuildRequires: libXfixes-devel @@ -258,6 +259,9 @@ fi %{_datadir}/selinux/*/%{name}.pp %changelog +* Mon Jan 15 2018 Bojan Smojver - 1:0.9.5-2 +- Add patch for gnome-settings-daemon crash + * Sat Dec 30 2017 Bojan Smojver - 1:0.9.5-1 - Bump up to 0.9.5