From d130494039d7a03aea25c911522223f60c159644 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Fri, 10 Jun 2016 01:05:58 +0200 Subject: Properly enable/disable Xinerama support in nxagent via cmdline options provider in Xserver/os/utils.c. * Xinerama defaults to enabled, using RRXineramaExtension (i.e. cmdline option: +rrxinerama). * Cmdline option -rrxinerama disables Xinerama support entirely. * Cmdline option +xinerama switches from RRXineramaExtension to PanoramiXExtension. * Cmdline option -xinerama is actually non-functional (i.e. the default). * If the nx/nx option "xinerama" is handed over to nxagent, then Xinerama is only switched on if that given option enables it (value: 1) _and_ if either of the Xinerama extensions (PanoramiX or RRXinerama) has been initialized (via cmdline options above). Fixes ArcticaProject/nx-libs#117. Fixes ArcticaProject/nx-libs#134 (makes flawed PR#134 obsolete). --- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent/Screen.c') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 20ec3672a..50d278ed7 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -1114,11 +1114,6 @@ Bool nxagentOpenScreen(int index, ScreenPtr pScreen, nxagentChangeOption(ViewportXSpan, nxagentOption(Width) - nxagentOption(RootWidth)); nxagentChangeOption(ViewportYSpan, nxagentOption(Height) - nxagentOption(RootHeight)); - /* PanoramiXExtension enabled via cmdline, turn on Xinerama in nxagent - */ - if( (!noPanoramiXExtension) && (!PanoramiXExtensionDisabledHack) ) - nxagentOption(Xinerama) = True; - if (nxagentReconnectTrap == 0) { if (nxagentOption(Persistent)) -- cgit v1.2.3 From c61bb8cc59bf645f1bf4dbc5fd5464d559b3ecad Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 20 Jun 2016 12:18:53 +0200 Subject: Move each screen's root-window pointer into ScreenRec. Backported from X.org: commit e7fae9ecc42ab5e73b89117722dbf4117d928f9a Author: Jamey Sharp Date: Sat May 22 00:26:28 2010 -0700 Move each screen's root-window pointer into ScreenRec. Many references to the WindowTable array already had the corresponding screen pointer handy, which meant they usually looked like "WindowTable[pScreen->myNum]". Adding a field to ScreenRec instead of keeping this information in a parallel array simplifies those expressions, and eliminates a MAXSCREENS-sized array. Since dix uses this data, a screen private entry isn't appropriate. xf86-video-dummy currently uses WindowTable, so it needs to be updated to reflect this change. Signed-off-by: Jamey Sharp Reviewed-by: Tiago Vignatti Tested-by: Tiago Vignatti (i686 GNU/Linux) Backport to nx-libs: Mike Gabriel --- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 42 ++++++++++++++--------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent/Screen.c') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 50d278ed7..a4b39a4fe 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -2116,7 +2116,7 @@ Bool nxagentCloseScreen(int index, ScreenPtr pScreen) static void nxagentSetRootClip (ScreenPtr pScreen, Bool enable) { - WindowPtr pWin = WindowTable[pScreen->myNum]; + WindowPtr pWin = pScreen->root; WindowPtr pChild; Bool WasViewable = (Bool)(pWin->viewable); Bool anyMarked = FALSE; @@ -2409,21 +2409,21 @@ FIXME: We should try to restore the previously box.x2 = width; box.y2 = height; - WindowTable[pScreen -> myNum] -> drawable.width = width; - WindowTable[pScreen -> myNum] -> drawable.height = height; - WindowTable[pScreen -> myNum] -> drawable.x = 0; - WindowTable[pScreen -> myNum] -> drawable.y = 0; + pScreen->root -> drawable.width = width; + pScreen->root -> drawable.height = height; + pScreen->root -> drawable.x = 0; + pScreen->root -> drawable.y = 0; - RegionInit(&WindowTable[pScreen -> myNum] -> borderSize, &box, 1); - RegionInit(&WindowTable[pScreen -> myNum] -> winSize, &box, 1); - RegionInit(&WindowTable[pScreen -> myNum] -> clipList, &box, 1); - RegionInit(&WindowTable[pScreen -> myNum] -> borderClip, &box, 1); + RegionInit(&pScreen->root -> borderSize, &box, 1); + RegionInit(&pScreen->root -> winSize, &box, 1); + RegionInit(&pScreen->root -> clipList, &box, 1); + RegionInit(&pScreen->root -> borderClip, &box, 1); - (*pScreen -> PositionWindow)(WindowTable[pScreen -> myNum], 0, 0); + (*pScreen -> PositionWindow)(pScreen->root, 0, 0); nxagentSetRootClip(pScreen, 1); - XMoveWindow(nxagentDisplay, nxagentWindow(WindowTable[0]), + XMoveWindow(nxagentDisplay, nxagentWindow(screenInfo.screens[0]->root), nxagentOption(RootX), nxagentOption(RootY)); nxagentMoveViewport(pScreen, 0, 0); @@ -3522,7 +3522,7 @@ FIXME: The port information is not used at the moment and produces a { mcop_local_atom = MakeAtom(mcop_atom, strlen(mcop_atom), 1); - ChangeWindowProperty(WindowTable[pScreen->myNum], + ChangeWindowProperty(pScreen->root, mcop_local_atom, XA_STRING, iReturnFormat, PropModeReplace, @@ -3667,9 +3667,9 @@ int nxagentChangeScreenConfig(int screen, int width, int height, int mmWidth, in int r; #ifdef TEST - fprintf(stderr, "nxagentChangeScreenConfig: WindowTable[%d] is %p\n", screen, WindowTable[screen]); + fprintf(stderr, "nxagentChangeScreenConfig: screenInfo.screens[%d]->root is %p\n", screen, screenInfo.screens[screen]); #endif - if (WindowTable[screen] == NULL) + if (screenInfo.screens[screen]->root == NULL) { return 0; } @@ -3692,7 +3692,7 @@ int nxagentChangeScreenConfig(int screen, int width, int height, int mmWidth, in return 0; } - pScreen = WindowTable[screen] -> drawable.pScreen; + pScreen = screenInfo.screens[screen] -> root -> drawable.pScreen; #ifdef TEST fprintf(stderr, "nxagentChangeScreenConfig: Changing config to %dx%d.\n", width, height); @@ -4124,7 +4124,7 @@ void nxagentSaveAreas(PixmapPtr pPixmap, RegionPtr prgnSave, int xorg, int yorg, values.subwindow_mode = IncludeInferiors; - gc = XCreateGC(nxagentDisplay, nxagentWindow(WindowTable[0]), GCSubwindowMode, &values); + gc = XCreateGC(nxagentDisplay, nxagentWindow(screenInfo.screens[0]->root), GCSubwindowMode, &values); /* * Initialize to the corrupted region. @@ -4234,7 +4234,7 @@ void nxagentRestoreAreas(PixmapPtr pPixmap, RegionPtr prgnRestore, int xorg, */ RegionIntersect(prgnRestore, prgnRestore, - &WindowTable[pWin -> drawable.pScreen -> myNum] -> winSize); + &pWin -> drawable.pScreen -> root -> winSize); pBackingStore = (miBSWindowPtr) pWin -> backStorage; @@ -4245,7 +4245,7 @@ void nxagentRestoreAreas(PixmapPtr pPixmap, RegionPtr prgnRestore, int xorg, values.subwindow_mode = ClipByChildren; - gc = XCreateGC(nxagentDisplay, nxagentWindow(WindowTable[0]), GCSubwindowMode, &values); + gc = XCreateGC(nxagentDisplay, nxagentWindow(screenInfo.screens[0]->root), GCSubwindowMode, &values); /* * Translate the reference point to the origin of the window. @@ -4406,7 +4406,7 @@ void nxagentShadowAdaptToRatio(void) nxagentShadowSetRatio(nxagentOption(Width) * 1.0 / nxagentShadowWidth, nxagentOption(Height) * 1.0 / nxagentShadowHeight); - nxagentShadowCreateMainWindow(pScreen, WindowTable[0], nxagentShadowWidth, nxagentShadowHeight); + nxagentShadowCreateMainWindow(pScreen, screenInfo.screens[0]->root, nxagentShadowWidth, nxagentShadowHeight); sizeHints.max_width = WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay)); sizeHints.max_height = HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay)); @@ -4456,7 +4456,7 @@ void nxagentShowPixmap(PixmapPtr pPixmap, int x, int y, int width, int height) XlibGC gc; XGCValues value; XImage *image; - WindowPtr pWin = WindowTable[0]; + WindowPtr pWin = screenInfo.screens[0]->root; unsigned int format; int depth, pixmapWidth, pixmapHeight, length; char *data; @@ -4668,7 +4668,7 @@ FIXME value.fill_style = FillSolid; value.function = GXcopy; - gc = XCreateGC(shadow, nxagentWindow(WindowTable[0]), GCBackground | + gc = XCreateGC(shadow, nxagentWindow(screenInfo.screens[0]->root), GCBackground | GCForeground | GCFillStyle | GCPlaneMask | GCFunction, &value); NXCleanImage(image); -- cgit v1.2.3 From c2b1f489d7998c83af73c7cb25bbb2bc53f26094 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 20 Jun 2016 11:10:06 +0200 Subject: Backport RANDR proto version 1.5 to nx-X11's Xserver. Backported to X.org's /xorg/xserver Git hash level: a6b6e8ba026acedef6336b17adf06aebddd5f22f. --- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent/Screen.c') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index a4b39a4fe..40b1e5222 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -3793,7 +3793,7 @@ int nxagentAdjustRandRXinerama(ScreenPtr pScreen) * do this here it will be done implicitely later and add mode(s) to * our crtc(s)! */ - rrgetinfo = RRGetInfo(pScreen); + rrgetinfo = RRGetInfo(pScreen, FALSE); fprintf(stderr, "nxagentAdjustRandRXinerama: RRGetInfo returned [%d]\n", rrgetinfo); } -- cgit v1.2.3