xnest
This commit is contained in:
parent
2ba1178e22
commit
628e36226c
|
@ -148,9 +148,10 @@ xnestChangeGC(GCPtr pGC, unsigned long mask)
|
||||||
if (mask & GCTileStipYOrigin)
|
if (mask & GCTileStipYOrigin)
|
||||||
values.tile_stipple_origin_y = pGC->patOrg.y;
|
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;
|
values.font = xnestFontPriv(pGC->font)->font_id;
|
||||||
|
}
|
||||||
if (mask & GCSubwindowMode)
|
if (mask & GCSubwindowMode)
|
||||||
values.subwindow_mode = pGC->subWindowMode;
|
values.subwindow_mode = pGC->subWindowMode;
|
||||||
|
|
||||||
|
|
|
@ -190,8 +190,10 @@ xnestBitBlitHelper(GCPtr pGC)
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
struct xnest_event_queue *q = malloc(sizeof(struct xnest_event_queue));
|
struct xnest_event_queue *q = malloc(sizeof(struct xnest_event_queue));
|
||||||
q->event = event;
|
if (q) {
|
||||||
xorg_list_add(&q->entry, &xnestUpstreamInfo.eventQueue.entry);
|
q->event = event;
|
||||||
|
xorg_list_add(&q->entry, &xnestUpstreamInfo.eventQueue.entry);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -344,6 +346,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()
|
// won't get more than 254 elements, since it's already processed by doPolyText()
|
||||||
int const bufsize = sizeof(xTextElt) + count;
|
int const bufsize = sizeof(xTextElt) + count;
|
||||||
uint8_t *buffer = malloc(bufsize);
|
uint8_t *buffer = malloc(bufsize);
|
||||||
|
if (!buffer)
|
||||||
|
return 0;
|
||||||
|
|
||||||
xTextElt *elt = (xTextElt*)buffer;
|
xTextElt *elt = (xTextElt*)buffer;
|
||||||
elt->len = count;
|
elt->len = count;
|
||||||
elt->delta = 0;
|
elt->delta = 0;
|
||||||
|
@ -370,6 +375,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()
|
// won't get more than 254 elements, since it's already processed by doPolyText()
|
||||||
int const bufsize = sizeof(xTextElt) + count*2;
|
int const bufsize = sizeof(xTextElt) + count*2;
|
||||||
uint8_t *buffer = malloc(bufsize);
|
uint8_t *buffer = malloc(bufsize);
|
||||||
|
if (!buffer)
|
||||||
|
return 0;
|
||||||
xTextElt *elt = (xTextElt*)buffer;
|
xTextElt *elt = (xTextElt*)buffer;
|
||||||
elt->len = count;
|
elt->len = count;
|
||||||
elt->delta = 0;
|
elt->delta = 0;
|
||||||
|
|
|
@ -293,6 +293,7 @@ breakout:
|
||||||
|
|
||||||
if (!found_default_visual) {
|
if (!found_default_visual) {
|
||||||
ErrorF("Xnest: can't find matching visual for user specified depth %d\n", xnestDefaultDepth);
|
ErrorF("Xnest: can't find matching visual for user specified depth %d\n", xnestDefaultDepth);
|
||||||
|
assert(visuals);
|
||||||
defaultVisual = visuals[0].vid;
|
defaultVisual = visuals[0].vid;
|
||||||
rootDepth = visuals[0].nplanes;
|
rootDepth = visuals[0].nplanes;
|
||||||
}
|
}
|
||||||
|
|
|
@ -440,7 +440,8 @@ xnestShapeWindow(WindowPtr pWin)
|
||||||
int const num_rects = RegionNumRects(xnestWindowPriv(pWin)->bounding_shape);
|
int const num_rects = RegionNumRects(xnestWindowPriv(pWin)->bounding_shape);
|
||||||
BoxPtr const pBox = RegionRects(xnestWindowPriv(pWin)->bounding_shape);
|
BoxPtr const pBox = RegionRects(xnestWindowPriv(pWin)->bounding_shape);
|
||||||
xcb_rectangle_t *rects = calloc(num_rects, sizeof(xcb_rectangle_t));
|
xcb_rectangle_t *rects = calloc(num_rects, sizeof(xcb_rectangle_t));
|
||||||
|
if (!rects)
|
||||||
|
return;
|
||||||
for (int i = 0; i < num_rects; i++) {
|
for (int i = 0; i < num_rects; i++) {
|
||||||
rects[i].x = pBox[i].x1;
|
rects[i].x = pBox[i].x1;
|
||||||
rects[i].y = pBox[i].y1;
|
rects[i].y = pBox[i].y1;
|
||||||
|
@ -469,7 +470,8 @@ xnestShapeWindow(WindowPtr pWin)
|
||||||
int const num_rects = RegionNumRects(xnestWindowPriv(pWin)->clip_shape);
|
int const num_rects = RegionNumRects(xnestWindowPriv(pWin)->clip_shape);
|
||||||
BoxPtr const pBox = RegionRects(xnestWindowPriv(pWin)->clip_shape);
|
BoxPtr const pBox = RegionRects(xnestWindowPriv(pWin)->clip_shape);
|
||||||
xcb_rectangle_t *rects = calloc(num_rects, sizeof(xcb_rectangle_t));
|
xcb_rectangle_t *rects = calloc(num_rects, sizeof(xcb_rectangle_t));
|
||||||
|
if (!rects)
|
||||||
|
return;
|
||||||
for (int i = 0; i < num_rects; i++) {
|
for (int i = 0; i < num_rects; i++) {
|
||||||
rects[i].x = pBox[i].x1;
|
rects[i].x = pBox[i].x1;
|
||||||
rects[i].y = pBox[i].y1;
|
rects[i].y = pBox[i].y1;
|
||||||
|
|
Loading…
Reference in New Issue