]> sourceware.org Git - newlib-cygwin.git/commitdiff
* window.cc (gethwnd): Use SetThreadPriority method.
authorChristopher Faylor <me@cgf.cx>
Thu, 10 Oct 2002 05:31:43 +0000 (05:31 +0000)
committerChristopher Faylor <me@cgf.cx>
Thu, 10 Oct 2002 05:31:43 +0000 (05:31 +0000)
winsup/cygwin/ChangeLog
winsup/cygwin/window.cc

index 7ed69ffaf1bc161cfb27f75ec2eba09eddc8b494..f383b6d01bfae15ecce8c90ddf83cc422dad6af4 100644 (file)
@@ -1,3 +1,7 @@
+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.
index 04ce590ee18ea6fe7bb08e031934b3495f2b5c88..7c67fae26dbfd1417694d554e2df7d7d5cc49c2e 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;
 }
 
This page took 0.039614 seconds and 5 git commands to generate.