Skip to content

Commit

Permalink
some playing around - DO NOT INCLUDE THIS
Browse files Browse the repository at this point in the history
  • Loading branch information
uli42 committed Dec 13, 2017
1 parent 85cf09e commit 99cf805
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 8 additions & 2 deletions nx-X11/programs/Xserver/hw/nxagent/Extensions.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ void nxagentInitRandRExtension(ScreenPtr pScreen)
fprintf(stderr, "Warning: Failed to initialize the RandR extension.\n");
}


/*RRGetInfo(pScreen, FALSE);*/
/*RRScanOldConfig(pScreen, RR_Rotate_0);*/
/* FIXME: do we need this at all with the new rand/xinerama stuff? */
nxagentRandRInitSizes(pScreen);

Expand Down Expand Up @@ -251,6 +252,12 @@ nxagentRandRCrtcSet (ScreenPtr pScreen,
int numOutputs,
RROutputPtr *outputs)
{
if (crtc->gammaSize == 0) {
CARD16 gamma = 0;
RRCrtcGammaSetSize(crtc, 1);
RRCrtcGammaSet(crtc, &gamma, &gamma, &gamma);
RRCrtcGammaNotify(crtc);
}
return RRCrtcNotify(crtc, mode, x, y, rotation, NULL, numOutputs, outputs);
}
#endif
Expand Down Expand Up @@ -355,7 +362,6 @@ static int nxagentRandRInitSizes(ScreenPtr pScreen)
}

RRSetCurrentConfig(pScreen, RR_Rotate_0, 60, pSize);

/* RRScreenSetSizeRange(pScreen, w[1], h[1], MAXSHORT, MAXSHORT);*/
return 1;
}
Expand Down
4 changes: 4 additions & 0 deletions nx-X11/programs/Xserver/hw/nxagent/Screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -4113,6 +4113,10 @@ int nxagentAdjustRandRXinerama(ScreenPtr pScreen)
/* calculate the size in mm based on the current dpi. If
nxagent is run with a different dpi than the real X server
the result will look wrong but it is mathematically correct. */
/* RRRegisterSize(pScreen, bbx2-bbx1, bby2-bby1,
((bbx2-bbx1) * 254 + monitorResolution * 5) / (monitorResolution * 10),
((bby2-bby1) * 254 + monitorResolution * 5) / (monitorResolution * 10));*/

RROutputSetPhysicalSize(pScrPriv->outputs[i],
(new_w * 254 + monitorResolution * 5) / (monitorResolution * 10),
(new_h * 254 + monitorResolution * 5) / (monitorResolution * 10));
Expand Down

0 comments on commit 99cf805

Please sign in to comment.