From d93e9a8641128d9e5267b89d2f4b4596b287d3aa Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Thu, 1 Aug 2024 20:14:37 +0200 Subject: [PATCH] (!1654) Xnest: directly pass ClearArea request to upstream server Instead of going through mi machinery, just pass the ClearArea request to the upstream window. Signed-off-by: Enrico Weigelt, metux IT consult --- hw/xnest/Screen.c | 1 + hw/xnest/Window.c | 8 ++++++++ hw/xnest/XNWindow.h | 3 +++ 3 files changed, 12 insertions(+) diff --git a/hw/xnest/Screen.c b/hw/xnest/Screen.c index db82314b0..96d6e3699 100644 --- a/hw/xnest/Screen.c +++ b/hw/xnest/Screen.c @@ -312,6 +312,7 @@ xnestOpenScreen(ScreenPtr pScreen, int argc, char *argv[]) pScreen->WindowExposures = xnestWindowExposures; pScreen->CopyWindow = xnestCopyWindow; pScreen->ClipNotify = xnestClipNotify; + pScreen->ClearToBackground = xnest_screen_ClearToBackground; /* Pixmap procedures */ diff --git a/hw/xnest/Window.c b/hw/xnest/Window.c index 797e90697..e847ebf33 100644 --- a/hw/xnest/Window.c +++ b/hw/xnest/Window.c @@ -524,3 +524,11 @@ xnestShapeWindow(WindowPtr pWin) } } } + +void xnest_screen_ClearToBackground(WindowPtr pWin, int x, int y, int w, int h, Bool generateExposures) +{ + xcb_clear_area(xnestUpstreamInfo.conn, + generateExposures, + xnestWindow(pWin), + x, y, w, h); +} diff --git a/hw/xnest/XNWindow.h b/hw/xnest/XNWindow.h index 408da7ed4..68b829711 100644 --- a/hw/xnest/XNWindow.h +++ b/hw/xnest/XNWindow.h @@ -69,4 +69,7 @@ void xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn); void xnestSetShape(WindowPtr pWin, int kind); void xnestShapeWindow(WindowPtr pWin); +/* ScreenRec operations */ +void xnest_screen_ClearToBackground(WindowPtr pWin, int x, int y, int w, int h, Bool generateExposures); + #endif /* XNESTWINDOW_H */