summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xorg/server/module/rdpDraw.c4
-rw-r--r--xorg/server/module/rdpDraw.h14
-rw-r--r--xorg/server/module/rdpPixmap.h9
-rw-r--r--xorg/server/module/rdpRandR.c6
4 files changed, 26 insertions, 7 deletions
diff --git a/xorg/server/module/rdpDraw.c b/xorg/server/module/rdpDraw.c
index 9d834500..ef1edcf3 100644
--- a/xorg/server/module/rdpDraw.c
+++ b/xorg/server/module/rdpDraw.c
@@ -354,7 +354,11 @@ rdpCloseScreen(int index, ScreenPtr pScreen)
LLOGLN(0, ("rdpCloseScreen:"));
dev = rdpGetDevFromScreen(pScreen);
dev->pScreen->CloseScreen = dev->CloseScreen;
+#if XRDP_CLOSESCR == 1 /* before v1.13 */
rv = dev->pScreen->CloseScreen(index, pScreen);
+#else
+ rv = dev->pScreen->CloseScreen(pScreen);
+#endif
dev->pScreen->CloseScreen = rdpCloseScreen;
return rv;
}
diff --git a/xorg/server/module/rdpDraw.h b/xorg/server/module/rdpDraw.h
index 05fd0849..af65b46c 100644
--- a/xorg/server/module/rdpDraw.h
+++ b/xorg/server/module/rdpDraw.h
@@ -25,8 +25,17 @@ misc draw calls
#define __RDPDRAW_H
#include <xorg-server.h>
+#include <xorgVersion.h>
#include <xf86.h>
+#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1, 13, 0, 0, 0)
+/* 1.1, 1.2, 1.3, 1.4 1.5, 1.6, 1.7, 1.8, 1.9, 1.10, 1.11, 1.12 */
+#define XRDP_CLOSESCR 1
+#else
+/* 1.13 */
+#define XRDP_CLOSESCR 2
+#endif
+
/* true if drawable is window or pixmap is screen */
#define XRDP_DRAWABLE_IS_VISIBLE(_dev, _drw) \
(((_drw)->type == DRAWABLE_WINDOW && ((WindowPtr)(_drw))->viewable) || \
@@ -69,8 +78,13 @@ int
rdpDrawItemRemoveAll(rdpPtr dev, rdpPixmapRec *priv);
void
rdpCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr pOldRegion);
+#if XRDP_CLOSESCR == 1
Bool
rdpCloseScreen(int index, ScreenPtr pScreen);
+#else
+Bool
+rdpCloseScreen(ScreenPtr pScreen);
+#endif
WindowPtr
rdpGetRootWindowPtr(ScreenPtr pScreen);
rdpPtr
diff --git a/xorg/server/module/rdpPixmap.h b/xorg/server/module/rdpPixmap.h
index 0ab10a3f..7fce3186 100644
--- a/xorg/server/module/rdpPixmap.h
+++ b/xorg/server/module/rdpPixmap.h
@@ -24,13 +24,8 @@ pixmap calls
#ifndef __RDPPIXMAP_H
#define __RDPPIXAMP_H
-#ifndef XORG_VERSION_NUMERIC
-#warning XORG_VERSION_NUMERIC not defined, need #include <xorgVersion.h>
-#endif
-
-#ifndef XORG_VERSION_CURRENT
-#warning XORG_VERSION_CURRENT not defined
-#endif
+#include <xorg-server.h>
+#include <xorgVersion.h>
#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1, 5, 0, 0, 0)
/* 1.1, 1.2, 1.3, 1.4 */
diff --git a/xorg/server/module/rdpRandR.c b/xorg/server/module/rdpRandR.c
index c90c0303..37577645 100644
--- a/xorg/server/module/rdpRandR.c
+++ b/xorg/server/module/rdpRandR.c
@@ -27,6 +27,7 @@ RandR draw calls
/* this should be before all X11 .h files */
#include <xorg-server.h>
+#include <xorgVersion.h>
/* all driver need this */
#include <xf86.h>
@@ -141,8 +142,13 @@ rdpRRScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height,
RRGetInfo(pScreen, 1);
LLOGLN(0, (" screen resized to %dx%d", pScreen->width, pScreen->height));
RRScreenSizeNotify(pScreen);
+#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1, 13, 0, 0, 0)
xf86EnableDisableFBAccess(pScreen->myNum, FALSE);
xf86EnableDisableFBAccess(pScreen->myNum, TRUE);
+#else
+ xf86EnableDisableFBAccess(xf86Screens[pScreen->myNum], FALSE);
+ xf86EnableDisableFBAccess(xf86Screens[pScreen->myNum], TRUE);
+#endif
return TRUE;
}