Module: wine Branch: master Commit: f00767807f5077279d70e1c03bf607b1632ef14c URL: http://source.winehq.org/git/wine.git/?a=commit;h=f00767807f5077279d70e1c03b...
Author: Alexandre Julliard julliard@winehq.org Date: Tue Oct 18 21:58:06 2011 +0200
winex11: Chain to the next driver when not using a device font.
---
dlls/winex11.drv/text.c | 13 ++++++++++--- dlls/winex11.drv/xfont.c | 12 ++++++++---- 2 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/dlls/winex11.drv/text.c b/dlls/winex11.drv/text.c index bce0af9..96cc00b 100644 --- a/dlls/winex11.drv/text.c +++ b/dlls/winex11.drv/text.c @@ -43,16 +43,21 @@ BOOL X11DRV_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags, X11DRV_PDEVICE *physDev = get_x11drv_dev( dev ); RGNDATA *saved_region = NULL; unsigned int i; - fontObject* pfo; + fontObject* pfo = XFONT_GetFontObject( physDev->font ); XFontStruct* font; BOOL rotated = FALSE; XChar2b *str2b = NULL; BOOL dibUpdateFlag = FALSE; BOOL result = TRUE;
+ if (!pfo) + { + dev = GET_NEXT_PHYSDEV( dev, pExtTextOut ); + return dev->funcs->pExtTextOut( dev, x, y, flags, lprect, wstr, count, lpDx ); + } + if (!X11DRV_SetupGCForText( physDev )) return TRUE;
- pfo = XFONT_GetFontObject( physDev->font ); font = pfo->fs;
if (pfo->lf.lfEscapement && pfo->lpX11Trans) @@ -232,5 +237,7 @@ BOOL X11DRV_GetTextExtentExPoint( PHYSDEV dev, LPCWSTR str, INT count, HeapFree( GetProcessHeap(), 0, p ); return TRUE; } - return FALSE; + + dev = GET_NEXT_PHYSDEV( dev, pGetTextExtentExPoint ); + return dev->funcs->pGetTextExtentExPoint( dev, str, count, maxExt, lpnFit, alpDx, size ); } diff --git a/dlls/winex11.drv/xfont.c b/dlls/winex11.drv/xfont.c index 95a082d..78cefed 100644 --- a/dlls/winex11.drv/xfont.c +++ b/dlls/winex11.drv/xfont.c @@ -3391,14 +3391,16 @@ BOOL X11DRV_EnumDeviceFonts( PHYSDEV dev, LPLOGFONTW plf, FONTENUMPROCW proc, LP BOOL X11DRV_GetTextMetrics(PHYSDEV dev, TEXTMETRICW *metrics) { X11DRV_PDEVICE *physDev = get_x11drv_dev( dev ); + fontObject *pfo = XFONT_GetFontObject( physDev->font );
- if( CHECK_PFONT(physDev->font) ) + if (pfo) { - fontObject* pfo = __PFONT(physDev->font); X11DRV_cptable[pfo->fi->cptable].pGetTextMetricsW( pfo, metrics ); return TRUE; } - return FALSE; + + dev = GET_NEXT_PHYSDEV( dev, pGetTextMetrics ); + return dev->funcs->pGetTextMetrics( dev, metrics ); }
@@ -3452,5 +3454,7 @@ BOOL X11DRV_GetCharWidth( PHYSDEV dev, UINT firstChar, UINT lastChar, LPINT buff
return TRUE; } - return FALSE; + + dev = GET_NEXT_PHYSDEV( dev, pGetCharWidth ); + return dev->funcs->pGetCharWidth( dev, firstChar, lastChar, buffer ); }