User brush
Jon Griffiths
jon_p_griffiths at yahoo.com
Sun Sep 12 11:00:48 CDT 2004
Cheers,
Jon
+dlls/user/controls.h dlls/user/uitools.c dlls/user/user_main.c
Delete our cached pattern brush on dll unload
=====
"Don't wait for the seas to part, or messiahs to come;
Don't you sit around and waste this chance..." - Live
jon_p_griffiths at yahoo.com
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail
-------------- next part --------------
diff -u wine/dlls/user/controls.h wine-develop/dlls/user/controls.h
--- wine/dlls/user/controls.h 2004-09-05 08:36:40.000000000 +0000
+++ wine-develop/dlls/user/controls.h 2004-09-11 11:15:04.000000000 +0000
@@ -72,6 +72,7 @@
/* UI tools */
extern HBRUSH UITOOLS_GetPattern55AABrush(void);
+extern void UITOOLS_FreePattern55AABrush(void);
/* combo box */
diff -u wine/dlls/user/uitools.c wine-develop/dlls/user/uitools.c
--- wine/dlls/user/uitools.c 2004-09-01 18:26:41.000000000 +0000
+++ wine-develop/dlls/user/uitools.c 2004-09-11 11:14:34.000000000 +0000
@@ -135,6 +135,17 @@
return hPattern55AABrush;
}
+/*********************************************************************
+ * UITOOLS_FreePattern55AABrush
+ */
+void UITOOLS_FreePattern55AABrush(void)
+{
+ if (hPattern55AABrush)
+ {
+ DeleteObject(hPattern55AABrush);
+ DeleteObject(hPattern55AABitmap);
+ }
+}
/***********************************************************************
* UITOOLS_DrawDiagEdge
diff -u wine/dlls/user/user_main.c wine-develop/dlls/user/user_main.c
--- wine/dlls/user/user_main.c 2004-07-21 12:17:04.000000000 +0000
+++ wine-develop/dlls/user/user_main.c 2004-09-11 11:20:53.000000000 +0000
@@ -161,7 +161,7 @@
/***********************************************************************
* USER initialisation routine
*/
-static BOOL process_attach(void)
+static inline BOOL process_attach(void)
{
HINSTANCE16 instance;
@@ -210,6 +210,13 @@
return TRUE;
}
+/***********************************************************************
+ * USER termination routine
+ */
+static inline void process_detach(void)
+{
+ UITOOLS_FreePattern55AABrush();
+}
/**********************************************************************
* USER_IsExitingThread
@@ -223,7 +230,7 @@
/**********************************************************************
* thread_detach
*/
-static void thread_detach(void)
+static inline void thread_detach(void)
{
exiting_thread_id = GetCurrentThreadId();
@@ -254,6 +261,9 @@
case DLL_THREAD_DETACH:
thread_detach();
break;
+ case DLL_PROCESS_DETACH:
+ process_detach();
+ break;
}
return ret;
}
More information about the wine-patches
mailing list