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