(!1654) Xnest: replace XChangeWindowAttributes() by xcb_aux_change_window_attributes()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
		
							parent
							
								
									148fa05151
								
							
						
					
					
						commit
						af487307bb
					
				|  | @ -270,20 +270,20 @@ xnestConfigureWindow(WindowPtr pWin, unsigned int mask) | ||||||
| Bool | Bool | ||||||
| xnestChangeWindowAttributes(WindowPtr pWin, unsigned long mask) | xnestChangeWindowAttributes(WindowPtr pWin, unsigned long mask) | ||||||
| { | { | ||||||
|     XSetWindowAttributes attributes; |     xcb_params_cw_t attributes; | ||||||
| 
 | 
 | ||||||
|     if (mask & XCB_CW_BACK_PIXMAP) |     if (mask & XCB_CW_BACK_PIXMAP) | ||||||
|         switch (pWin->backgroundState) { |         switch (pWin->backgroundState) { | ||||||
|         case XCB_BACK_PIXMAP_NONE: |         case XCB_BACK_PIXMAP_NONE: | ||||||
|             attributes.background_pixmap = XCB_PIXMAP_NONE; |             attributes.back_pixmap = XCB_PIXMAP_NONE; | ||||||
|             break; |             break; | ||||||
| 
 | 
 | ||||||
|         case XCB_BACK_PIXMAP_PARENT_RELATIVE: |         case XCB_BACK_PIXMAP_PARENT_RELATIVE: | ||||||
|             attributes.background_pixmap = ParentRelative; |             attributes.back_pixmap = ParentRelative; | ||||||
|             break; |             break; | ||||||
| 
 | 
 | ||||||
|         case BackgroundPixmap: |         case BackgroundPixmap: | ||||||
|             attributes.background_pixmap = xnestPixmap(pWin->background.pixmap); |             attributes.back_pixmap = xnestPixmap(pWin->background.pixmap); | ||||||
|             break; |             break; | ||||||
| 
 | 
 | ||||||
|         case BackgroundPixel: |         case BackgroundPixel: | ||||||
|  | @ -293,7 +293,7 @@ xnestChangeWindowAttributes(WindowPtr pWin, unsigned long mask) | ||||||
| 
 | 
 | ||||||
|     if (mask & XCB_CW_BACK_PIXEL) { |     if (mask & XCB_CW_BACK_PIXEL) { | ||||||
|         if (pWin->backgroundState == BackgroundPixel) |         if (pWin->backgroundState == BackgroundPixel) | ||||||
|             attributes.background_pixel = xnestPixel(pWin->background.pixel); |             attributes.back_pixel = xnestPixel(pWin->background.pixel); | ||||||
|         else |         else | ||||||
|             mask &= ~XCB_CW_BACK_PIXEL; |             mask &= ~XCB_CW_BACK_PIXEL; | ||||||
|     } |     } | ||||||
|  | @ -353,10 +353,12 @@ xnestChangeWindowAttributes(WindowPtr pWin, unsigned long mask) | ||||||
|     if (mask & XCB_CW_CURSOR)        /* this is handled in cursor code */ |     if (mask & XCB_CW_CURSOR)        /* this is handled in cursor code */ | ||||||
|         mask &= ~XCB_CW_CURSOR; |         mask &= ~XCB_CW_CURSOR; | ||||||
| 
 | 
 | ||||||
|     if (mask) |     if (mask) { | ||||||
|         XChangeWindowAttributes(xnestDisplay, xnestWindow(pWin), |         xcb_aux_change_window_attributes(xnestUpstreamInfo.conn, | ||||||
|                                 mask, &attributes); |                                          xnestWindow(pWin), | ||||||
| 
 |                                          mask, | ||||||
|  |                                          &attributes); | ||||||
|  |     } | ||||||
|     return TRUE; |     return TRUE; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue