From df324c615074435b256bfdbd97f9e6b2c0087b39 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 5 Aug 2024 09:57:20 +0200 Subject: [PATCH] (!1654) Xnest: replace XChangeWindowAttributes() by xcb_aux_change_window_attributes() Signed-off-by: Enrico Weigelt, metux IT consult --- hw/xnest/Window.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/hw/xnest/Window.c b/hw/xnest/Window.c index d9bc465e6..aa4eb26df 100644 --- a/hw/xnest/Window.c +++ b/hw/xnest/Window.c @@ -269,20 +269,20 @@ xnestConfigureWindow(WindowPtr pWin, unsigned int mask) Bool xnestChangeWindowAttributes(WindowPtr pWin, unsigned long mask) { - XSetWindowAttributes attributes; + xcb_params_cw_t attributes; if (mask & XCB_CW_BACK_PIXMAP) switch (pWin->backgroundState) { case XCB_BACK_PIXMAP_NONE: - attributes.background_pixmap = XCB_PIXMAP_NONE; + attributes.back_pixmap = XCB_PIXMAP_NONE; break; case XCB_BACK_PIXMAP_PARENT_RELATIVE: - attributes.background_pixmap = ParentRelative; + attributes.back_pixmap = ParentRelative; break; case BackgroundPixmap: - attributes.background_pixmap = xnestPixmap(pWin->background.pixmap); + attributes.back_pixmap = xnestPixmap(pWin->background.pixmap); break; case BackgroundPixel: @@ -292,7 +292,7 @@ xnestChangeWindowAttributes(WindowPtr pWin, unsigned long mask) if (mask & XCB_CW_BACK_PIXEL) { if (pWin->backgroundState == BackgroundPixel) - attributes.background_pixel = xnestPixel(pWin->background.pixel); + attributes.back_pixel = xnestPixel(pWin->background.pixel); else mask &= ~XCB_CW_BACK_PIXEL; } @@ -352,10 +352,12 @@ xnestChangeWindowAttributes(WindowPtr pWin, unsigned long mask) if (mask & XCB_CW_CURSOR) /* this is handled in cursor code */ mask &= ~XCB_CW_CURSOR; - if (mask) - XChangeWindowAttributes(xnestDisplay, xnestWindow(pWin), - mask, &attributes); - + if (mask) { + xcb_aux_change_window_attributes(xnestUpstreamInfo.conn, + xnestWindow(pWin), + mask, + &attributes); + } return TRUE; }