mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 03:44:06 +00:00
xnest
This commit is contained in:
@@ -149,9 +149,10 @@ xnestChangeGC(GCPtr pGC, unsigned long mask)
|
||||
if (mask & GCTileStipYOrigin)
|
||||
values.tile_stipple_origin_y = pGC->patOrg.y;
|
||||
|
||||
if (mask & GCFont)
|
||||
if (mask & GCFont) {
|
||||
assert(xnestFontPriv(pGC->font));
|
||||
values.font = xnestFontPriv(pGC->font)->font_id;
|
||||
|
||||
}
|
||||
if (mask & GCSubwindowMode)
|
||||
values.subwindow_mode = pGC->subWindowMode;
|
||||
|
||||
|
||||
@@ -189,8 +189,10 @@ xnestBitBlitHelper(GCPtr pGC)
|
||||
default:
|
||||
{
|
||||
struct xnest_event_queue *q = malloc(sizeof(struct xnest_event_queue));
|
||||
q->event = event;
|
||||
xorg_list_add(&q->entry, &xnestUpstreamInfo.eventQueue.entry);
|
||||
if (q) {
|
||||
q->event = event;
|
||||
xorg_list_add(&q->entry, &xnestUpstreamInfo.eventQueue.entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -343,6 +345,9 @@ xnestPolyText8(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int count,
|
||||
// won't get more than 254 elements, since it's already processed by doPolyText()
|
||||
int const bufsize = sizeof(xTextElt) + count;
|
||||
uint8_t *buffer = malloc(bufsize);
|
||||
if (!buffer)
|
||||
return 0;
|
||||
|
||||
xTextElt *elt = (xTextElt*)buffer;
|
||||
elt->len = count;
|
||||
elt->delta = 0;
|
||||
@@ -369,6 +374,8 @@ xnestPolyText16(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int count,
|
||||
// won't get more than 254 elements, since it's already processed by doPolyText()
|
||||
int const bufsize = sizeof(xTextElt) + count*2;
|
||||
uint8_t *buffer = malloc(bufsize);
|
||||
if (!buffer)
|
||||
return 0;
|
||||
xTextElt *elt = (xTextElt*)buffer;
|
||||
elt->len = count;
|
||||
elt->delta = 0;
|
||||
|
||||
@@ -293,6 +293,7 @@ breakout:
|
||||
|
||||
if (!found_default_visual) {
|
||||
ErrorF("Xnest: can't find matching visual for user specified depth %d\n", xnestDefaultDepth);
|
||||
assert(visuals);
|
||||
defaultVisual = visuals[0].vid;
|
||||
rootDepth = visuals[0].nplanes;
|
||||
}
|
||||
|
||||
@@ -442,7 +442,8 @@ xnestShapeWindow(WindowPtr pWin)
|
||||
int const num_rects = RegionNumRects(xnestWindowPriv(pWin)->bounding_shape);
|
||||
BoxPtr const pBox = RegionRects(xnestWindowPriv(pWin)->bounding_shape);
|
||||
xcb_rectangle_t *rects = calloc(num_rects, sizeof(xcb_rectangle_t));
|
||||
|
||||
if (!rects)
|
||||
return;
|
||||
for (int i = 0; i < num_rects; i++) {
|
||||
rects[i].x = pBox[i].x1;
|
||||
rects[i].y = pBox[i].y1;
|
||||
@@ -471,7 +472,8 @@ xnestShapeWindow(WindowPtr pWin)
|
||||
int const num_rects = RegionNumRects(xnestWindowPriv(pWin)->clip_shape);
|
||||
BoxPtr const pBox = RegionRects(xnestWindowPriv(pWin)->clip_shape);
|
||||
xcb_rectangle_t *rects = calloc(num_rects, sizeof(xcb_rectangle_t));
|
||||
|
||||
if (!rects)
|
||||
return;
|
||||
for (int i = 0; i < num_rects; i++) {
|
||||
rects[i].x = pBox[i].x1;
|
||||
rects[i].y = pBox[i].y1;
|
||||
|
||||
Reference in New Issue
Block a user