xserver: Branch 'master' - 2 commits

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Feb 8 15:21:39 UTC 2025


 mi/miexpose.c                   |    4 +---
 miext/rootless/rootlessCommon.c |    2 --
 miext/rootless/rootlessWindow.c |   14 --------------
 3 files changed, 1 insertion(+), 19 deletions(-)

New commits:
commit 143a6a21e10bc1a7a2322b40dd6d3be0ca96dff9
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Tue Sep 24 10:39:01 2024 +0200

    miext: rootless: fix unused variables
    
    Compiling w/ -Werror (which our CI does) breaks compile due a buch of
    unused variables.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1703>

diff --git a/miext/rootless/rootlessCommon.c b/miext/rootless/rootlessCommon.c
index 6ca58c5c1..b91b7dce5 100644
--- a/miext/rootless/rootlessCommon.c
+++ b/miext/rootless/rootlessCommon.c
@@ -133,10 +133,8 @@ RootlessResolveColormap(ScreenPtr pScreen, int first_color,
 }
 
 unsigned long RootlessWID(WindowPtr pWindow) {
-    ScreenPtr pScreen = pWindow->drawable.pScreen;
     WindowPtr top = TopLevelParent(pWindow);
     RootlessWindowRec *winRec;
-    PixmapPtr curPixmap;
 
     if (top == NULL) {
         return 0;
diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c
index 7ba375f95..6e22e6bf6 100644
--- a/miext/rootless/rootlessWindow.c
+++ b/miext/rootless/rootlessWindow.c
@@ -795,24 +795,12 @@ StartFrameResize(WindowPtr pWin, Bool gravity,
     ScreenPtr pScreen = pWin->drawable.pScreen;
     RootlessWindowRec *winRec = WINREC(pWin);
 
-    BoxRec rect;
-    int oldX2, newX2;
-    int oldY2, newY2;
     unsigned int weight;
 
-    oldX2 = oldX + oldW, newX2 = newX + newW;
-    oldY2 = oldY + oldH, newY2 = newY + newH;
-
     /* Decide which resize weighting to use */
     weight = ResizeWeighting(oldX, oldY, oldW, oldH, oldBW,
                              newX, newY, newW, newH, newBW);
 
-    /* Compute intersection between old and new rects */
-    rect.x1 = max(oldX, newX);
-    rect.y1 = max(oldY, newY);
-    rect.x2 = min(oldX2, newX2);
-    rect.y2 = min(oldY2, newY2);
-
     RL_DEBUG_MSG("RESIZE TOPLEVEL WINDOW with gravity %i ", gravity);
     RL_DEBUG_MSG("%d %d %d %d %d   %d %d %d %d %d\n",
                  oldX, oldY, oldW, oldH, oldBW, newX, newY, newW, newH, newBW);
@@ -849,8 +837,6 @@ FinishFrameResize(WindowPtr pWin, Bool gravity, int oldX, int oldY,
                   unsigned int newBW)
 {
     ScreenPtr pScreen = pWin->drawable.pScreen;
-    RootlessWindowRec *winRec = WINREC(pWin);
-    int i;
 
     /* Redraw everything. FIXME: there must be times when we don't need
        to do this. Perhaps when top-left weighting and no gravity? */
commit 6ee163cb9430fb3807292db8920dde44cadb45ef
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Mon Sep 23 19:50:55 2024 +0200

    mi: miexpose: fix FTBS w/ rootless helper
    
    FTBS when rootless subsys enabled:
    
    > ../mi/miexpose.c: In function ‘miPaintWindow’:
    > ../mi/miexpose.c:411:15: error: unused variable ‘orig_pWin’ [-Werror=unused-variable]
    >   411 |     WindowPtr orig_pWin = pWin;
    >       |               ^~~~~~~~~
    > cc1: all warnings being treated as errors
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1703>

diff --git a/mi/miexpose.c b/mi/miexpose.c
index 6032f6020..4af84310c 100644
--- a/mi/miexpose.c
+++ b/mi/miexpose.c
@@ -403,9 +403,6 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
     BoxPtr pbox;
     xRectangle *prect;
     int numRects, regionnumrects;
-#ifdef COMPOSITE
-    WindowPtr orig_pWin = pWin;
-#endif
 
     /*
      * Distance from screen to destination drawable, use this
@@ -492,6 +489,7 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
 #ifdef COMPOSITE
         /* Make sure alpha will sample as 1.0 for opaque windows */
         if (drawable->depth == 32) {
+            WindowPtr orig_pWin = pWin;
             int effective_depth = orig_pWin->drawable.depth;
 
             if (effective_depth == 32) {


More information about the xorg-commit mailing list