Author: hbelusca
Date: Tue Oct 18 17:12:57 2016
New Revision: 72983

URL: http://svn.reactos.org/svn/reactos?rev=72983&view=rev
Log:
[CONSRV]: Minor fixes:
- Use GetSystemWindowsDirectoryW instead of GetWindowsDirectoryW inside 
"TranslateConsoleName";
- Don't add scrollbars by default to the console window when it's being created;
- Fix the 2nd parameter of MapVirtualKeyW call;
- Two code style changes in text.c and tuiterm.c.

Modified:
    trunk/reactos/win32ss/user/winsrv/concfg/settings.c
    trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c
    trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/text.c
    trunk/reactos/win32ss/user/winsrv/consrv/frontends/tui/tuiterm.c

Modified: trunk/reactos/win32ss/user/winsrv/concfg/settings.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/concfg/settings.c?rev=72983&r1=72982&r2=72983&view=diff
==============================================================================
--- trunk/reactos/win32ss/user/winsrv/concfg/settings.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/winsrv/concfg/settings.c [iso-8859-1] Tue Oct 18 
17:12:57 2016
@@ -100,7 +100,7 @@
         return;
     }
 
-    wLength = GetWindowsDirectoryW(DestString, MaxStrLen);
+    wLength = GetSystemWindowsDirectoryW(DestString, MaxStrLen);
     if ((wLength > 0) && (_wcsnicmp(ConsoleName, DestString, wLength) == 0))
     {
         StringCchCopyW(DestString, MaxStrLen, L"%SystemRoot%");

Modified: trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c?rev=72983&r1=72982&r2=72983&view=diff
==============================================================================
--- trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c    
[iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c    
[iso-8859-1] Tue Oct 18 17:12:57 2016
@@ -194,7 +194,7 @@
                 NewWindow = CreateWindowExW(WS_EX_CLIENTEDGE,
                                             GUI_CONWND_CLASS,
                                             Console->Title.Buffer,
-                                            WS_OVERLAPPEDWINDOW | WS_HSCROLL | 
WS_VSCROLL,
+                                            WS_OVERLAPPEDWINDOW,
                                             CW_USEDEFAULT,
                                             CW_USEDEFAULT,
                                             CW_USEDEFAULT,

Modified: trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/text.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/text.c?rev=72983&r1=72982&r2=72983&view=diff
==============================================================================
--- trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/text.c       
[iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/text.c       
[iso-8859-1] Tue Oct 18 17:12:57 2016
@@ -80,7 +80,7 @@
         DPRINT1("This case must never happen, because selHeight is at least == 
1\n");
     }
 
-    size += 1; /* Null-termination */
+    size++; /* Null-termination */
     size *= sizeof(WCHAR);
 
     /* Allocate some memory area to be given to the clipboard, so it will not 
be freed here */
@@ -319,7 +319,7 @@
         /* Pressing the character key, with the control keys maintained 
pressed */
         er.Event.KeyEvent.bKeyDown = TRUE;
         er.Event.KeyEvent.wVirtualKeyCode = LOBYTE(VkKey);
-        er.Event.KeyEvent.wVirtualScanCode = MapVirtualKeyW(LOBYTE(VkKey), 
MAPVK_VK_TO_CHAR);
+        er.Event.KeyEvent.wVirtualScanCode = MapVirtualKeyW(LOBYTE(VkKey), 
MAPVK_VK_TO_VSC);
         er.Event.KeyEvent.uChar.UnicodeChar = CurChar;
         er.Event.KeyEvent.dwControlKeyState = 0;
         if (HIBYTE(VkKey) & 1)

Modified: trunk/reactos/win32ss/user/winsrv/consrv/frontends/tui/tuiterm.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv/frontends/tui/tuiterm.c?rev=72983&r1=72982&r2=72983&view=diff
==============================================================================
--- trunk/reactos/win32ss/user/winsrv/consrv/frontends/tui/tuiterm.c    
[iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/winsrv/consrv/frontends/tui/tuiterm.c    
[iso-8859-1] Tue Oct 18 17:12:57 2016
@@ -452,7 +452,7 @@
     }
 
 Quit:
-    if (Ret == FALSE)
+    if (!Ret)
     {
         DeleteCriticalSection(&ActiveVirtConsLock);
         CloseHandle(ConsoleDeviceHandle);


Reply via email to