Alexandre Julliard : winex11.drv: Avoid X error with unsupported pen
styles .
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Oct 20 04:45:45 CDT 2006
Module: wine
Branch: master
Commit: 60f88a5ac155698dc5cf348151c632a523a6d7a5
URL: http://source.winehq.org/git/wine.git/?a=commit;h=60f88a5ac155698dc5cf348151c632a523a6d7a5
Author: Alexandre Julliard <julliard at winehq.org>
Date: Fri Oct 20 10:21:08 2006 +0200
winex11.drv: Avoid X error with unsupported pen styles.
---
dlls/winex11.drv/graphics.c | 4 +---
dlls/winex11.drv/pen.c | 6 +++++-
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/dlls/winex11.drv/graphics.c b/dlls/winex11.drv/graphics.c
index 1558aa5..975a941 100644
--- a/dlls/winex11.drv/graphics.c
+++ b/dlls/winex11.drv/graphics.c
@@ -243,9 +243,7 @@ BOOL X11DRV_SetupGCForPen( X11DRV_PDEVIC
val.join_style = JoinRound;
}
wine_tsx11_lock();
- if ((physDev->pen.width <= 1) &&
- (physDev->pen.style != PS_SOLID) &&
- (physDev->pen.style != PS_INSIDEFRAME))
+ if (physDev->pen.width <= 1 && physDev->pen.dash_len)
{
XSetDashes( gdi_display, physDev->gc, 0, physDev->pen.dashes, physDev->pen.dash_len );
val.line_style = (GetBkMode(physDev->hdc) == OPAQUE) ? LineDoubleDash : LineOnOffDash;
diff --git a/dlls/winex11.drv/pen.c b/dlls/winex11.drv/pen.c
index faeae5c..32d9e73 100644
--- a/dlls/winex11.drv/pen.c
+++ b/dlls/winex11.drv/pen.c
@@ -98,7 +98,11 @@ HPEN X11DRV_SelectPen( X11DRV_PDEVICE *p
break;
case PS_USERSTYLE:
FIXME("PS_USERSTYLE is not supported\n");
- break;
+ /* fall through */
+ default:
+ physDev->pen.dashes = NULL;
+ physDev->pen.dash_len = 0;
+ break;
}
return hpen;
}
More information about the wine-cvs
mailing list