diff options
Diffstat (limited to 'src/w32term.c')
| -rw-r--r-- | src/w32term.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/w32term.c b/src/w32term.c index f764e250aa8..f48e72553a5 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -6925,6 +6925,15 @@ x_delete_display (struct w32_display_info *dpyinfo) | |||
| 6925 | 6925 | ||
| 6926 | /* Set up use of W32. */ | 6926 | /* Set up use of W32. */ |
| 6927 | 6927 | ||
| 6928 | void | ||
| 6929 | w32_init_main_thread (void) | ||
| 6930 | { | ||
| 6931 | dwMainThreadId = GetCurrentThreadId (); | ||
| 6932 | DuplicateHandle (GetCurrentProcess (), GetCurrentThread (), | ||
| 6933 | GetCurrentProcess (), &hMainThread, 0, TRUE, | ||
| 6934 | DUPLICATE_SAME_ACCESS); | ||
| 6935 | } | ||
| 6936 | |||
| 6928 | DWORD WINAPI w32_msg_worker (void * arg); | 6937 | DWORD WINAPI w32_msg_worker (void * arg); |
| 6929 | 6938 | ||
| 6930 | static void | 6939 | static void |
| @@ -6985,10 +6994,6 @@ w32_initialize (void) | |||
| 6985 | terminates */ | 6994 | terminates */ |
| 6986 | init_crit (); | 6995 | init_crit (); |
| 6987 | 6996 | ||
| 6988 | dwMainThreadId = GetCurrentThreadId (); | ||
| 6989 | DuplicateHandle (GetCurrentProcess (), GetCurrentThread (), | ||
| 6990 | GetCurrentProcess (), &hMainThread, 0, TRUE, DUPLICATE_SAME_ACCESS); | ||
| 6991 | |||
| 6992 | /* Wait for thread to start */ | 6997 | /* Wait for thread to start */ |
| 6993 | { | 6998 | { |
| 6994 | MSG msg; | 6999 | MSG msg; |