mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-04-02 23:50:39 +02:00
rootless: Fix Glyphs damage bounding box origin and coordinate space
The glyph bounding box in RootlessGlyphs is computed in drawable-relative (window-local) coordinates, but RootlessDamageBox expects global (screen) coordinates. Without translating by drawable.x/y, the damage region often fell outside the window's borderClip and was silently discarded by RootlessDamageRegion. RootlessGlyphs accumulated glyph positions starting from (xSrc, ySrc) instead of (0, 0). The xSrc/ySrc parameters are the source picture reference point, not destination offsets. Every standard Glyphs implementation (fbGlyphs, miGlyphs) starts position accumulation from (0, 0) and builds up destination coordinates by adding each GlyphList's xOff/yOff deltas. Starting from xSrc shifted the entire damage bounding box by (xSrc, ySrc), causing it to miss the actual rendered region. For typical text rendering where xSrc equals the destination x position, this doubled the offset, placing the damage box well outside the window's borderClip and causing RootlessDamageRegion to silently discard it. Fixes [1/2]: https://github.com/XQuartz/XQuartz/issues/323 Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
This commit is contained in:
parent
eb2bf8d1b8
commit
0f2f8e3a10
1 changed files with 7 additions and 2 deletions
|
|
@ -297,8 +297,8 @@ RootlessGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
|
|||
//SCREEN_WRAP(ps, Glyphs);
|
||||
|
||||
if (dstWin && IsFramedWindow(dstWin)) {
|
||||
x = xSrc;
|
||||
y = ySrc;
|
||||
x = 0;
|
||||
y = 0;
|
||||
|
||||
while (nlist--) {
|
||||
x += list->xOff;
|
||||
|
|
@ -341,6 +341,11 @@ RootlessGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
|
|||
y += glyph->info.yOff;
|
||||
}
|
||||
|
||||
/* RootlessDamageBox expects global (screen) coordinates */
|
||||
box.x1 += dstWin->drawable.x;
|
||||
box.y1 += dstWin->drawable.y;
|
||||
box.x2 += dstWin->drawable.x;
|
||||
box.y2 += dstWin->drawable.y;
|
||||
RootlessDamageBox(dstWin, &box);
|
||||
}
|
||||
list++;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue