winex11.drv: Avoid X error with unsupported pen styles.

This commit is contained in:
Alexandre Julliard 2006-10-20 10:21:08 +02:00
parent c2b4629228
commit 60f88a5ac1
2 changed files with 6 additions and 4 deletions

View File

@ -243,9 +243,7 @@ BOOL X11DRV_SetupGCForPen( X11DRV_PDEVICE *physDev )
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;

View File

@ -98,7 +98,11 @@ HPEN X11DRV_SelectPen( X11DRV_PDEVICE *physDev, HPEN hpen )
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;
}