diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 0bec95ac1a..d8daed20b6 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -3698,85 +3698,6 @@ static Bool intersect(int ax1, int ay1, unsigned int aw, unsigned int ah, return TRUE; } -#ifndef NXAGENT_RANDR_XINERAMA_CLIPPING -/* intersect two rectangles, return aw/ah for w/h if resulting - rectangle is (partly) outside of bounding box */ -static Bool intersect_bb(int ax1, int ay1, unsigned int aw, unsigned int ah, - int bx1, int by1, unsigned int bw, unsigned int bh, - int bbx1, int bby1, int bbx2, int bby2, - int *x, int *y, unsigned int *w, unsigned int *h) -{ - - #ifdef DEBUG - fprintf(stderr, "intersect_bb: session window: ([%d],[%d]) [ %d x %d ]\n", ax1, ay1, aw, ah); - fprintf(stderr, "intersect_bb: crtc: ([%d],[%d]) [ %d x %d ]\n", bx1, by1, bw, bh); - fprintf(stderr, "intersect_bb: bounding box: ([%d],[%d]) [ %d x %d ]\n", bbx1, bby1, bbx2-bbx1, bby2-bby1); - #endif - - Bool result = intersect(ax1, ay1, aw, ah, bx1, by1, bw, bh, x, y, w, h); - - if (result == TRUE) { - - /* - * ###### The X-Coordinate ###### - */ - - /* check if outside-left of bounding box */ - if (bx1 == bbx1 && ax1 < bbx1) { - - *w += bbx1 - ax1; - *x = 0; - - #ifdef DEBUG - fprintf(stderr, "intersect_bb: session box is outside-left of the bounding box - width gets adapted to [%d]\n", *w); - #endif - - - } - - /* check if outside-right of bounding box */ - if (bx1 + bw == bbx2 && ax1 + aw > bbx2) { - - *w += ax1 + aw - bbx2; - - #ifdef DEBUG - fprintf(stderr, "intersect_bb: session box is outside-right of the bounding box - width gets adapted to [%d]\n", *w); - #endif - - } - - /* - * ###### The Y-Coordinate ###### - */ - - /* check if outside-above of bounding box */ - if (by1 == bby1 && ay1 < bby1) { - - *h += bby1 - ay1; - *y = 0; - - #ifdef DEBUG - fprintf(stderr, "intersect_bb: session box is outside-above of the bounding box - height gets adapted to [%d]\n", *h); - #endif - - } - - /* check if outside-below of bounding box */ - if (by1 + bh == bby2 && ay1 + ah > bby2) { - - *h += ay1 + ah - bby2; - - #ifdef DEBUG - fprintf(stderr, "intersect_bb: session box is outside-below of the bounding box - height gets adapted to [%d]\n", *h); - #endif - - } - - } - return result; -} -#endif - RRModePtr nxagentRRCustomMode = NULL; /*