Commit 20368511 authored by Matthias Hopf's avatar Matthias Hopf

Return randr interface version in xf86CrtcScreenInit()

Necessary to allow drivers to be run-time backwards compatible when using the
modes/ functions w/o providing their own copy.
parent c7536f4b
...@@ -694,7 +694,12 @@ xf86CrtcCloseScreen (int index, ScreenPtr screen) ...@@ -694,7 +694,12 @@ xf86CrtcCloseScreen (int index, ScreenPtr screen)
/* /*
* Called at ScreenInit time to set up * Called at ScreenInit time to set up
*/ */
_X_EXPORT Bool _X_EXPORT
#ifdef RANDR_13_INTERFACE
int
#else
Bool
#endif
xf86CrtcScreenInit (ScreenPtr screen) xf86CrtcScreenInit (ScreenPtr screen)
{ {
ScrnInfoPtr scrn = xf86Screens[screen->myNum]; ScrnInfoPtr scrn = xf86Screens[screen->myNum];
...@@ -727,7 +732,11 @@ xf86CrtcScreenInit (ScreenPtr screen) ...@@ -727,7 +732,11 @@ xf86CrtcScreenInit (ScreenPtr screen)
config->CloseScreen = screen->CloseScreen; config->CloseScreen = screen->CloseScreen;
screen->CloseScreen = xf86CrtcCloseScreen; screen->CloseScreen = xf86CrtcCloseScreen;
#ifdef RANDR_13_INTERFACE
return RANDR_INTERFACE_VERSION;
#else
return TRUE; return TRUE;
#endif
} }
static DisplayModePtr static DisplayModePtr
...@@ -2228,7 +2237,7 @@ xf86SetSingleMode (ScrnInfoPtr pScrn, DisplayModePtr desired, Rotation rotation) ...@@ -2228,7 +2237,7 @@ xf86SetSingleMode (ScrnInfoPtr pScrn, DisplayModePtr desired, Rotation rotation)
} }
} }
xf86DisableUnusedFunctions(pScrn); xf86DisableUnusedFunctions(pScrn);
#if RANDR_12_INTERFACE #ifdef RANDR_12_INTERFACE
xf86RandR12TellChanged (pScrn->pScreen); xf86RandR12TellChanged (pScrn->pScreen);
#endif #endif
return ok; return ok;
......
...@@ -692,7 +692,11 @@ xf86ProbeOutputModes (ScrnInfoPtr pScrn, int maxX, int maxY); ...@@ -692,7 +692,11 @@ xf86ProbeOutputModes (ScrnInfoPtr pScrn, int maxX, int maxY);
void void
xf86SetScrnInfoModes (ScrnInfoPtr pScrn); xf86SetScrnInfoModes (ScrnInfoPtr pScrn);
#ifdef RANDR_13_INTERFACE
int
#else
Bool Bool
#endif
xf86CrtcScreenInit (ScreenPtr pScreen); xf86CrtcScreenInit (ScreenPtr pScreen);
Bool Bool
......
...@@ -56,6 +56,8 @@ ...@@ -56,6 +56,8 @@
#define RANDR_12_INTERFACE 1 #define RANDR_12_INTERFACE 1
#define RANDR_13_INTERFACE 1 /* requires RANDR_12_INTERFACE */ #define RANDR_13_INTERFACE 1 /* requires RANDR_12_INTERFACE */
#define RANDR_INTERFACE_VERSION 0x0103
typedef XID RRMode; typedef XID RRMode;
typedef XID RROutput; typedef XID RROutput;
typedef XID RRCrtc; typedef XID RRCrtc;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment