(!1654) 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
							
								
									5ad2a00ac7
								
							
						
					
					
						commit
						39ca976eb8
					
				|  | @ -158,10 +158,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) | ||||
|  |  | |||
|  | @ -323,12 +323,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