Compare commits

...

3 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult 68157d4e8a fix rootless
rootless

rootless
2024-09-24 14:05:45 +02:00
Enrico Weigelt, metux IT consult 1eb5bf7b61 mi: miexpose: fit FTBS w/ rootless helper
> ../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@metux.net>
2024-09-24 13:47:28 +02:00
Enrico Weigelt, metux IT consult 3cd096e0c4 meson: always compile rootless library
Always compile (but not linking) the rootless library, for giving it some
compile test coverage.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-24 13:25:31 +02:00
4 changed files with 2 additions and 18 deletions

View File

@ -280,7 +280,7 @@ else
build_xquartz = get_option('xquartz') == 'true' build_xquartz = get_option('xquartz') == 'true'
endif endif
build_rootless = false build_rootless = true
if build_xquartz if build_xquartz
build_rootless = true build_rootless = true
endif endif

View File

@ -408,7 +408,6 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
xRectangle *prect; xRectangle *prect;
int numRects, regionnumrects; int numRects, regionnumrects;
#ifdef COMPOSITE #ifdef COMPOSITE
WindowPtr orig_pWin = pWin;
#endif #endif
/* /*
@ -496,6 +495,7 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
#ifdef COMPOSITE #ifdef COMPOSITE
/* Make sure alpha will sample as 1.0 for opaque windows */ /* Make sure alpha will sample as 1.0 for opaque windows */
if (drawable->depth == 32) { if (drawable->depth == 32) {
WindowPtr orig_pWin = pWin;
int effective_depth = orig_pWin->drawable.depth; int effective_depth = orig_pWin->drawable.depth;
if (effective_depth == 32) { if (effective_depth == 32) {

View File

@ -135,10 +135,8 @@ RootlessResolveColormap(ScreenPtr pScreen, int first_color,
} }
unsigned long RootlessWID(WindowPtr pWindow) { unsigned long RootlessWID(WindowPtr pWindow) {
ScreenPtr pScreen = pWindow->drawable.pScreen;
WindowPtr top = TopLevelParent(pWindow); WindowPtr top = TopLevelParent(pWindow);
RootlessWindowRec *winRec; RootlessWindowRec *winRec;
PixmapPtr curPixmap;
if (top == NULL) { if (top == NULL) {
return 0; return 0;

View File

@ -795,24 +795,12 @@ StartFrameResize(WindowPtr pWin, Bool gravity,
ScreenPtr pScreen = pWin->drawable.pScreen; ScreenPtr pScreen = pWin->drawable.pScreen;
RootlessWindowRec *winRec = WINREC(pWin); RootlessWindowRec *winRec = WINREC(pWin);
BoxRec rect;
int oldX2, newX2;
int oldY2, newY2;
unsigned int weight; unsigned int weight;
oldX2 = oldX + oldW, newX2 = newX + newW;
oldY2 = oldY + oldH, newY2 = newY + newH;
/* Decide which resize weighting to use */ /* Decide which resize weighting to use */
weight = ResizeWeighting(oldX, oldY, oldW, oldH, oldBW, weight = ResizeWeighting(oldX, oldY, oldW, oldH, oldBW,
newX, newY, newW, newH, newBW); 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("RESIZE TOPLEVEL WINDOW with gravity %i ", gravity);
RL_DEBUG_MSG("%d %d %d %d %d %d %d %d %d %d\n", RL_DEBUG_MSG("%d %d %d %d %d %d %d %d %d %d\n",
oldX, oldY, oldW, oldH, oldBW, newX, newY, newW, newH, newBW); 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) unsigned int newBW)
{ {
ScreenPtr pScreen = pWin->drawable.pScreen; ScreenPtr pScreen = pWin->drawable.pScreen;
RootlessWindowRec *winRec = WINREC(pWin);
int i;
/* Redraw everything. FIXME: there must be times when we don't need /* Redraw everything. FIXME: there must be times when we don't need
to do this. Perhaps when top-left weighting and no gravity? */ to do this. Perhaps when top-left weighting and no gravity? */