USER32: Protect USER32 against early graphics driver unloading.
Mike McCormack
mike at codeweavers.com
Sun Oct 17 03:04:24 CDT 2004
ChangeLog:
<dmitry at codeweavers.com>
* Protect USER32 against early graphics driver unloading
-------------- next part --------------
Index: windows/winpos.c
===================================================================
RCS file: /home/wine/wine/windows/winpos.c,v
retrieving revision 1.156
diff -u -r1.156 winpos.c
--- windows/winpos.c 17 Sep 2004 18:20:11 -0000 1.156
+++ windows/winpos.c 17 Oct 2004 06:21:07 -0000
@@ -1207,7 +1207,12 @@
winpos.cx = cx;
winpos.cy = cy;
winpos.flags = flags;
- if (WIN_IsCurrentThread( hwnd )) return USER_Driver.pSetWindowPos( &winpos );
+ if (WIN_IsCurrentThread( hwnd ))
+ {
+ if (USER_Driver.pSetWindowPos)
+ return USER_Driver.pSetWindowPos( &winpos );
+ return FALSE;
+ }
return SendMessageW( winpos.hwnd, WM_WINE_SETWINDOWPOS, 0, (LPARAM)&winpos );
}
@@ -1337,7 +1342,7 @@
if (!pDWP) return FALSE;
for (i = 0, winpos = pDWP->winPos; i < pDWP->actualCount; i++, winpos++)
{
- if (!(res = USER_Driver.pSetWindowPos( winpos ))) break;
+ if (!USER_Driver.pSetWindowPos || !(res = USER_Driver.pSetWindowPos( winpos ))) break;
}
USER_HEAP_FREE( hdwp );
return res;
More information about the wine-patches
mailing list