xorg: fixes for building with xserver v1.13+

ulab-next
Jay Sorg 11 years ago
parent 6beb2364f3
commit 97070b6fd9

@ -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;
}

@ -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

@ -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 */

@ -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;
}

Loading…
Cancel
Save