(!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 (xnestParentWindow == 0) { | ||||||
|         if (!(xnestUserGeometry & WidthValue)) |         if (!(xnestUserGeometry & WidthValue)) | ||||||
|             xnestWidth = 3 * DisplayWidth(xnestDisplay, xnestUpstreamInfo.screenId) / 4; |             xnestWidth = 3 * xnestUpstreamInfo.screenInfo->width_in_pixels / 4; | ||||||
| 
 | 
 | ||||||
|         if (!(xnestUserGeometry & HeightValue)) |         if (!(xnestUserGeometry & HeightValue)) | ||||||
|             xnestHeight = 3 * DisplayHeight(xnestDisplay, xnestUpstreamInfo.screenId) / 4; |             xnestHeight = 3 * xnestUpstreamInfo.screenInfo->height_in_pixels / 4; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     if (!xnestUserBorderWidth) |     if (!xnestUserBorderWidth) | ||||||
|  |  | ||||||
|  | @ -323,12 +323,12 @@ xnestOpenScreen(ScreenPtr pScreen, int argc, char *argv[]) | ||||||
|                   &xnestCursorFuncs); |                   &xnestCursorFuncs); | ||||||
|     PointPriv->spriteFuncs = &xnestPointerSpriteFuncs; |     PointPriv->spriteFuncs = &xnestPointerSpriteFuncs; | ||||||
| 
 | 
 | ||||||
|     pScreen->mmWidth = xnestWidth * DisplayWidthMM(xnestDisplay, xnestUpstreamInfo.screenId) |     pScreen->mmWidth = | ||||||
|         / DisplayWidth(xnestDisplay, xnestUpstreamInfo.screenId); |         xnestWidth * xnestUpstreamInfo.screenInfo->width_in_millimeters / | ||||||
|  |         xnestUpstreamInfo.screenInfo->width_in_pixels; | ||||||
|     pScreen->mmHeight = |     pScreen->mmHeight = | ||||||
|         xnestHeight * DisplayHeightMM(xnestDisplay, |         xnestHeight * xnestUpstreamInfo.screenInfo->height_in_millimeters / | ||||||
|                                       xnestUpstreamInfo.screenId) / |         xnestUpstreamInfo.screenInfo->height_in_pixels; | ||||||
|         DisplayHeight(xnestDisplay, xnestUpstreamInfo.screenId); |  | ||||||
| 
 | 
 | ||||||
|     /* overwrite miCloseScreen with our own */ |     /* overwrite miCloseScreen with our own */ | ||||||
|     pScreen->CloseScreen = xnestCloseScreen; |     pScreen->CloseScreen = xnestCloseScreen; | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue