From c6482d24fff982d5e11636167c719766f8207d48 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Sat, 2 May 2015 21:53:25 +0200 Subject: Reimplement xinerama via randr in nxagent (not libNX_Xinerama). (Fixes ArcticaProject/nx-libs#23). No more xinerama faking, just use existing xrandr extension and initalize it properly. Xinerama then works automatically. Fixes ArcticaProject/nx-libs#23 --- nx-X11/programs/Xserver/hw/nxagent/Extensions.c | 36 +++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'nx-X11/programs/Xserver/hw/nxagent/Extensions.c') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Extensions.c b/nx-X11/programs/Xserver/hw/nxagent/Extensions.c index 6dce644ae..103eaa92c 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Extensions.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Extensions.c @@ -35,6 +35,11 @@ static int nxagentRandRScreenSetSize(ScreenPtr pScreen, CARD16 width, static int nxagentRandRInitSizes(ScreenPtr pScreen); +static Bool nxagentRandRCrtcSet (ScreenPtr pScreen, RRCrtcPtr crtc, + RRModePtr mode, int x, int y, + Rotation rotation, int numOutputs, + RROutputPtr *outputs); + #ifdef __DARWIN__ void DarwinHandleGUI(int argc, char *argv[]) @@ -83,6 +88,8 @@ void nxagentInitRandRExtension(ScreenPtr pScreen) fprintf(stderr, "Warning: Failed to initialize the RandR extension.\n"); } + + /* FIXME: do we need this at all with the new rand/xinerama stuff? */ nxagentRandRInitSizes(pScreen); /* @@ -97,6 +104,7 @@ void nxagentInitRandRExtension(ScreenPtr pScreen) #if RANDR_12_INTERFACE pRandRScrPriv -> rrScreenSetSize = nxagentRandRScreenSetSize; + pRandRScrPriv -> rrCrtcSet = nxagentRandRCrtcSet; #endif #if RANDR_10_INTERFACE @@ -104,6 +112,34 @@ void nxagentInitRandRExtension(ScreenPtr pScreen) #endif } +void +RRResetProc (ExtensionEntry *extEntry) +{ + fprintf(stderr, "RANDR going down - NX version\n"); +} + + + +#if RANDR_12_INTERFACE +/* + * Request that the Crtc be reconfigured + */ + +static Bool +nxagentRandRCrtcSet (ScreenPtr pScreen, + RRCrtcPtr crtc, + RRModePtr mode, + int x, + int y, + Rotation rotation, + int numOutputs, + RROutputPtr *outputs) +{ + return RRCrtcNotify(crtc, mode, x, y, rotation, numOutputs, outputs); +} +#endif + + int nxagentRandRGetInfo(ScreenPtr pScreen, Rotation *pRotations) { /* -- cgit v1.2.3 From e7e2f164b9bcf05d4cc1eb0e69879addec718824 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Wed, 7 Oct 2015 17:23:13 +0200 Subject: Only declare nxagentRandRCrtcSet if RANDR_12_INTERFACE is defined. --- nx-X11/programs/Xserver/hw/nxagent/Extensions.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'nx-X11/programs/Xserver/hw/nxagent/Extensions.c') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Extensions.c b/nx-X11/programs/Xserver/hw/nxagent/Extensions.c index 103eaa92c..d77d27674 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Extensions.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Extensions.c @@ -35,10 +35,12 @@ static int nxagentRandRScreenSetSize(ScreenPtr pScreen, CARD16 width, static int nxagentRandRInitSizes(ScreenPtr pScreen); +#if RANDR_12_INTERFACE static Bool nxagentRandRCrtcSet (ScreenPtr pScreen, RRCrtcPtr crtc, RRModePtr mode, int x, int y, Rotation rotation, int numOutputs, RROutputPtr *outputs); +#endif #ifdef __DARWIN__ -- cgit v1.2.3