OSDN Git Service

* window.cc (gethwnd): Use SetThreadPriority method.
authorcgf <cgf>
Thu, 10 Oct 2002 05:31:42 +0000 (05:31 +0000)
committercgf <cgf>
Thu, 10 Oct 2002 05:31:42 +0000 (05:31 +0000)
winsup/cygwin/ChangeLog
winsup/cygwin/window.cc

index 7ed69ff..f383b6d 100644 (file)
@@ -1,5 +1,9 @@
 2002-10-10  Christopher Faylor  <cgf@redhat.com>
 
+       * window.cc (gethwnd): Use SetThreadPriority method.
+
+2002-10-10  Christopher Faylor  <cgf@redhat.com>
+
        * Makefile.in (new-cygwin1.dll): Reorganize library order.
 
        * dcrt0.cc (do_exit): Move thread stuff after vfork stuff or threads
index 04ce590..7c67fae 100644 (file)
@@ -103,10 +103,10 @@ Winmain (VOID *)
     }
 
   /* Create hidden window. */
-  ourhwnd = CreateWindow (classname, classname,
-       WS_POPUP, CW_USEDEFAULT, CW_USEDEFAULT,
-       CW_USEDEFAULT, CW_USEDEFAULT, (HWND) NULL,
-       (HMENU) NULL, user_data->hmodule, (LPVOID) NULL);
+  ourhwnd = CreateWindow (classname, classname, WS_POPUP, CW_USEDEFAULT,
+                         CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
+                         (HWND) NULL, (HMENU) NULL, user_data->hmodule,
+                         (LPVOID) NULL);
 
   SetEvent (window_started);
 
@@ -119,9 +119,7 @@ Winmain (VOID *)
   /* Start the message loop. */
 
   while (GetMessage (&msg, ourhwnd, 0, 0) == TRUE)
-    {
-      DispatchMessage (&msg);
-    }
+    DispatchMessage (&msg);
 
   return msg.wParam;
 }
@@ -136,9 +134,10 @@ gethwnd ()
 
   window_started = CreateEvent (&sec_none_nih, TRUE, FALSE, NULL);
   h = new cygthread (Winmain, NULL, "win");
-  SetThreadPriority (*h, THREAD_PRIORITY_HIGHEST);
+  h->SetThreadPriority (THREAD_PRIORITY_HIGHEST);
   WaitForSingleObject (window_started, INFINITE);
   CloseHandle (window_started);
+  h->zap_h ();
   return ourhwnd;
 }