[CONSRV]: Minor fixes:
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Tue, 18 Oct 2016 17:12:57 +0000 (17:12 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Tue, 18 Oct 2016 17:12:57 +0000 (17:12 +0000)
- 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.

svn path=/trunk/; revision=72983

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

index 5880825..0b810c4 100644 (file)
@@ -100,7 +100,7 @@ TranslateConsoleName(OUT LPWSTR DestString,
         return;
     }
 
-    wLength = GetWindowsDirectoryW(DestString, MaxStrLen);
+    wLength = GetSystemWindowsDirectoryW(DestString, MaxStrLen);
     if ((wLength > 0) && (_wcsnicmp(ConsoleName, DestString, wLength) == 0))
     {
         StringCchCopyW(DestString, MaxStrLen, L"%SystemRoot%");
index 6b63514..61f4ade 100644 (file)
@@ -194,7 +194,7 @@ GuiConsoleInputThread(PVOID Param)
                 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,
index b59277f..a206fcd 100644 (file)
@@ -80,7 +80,7 @@ CopyBlock(PTEXTMODE_SCREEN_BUFFER Buffer,
         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 @@ GuiPasteToTextModeBuffer(PTEXTMODE_SCREEN_BUFFER Buffer,
         /* 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)
index 7518819..e1e96d6 100644 (file)
@@ -452,7 +452,7 @@ TuiInit(DWORD OemCP)
     }
 
 Quit:
-    if (Ret == FALSE)
+    if (!Ret)
     {
         DeleteCriticalSection(&ActiveVirtConsLock);
         CloseHandle(ConsoleDeviceHandle);