[dasher: 14/217] Win32 - composition and program priority tweaks



commit 7eddc4079ba65ff99fadb84f624cd744acf33bd1
Author: ipomoena <amajorek google com>
Date:   Mon Aug 10 10:40:25 2015 -0700

    Win32 - composition and program priority tweaks
    
    Composition mode should not be always on top.
    Program priority bumped up to normal. Five years later dasher does not
    seem CPU hungry anymore. But jitter caused by low priority is annoying.

 Src/Win32/DasherWindow.cpp |    4 ++--
 Src/Win32/WinMain.cpp      |    4 ----
 2 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/Src/Win32/DasherWindow.cpp b/Src/Win32/DasherWindow.cpp
index d6ffdbd..1667a5b 100644
--- a/Src/Win32/DasherWindow.cpp
+++ b/Src/Win32/DasherWindow.cpp
@@ -72,7 +72,7 @@ HWND CDasherWindow::Create() {
 
   HWND hWnd;
 
-  if ((iStyle == APP_STYLE_COMPOSE) || (iStyle == APP_STYLE_DIRECT)) {
+  if (iStyle == APP_STYLE_DIRECT) {
     hWnd = CWindowImpl<CDasherWindow >::Create(NULL, NULL, WindowTitle.c_str(), WS_OVERLAPPEDWINDOW | 
WS_CLIPCHILDREN, WS_EX_NOACTIVATE | WS_EX_APPWINDOW | WS_EX_TOPMOST);
     ::SetMenu(hWnd, NULL);
   }
@@ -369,7 +369,7 @@ void CDasherWindow::Layout() {
   int iStyle(m_pAppSettings->GetLongParameter(APP_LP_STYLE));
 
   // Set up the window properties
-  if ((iStyle == APP_STYLE_COMPOSE) || (iStyle == APP_STYLE_DIRECT)) {
+  if (iStyle == APP_STYLE_DIRECT) {
     SetWindowLong(GWL_EXSTYLE, GetWindowLong(GWL_EXSTYLE) | WS_EX_NOACTIVATE | WS_EX_APPWINDOW);
     SetWindowPos(HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
     SetMenu(NULL);
diff --git a/Src/Win32/WinMain.cpp b/Src/Win32/WinMain.cpp
index d79f1a9..58cc4f3 100644
--- a/Src/Win32/WinMain.cpp
+++ b/Src/Win32/WinMain.cpp
@@ -61,9 +61,5 @@ VOID CALLBACK CDasherApp::HandleWinEvent(HWINEVENTHOOK hWinEventHook, DWORD even
 extern "C" int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPTSTR /*lpCmdLine*/, int 
nShowCmd)
 {
   WinHelper::hInstApp = hInstance;
-
-  // We don't want to starve other interactive applications
-  SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_BELOW_NORMAL);
-
   return DasherApp.WinMain(nShowCmd);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]