mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
treewide: write xXineramaScreenInfo via x_rpcbuf_write_rect()
The xXineramaScreenInfo payload type has the same definition as xRectangle, so we can just use x_rpcbuf_write_rect() for those. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
fe9fcfe98f
commit
f288745d49
@@ -1044,14 +1044,12 @@ ProcXineramaQueryScreens(ClientPtr client)
|
|||||||
int i;
|
int i;
|
||||||
FOR_NSCREENS_BACKWARD(i) {
|
FOR_NSCREENS_BACKWARD(i) {
|
||||||
ScreenPtr walkScreen = screenInfo.screens[i];
|
ScreenPtr walkScreen = screenInfo.screens[i];
|
||||||
xXineramaScreenInfo scratch = {
|
/* xXineramaScreenInfo is the same as xRectangle */
|
||||||
.x_org = walkScreen->x,
|
x_rpcbuf_write_rect(&rpcbuf,
|
||||||
.y_org = walkScreen->y,
|
walkScreen->x,
|
||||||
.width = walkScreen->width,
|
walkScreen->y,
|
||||||
.height = walkScreen->height,
|
walkScreen->width,
|
||||||
};
|
walkScreen->height);
|
||||||
/* scratch consists of 4x CARD16 */
|
|
||||||
x_rpcbuf_write_CARD16s(&rpcbuf, (CARD16*)&scratch, 4);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -246,11 +246,13 @@ ProcRRXineramaQueryScreens(ClientPtr client)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (m = 0; m < nmonitors; m++) {
|
for (m = 0; m < nmonitors; m++) {
|
||||||
|
BoxRec box = monitors[m].geometry.box;
|
||||||
/* write xXineramaScreenInfo */
|
/* write xXineramaScreenInfo */
|
||||||
x_rpcbuf_write_INT16(&rpcbuf, monitors[m].geometry.box.x1);
|
x_rpcbuf_write_rect(&rpcbuf,
|
||||||
x_rpcbuf_write_INT16(&rpcbuf, monitors[m].geometry.box.y1);
|
box.x1,
|
||||||
x_rpcbuf_write_CARD16(&rpcbuf, monitors[m].geometry.box.x2 - monitors[m].geometry.box.x1);
|
box.y1,
|
||||||
x_rpcbuf_write_CARD16(&rpcbuf, monitors[m].geometry.box.y2 - monitors[m].geometry.box.y1);
|
box.x2 - box.x1,
|
||||||
|
box.y2 - box.y1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (monitors)
|
if (monitors)
|
||||||
|
|||||||
Reference in New Issue
Block a user