(!1654) Xnest: replace XCreatePixmapCursor() by xcb_create_cursor()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
		
							parent
							
								
									a969ed51cf
								
							
						
					
					
						commit
						11931842cf
					
				| 
						 | 
					@ -41,7 +41,6 @@ Bool
 | 
				
			||||||
xnestRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor)
 | 
					xnestRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    XImage *ximage;
 | 
					    XImage *ximage;
 | 
				
			||||||
    XColor fg_color, bg_color;
 | 
					 | 
				
			||||||
    unsigned long valuemask;
 | 
					    unsigned long valuemask;
 | 
				
			||||||
    XGCValues values;
 | 
					    XGCValues values;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -88,19 +87,15 @@ xnestRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    XFree(ximage);
 | 
					    XFree(ximage);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    fg_color.red = pCursor->foreRed;
 | 
					 | 
				
			||||||
    fg_color.green = pCursor->foreGreen;
 | 
					 | 
				
			||||||
    fg_color.blue = pCursor->foreBlue;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    bg_color.red = pCursor->backRed;
 | 
					 | 
				
			||||||
    bg_color.green = pCursor->backGreen;
 | 
					 | 
				
			||||||
    bg_color.blue = pCursor->backBlue;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    xnestSetCursorPriv(pCursor, pScreen, calloc(1, sizeof(xnestPrivCursor)));
 | 
					    xnestSetCursorPriv(pCursor, pScreen, calloc(1, sizeof(xnestPrivCursor)));
 | 
				
			||||||
    xnestCursor(pCursor, pScreen) =
 | 
					    uint32_t cursor = xcb_generate_id(xnestUpstreamInfo.conn);
 | 
				
			||||||
        XCreatePixmapCursor(xnestDisplay, source, mask, &fg_color, &bg_color,
 | 
					    xcb_create_cursor(xnestUpstreamInfo.conn, cursor, source, mask,
 | 
				
			||||||
 | 
					                      pCursor->foreRed, pCursor->foreGreen, pCursor->foreBlue,
 | 
				
			||||||
 | 
					                      pCursor->backRed, pCursor->backGreen, pCursor->backBlue,
 | 
				
			||||||
                      pCursor->bits->xhot, pCursor->bits->yhot);
 | 
					                      pCursor->bits->xhot, pCursor->bits->yhot);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    xnestCursor(pCursor, pScreen) = cursor;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    xcb_free_pixmap(xnestUpstreamInfo.conn, source);
 | 
					    xcb_free_pixmap(xnestUpstreamInfo.conn, source);
 | 
				
			||||||
    xcb_free_pixmap(xnestUpstreamInfo.conn, mask);
 | 
					    xcb_free_pixmap(xnestUpstreamInfo.conn, mask);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue