Xnest: fetch display size from xcb setup data
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
2ec930fc4a
commit
ba26d6bd90
|
@ -159,10 +159,10 @@ xnestOpenDisplay(int argc, char *argv[])
|
|||
|
||||
if (xnestParentWindow == 0) {
|
||||
if (!(xnestUserGeometry & WidthValue))
|
||||
xnestWidth = 3 * DisplayWidth(xnestDisplay, xnestUpstreamInfo.screenId) / 4;
|
||||
xnestWidth = 3 * xnestUpstreamInfo.screenInfo->width_in_pixels / 4;
|
||||
|
||||
if (!(xnestUserGeometry & HeightValue))
|
||||
xnestHeight = 3 * DisplayHeight(xnestDisplay, xnestUpstreamInfo.screenId) / 4;
|
||||
xnestHeight = 3 * xnestUpstreamInfo.screenInfo->height_in_pixels / 4;
|
||||
}
|
||||
|
||||
if (!xnestUserBorderWidth)
|
||||
|
|
|
@ -322,12 +322,12 @@ xnestOpenScreen(ScreenPtr pScreen, int argc, char *argv[])
|
|||
&xnestCursorFuncs);
|
||||
PointPriv->spriteFuncs = &xnestPointerSpriteFuncs;
|
||||
|
||||
pScreen->mmWidth = xnestWidth * DisplayWidthMM(xnestDisplay, xnestUpstreamInfo.screenId)
|
||||
/ DisplayWidth(xnestDisplay, xnestUpstreamInfo.screenId);
|
||||
pScreen->mmWidth =
|
||||
xnestWidth * xnestUpstreamInfo.screenInfo->width_in_millimeters /
|
||||
xnestUpstreamInfo.screenInfo->width_in_pixels;
|
||||
pScreen->mmHeight =
|
||||
xnestHeight * DisplayHeightMM(xnestDisplay,
|
||||
xnestUpstreamInfo.screenId) /
|
||||
DisplayHeight(xnestDisplay, xnestUpstreamInfo.screenId);
|
||||
xnestHeight * xnestUpstreamInfo.screenInfo->height_in_millimeters /
|
||||
xnestUpstreamInfo.screenInfo->height_in_pixels;
|
||||
|
||||
/* overwrite miCloseScreen with our own */
|
||||
pScreen->CloseScreen = xnestCloseScreen;
|
||||
|
|
Loading…
Reference in New Issue