Ulrich Czekalla : winex11.drv:
Avoid grabbing syslevel locks in the wrong order.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Dec 15 07:21:42 CST 2006
Module: wine
Branch: master
Commit: 4d8135e0c87022518b9f24fdc572181dc2f47b24
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4d8135e0c87022518b9f24fdc572181dc2f47b24
Author: Ulrich Czekalla <ulrich.czekalla at utoronto.ca>
Date: Thu Dec 14 15:42:30 2006 -0500
winex11.drv: Avoid grabbing syslevel locks in the wrong order.
---
dlls/gdi32/opengl.c | 2 +-
dlls/winex11.drv/opengl.c | 11 ++++++-----
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/dlls/gdi32/opengl.c b/dlls/gdi32/opengl.c
index fdf39f3..6793918 100644
--- a/dlls/gdi32/opengl.c
+++ b/dlls/gdi32/opengl.c
@@ -169,7 +169,7 @@ BOOL WINAPI wglMakeCurrent(HDC hdc, HGLR
if(hglrc == NULL)
dc = OPENGL_GetDefaultDC();
else
- dc = DC_GetDCPtr( hdc );
+ dc = DC_GetDCUpdate( hdc );
TRACE("hdc: (%p), hglrc: (%p)\n", hdc, hglrc);
diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c
index 95ca135..07e076d 100644
--- a/dlls/winex11.drv/opengl.c
+++ b/dlls/winex11.drv/opengl.c
@@ -1443,7 +1443,7 @@ PROC X11DRV_wglGetProcAddress(LPCSTR lps
* Adjust the current viewport and scissor in order to position
* and size the current drawable correctly on the parent window.
*/
-static void sync_current_drawable(void)
+static void sync_current_drawable(BOOL updatedc)
{
int dy;
int width;
@@ -1455,7 +1455,8 @@ static void sync_current_drawable(void)
if (ctx && ctx->physDev)
{
- GetClipBox(ctx->physDev->hdc, &rc); /* Make sure physDev is up to date */
+ if (updatedc)
+ GetClipBox(ctx->physDev->hdc, &rc); /* Make sure physDev is up to date */
dy = ctx->physDev->drawable_rect.bottom - ctx->physDev->drawable_rect.top -
ctx->physDev->dc_rect.bottom;
@@ -1535,7 +1536,7 @@ BOOL X11DRV_wglMakeCurrent(X11DRV_PDEVIC
}
else
{
- sync_current_drawable();
+ sync_current_drawable(FALSE);
}
}
}
@@ -1885,7 +1886,7 @@ static void WINAPI X11DRV_wglScissor(GLi
ctx->scissor.right = x + width;
ctx->scissor.bottom = y + height;
- sync_current_drawable();
+ sync_current_drawable(TRUE);
}
static void WINAPI X11DRV_wglViewport(GLint x, GLint y, GLsizei width, GLsizei height)
@@ -1897,7 +1898,7 @@ static void WINAPI X11DRV_wglViewport(GL
ctx->viewport.right = x + width;
ctx->viewport.bottom = y + height;
- sync_current_drawable();
+ sync_current_drawable(TRUE);
}
/**
More information about the wine-cvs
mailing list