(!1654) Xnest: use xcb for (un)mapping windows
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
		
							parent
							
								
									0b299452a4
								
							
						
					
					
						commit
						6569ea80c4
					
				| 
						 | 
				
			
			@ -82,23 +82,28 @@ xnestSaveScreen(ScreenPtr pScreen, int what)
 | 
			
		|||
    else {
 | 
			
		||||
        switch (what) {
 | 
			
		||||
        case SCREEN_SAVER_ON:
 | 
			
		||||
            XMapRaised(xnestDisplay, xnestScreenSaverWindows[pScreen->myNum]);
 | 
			
		||||
            xcb_map_window(xnestUpstreamInfo.conn, xnestScreenSaverWindows[pScreen->myNum]);
 | 
			
		||||
            uint32_t value = XCB_STACK_MODE_ABOVE;
 | 
			
		||||
            xcb_configure_window(xnestUpstreamInfo.conn,
 | 
			
		||||
                                 xnestScreenSaverWindows[pScreen->myNum],
 | 
			
		||||
                                 XCB_CONFIG_WINDOW_STACK_MODE,
 | 
			
		||||
                                 &value);
 | 
			
		||||
            xnestSetScreenSaverColormapWindow(pScreen);
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case SCREEN_SAVER_OFF:
 | 
			
		||||
            XUnmapWindow(xnestDisplay, xnestScreenSaverWindows[pScreen->myNum]);
 | 
			
		||||
            xcb_unmap_window(xnestUpstreamInfo.conn, xnestScreenSaverWindows[pScreen->myNum]);
 | 
			
		||||
            xnestSetInstalledColormapWindows(pScreen);
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case SCREEN_SAVER_FORCER:
 | 
			
		||||
            lastEventTime = GetTimeInMillis();
 | 
			
		||||
            XUnmapWindow(xnestDisplay, xnestScreenSaverWindows[pScreen->myNum]);
 | 
			
		||||
            xcb_unmap_window(xnestUpstreamInfo.conn, xnestScreenSaverWindows[pScreen->myNum]);
 | 
			
		||||
            xnestSetInstalledColormapWindows(pScreen);
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case SCREEN_SAVER_CYCLE:
 | 
			
		||||
            XUnmapWindow(xnestDisplay, xnestScreenSaverWindows[pScreen->myNum]);
 | 
			
		||||
            xcb_unmap_window(xnestUpstreamInfo.conn, xnestScreenSaverWindows[pScreen->myNum]);
 | 
			
		||||
            xnestSetInstalledColormapWindows(pScreen);
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			@ -410,7 +415,7 @@ xnestOpenScreen(ScreenPtr pScreen, int argc, char *argv[])
 | 
			
		|||
                               xnestWindowName,
 | 
			
		||||
                               xnestIconBitmap, argv, argc, &sizeHints);
 | 
			
		||||
 | 
			
		||||
        XMapWindow(xnestDisplay, xnestDefaultWindows[pScreen->myNum]);
 | 
			
		||||
        xcb_map_window(xnestUpstreamInfo.conn, xnestDefaultWindows[pScreen->myNum]);
 | 
			
		||||
 | 
			
		||||
        valuemask = XCB_CW_BACK_PIXMAP | XCB_CW_COLORMAP;
 | 
			
		||||
        attributes.back_pixmap = xnestScreenSaverPixmap;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -363,7 +363,7 @@ xnestRealizeWindow(WindowPtr pWin)
 | 
			
		|||
{
 | 
			
		||||
    xnestConfigureWindow(pWin, XCB_CONFIG_WINDOW_SIBLING);
 | 
			
		||||
    xnestShapeWindow(pWin);
 | 
			
		||||
    XMapWindow(xnestDisplay, xnestWindow(pWin));
 | 
			
		||||
    xcb_map_window(xnestUpstreamInfo.conn, xnestWindow(pWin));
 | 
			
		||||
 | 
			
		||||
    return TRUE;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -371,8 +371,7 @@ xnestRealizeWindow(WindowPtr pWin)
 | 
			
		|||
Bool
 | 
			
		||||
xnestUnrealizeWindow(WindowPtr pWin)
 | 
			
		||||
{
 | 
			
		||||
    XUnmapWindow(xnestDisplay, xnestWindow(pWin));
 | 
			
		||||
 | 
			
		||||
    xcb_unmap_window(xnestUpstreamInfo.conn, xnestWindow(pWin));
 | 
			
		||||
    return TRUE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue