diff options
author | José Fonseca <jfonseca@vmware.com> | 2009-06-17 19:24:51 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2009-06-18 14:54:07 +0100 |
commit | 4b4855c717e839a9ee6353604558543473c020c9 (patch) | |
tree | 29bf8c621b9947e74a7ba9c4e6d07f35f9e531b5 /src/gallium/state_trackers/wgl/shared/stw_framebuffer.c | |
parent | 1b05b5b4fecd9ac8ef34abdda6c085868016ad84 (diff) |
wgl: Move all thread related code together.
Not only for cosmetic reasons, but also because we need to set the
SetWindowsHookEx hook for threads created before the DllMain is called
(threads for each we don't get the DLL_THREAD_ATTACH notification).
Diffstat (limited to 'src/gallium/state_trackers/wgl/shared/stw_framebuffer.c')
-rw-r--r-- | src/gallium/state_trackers/wgl/shared/stw_framebuffer.c | 37 |
1 files changed, 1 insertions, 36 deletions
diff --git a/src/gallium/state_trackers/wgl/shared/stw_framebuffer.c b/src/gallium/state_trackers/wgl/shared/stw_framebuffer.c index 58f1830319..88043859ce 100644 --- a/src/gallium/state_trackers/wgl/shared/stw_framebuffer.c +++ b/src/gallium/state_trackers/wgl/shared/stw_framebuffer.c @@ -84,7 +84,7 @@ stw_framebuffer_destroy_locked( * @sa http://msdn.microsoft.com/en-us/library/ms644975(VS.85).aspx * @sa http://msdn.microsoft.com/en-us/library/ms644960(VS.85).aspx */ -static LRESULT CALLBACK +LRESULT CALLBACK stw_call_window_proc( int nCode, WPARAM wParam, @@ -423,38 +423,3 @@ stw_swap_layer_buffers( return FALSE; } - - -boolean -stw_framebuffer_init_thread(void) -{ - struct stw_tls_data *tls_data; - - tls_data = stw_tls_get_data(); - if(!tls_data) - return FALSE; - - tls_data->hCallWndProcHook = SetWindowsHookEx(WH_CALLWNDPROC, - stw_call_window_proc, - NULL, - GetCurrentThreadId()); - if(tls_data->hCallWndProcHook == NULL) - return FALSE; - - return TRUE; -} - -void -stw_framebuffer_cleanup_thread(void) -{ - struct stw_tls_data *tls_data; - - tls_data = stw_tls_get_data(); - if(!tls_data) - return; - - if(tls_data->hCallWndProcHook) { - UnhookWindowsHookEx(tls_data->hCallWndProcHook); - tls_data->hCallWndProcHook = NULL; - } -} |