[CONSRV]: Cosmetic changes only.
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Mon, 4 Aug 2014 17:53:00 +0000 (17:53 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Mon, 4 Aug 2014 17:53:00 +0000 (17:53 +0000)
svn path=/branches/condrv_restructure/; revision=63805

win32ss/user/winsrv/consrv/condrv/conoutput.c
win32ss/user/winsrv/consrv/condrv/graphics.c
win32ss/user/winsrv/consrv/condrv/text.c
win32ss/user/winsrv/consrv/consrv.h
win32ss/user/winsrv/consrv/frontends/gui/conwnd.c

index 3ebcdc3..42d5cbf 100644 (file)
@@ -34,6 +34,7 @@ GRAPHICS_BUFFER_Destroy(IN OUT PCONSOLE_SCREEN_BUFFER Buffer);
 NTSTATUS
 CONSOLE_SCREEN_BUFFER_Initialize(OUT PCONSOLE_SCREEN_BUFFER* Buffer,
                                  IN OUT PCONSOLE Console,
+                                 IN PCONSOLE_SCREEN_BUFFER_VTBL Vtbl,
                                  IN SIZE_T Size)
 {
     if (Buffer == NULL || Console == NULL)
@@ -44,7 +45,7 @@ CONSOLE_SCREEN_BUFFER_Initialize(OUT PCONSOLE_SCREEN_BUFFER* Buffer,
 
     /* Initialize the header with the default type */
     ConSrvInitObject(&(*Buffer)->Header, SCREEN_BUFFER, Console);
-    (*Buffer)->Vtbl = NULL;
+    (*Buffer)->Vtbl = Vtbl;
     return STATUS_SUCCESS;
 }
 
index 3d2805b..fbb1491 100644 (file)
@@ -34,6 +34,7 @@ static CONSOLE_SCREEN_BUFFER_VTBL GraphicsVtbl =
 NTSTATUS
 CONSOLE_SCREEN_BUFFER_Initialize(OUT PCONSOLE_SCREEN_BUFFER* Buffer,
                                  IN OUT PCONSOLE Console,
+                                 IN PCONSOLE_SCREEN_BUFFER_VTBL Vtbl,
                                  IN SIZE_T Size);
 VOID
 CONSOLE_SCREEN_BUFFER_Destroy(IN OUT PCONSOLE_SCREEN_BUFFER Buffer);
@@ -58,10 +59,10 @@ GRAPHICS_BUFFER_Initialize(OUT PCONSOLE_SCREEN_BUFFER* Buffer,
 
     Status = CONSOLE_SCREEN_BUFFER_Initialize((PCONSOLE_SCREEN_BUFFER*)&NewBuffer,
                                               Console,
+                                              &GraphicsVtbl,
                                               sizeof(GRAPHICS_SCREEN_BUFFER));
     if (!NT_SUCCESS(Status)) return Status;
     NewBuffer->Header.Type = GRAPHICS_BUFFER;
-    NewBuffer->Vtbl = &GraphicsVtbl;
 
     /*
      * Remember the handle to the process so that we can close or unmap
index a560a4e..3373687 100644 (file)
@@ -40,6 +40,7 @@ ClearLineBuffer(PTEXTMODE_SCREEN_BUFFER Buff);
 NTSTATUS
 CONSOLE_SCREEN_BUFFER_Initialize(OUT PCONSOLE_SCREEN_BUFFER* Buffer,
                                  IN OUT PCONSOLE Console,
+                                 IN PCONSOLE_SCREEN_BUFFER_VTBL Vtbl,
                                  IN SIZE_T Size);
 VOID
 CONSOLE_SCREEN_BUFFER_Destroy(IN OUT PCONSOLE_SCREEN_BUFFER Buffer);
@@ -60,10 +61,10 @@ TEXTMODE_BUFFER_Initialize(OUT PCONSOLE_SCREEN_BUFFER* Buffer,
 
     Status = CONSOLE_SCREEN_BUFFER_Initialize((PCONSOLE_SCREEN_BUFFER*)&NewBuffer,
                                               Console,
+                                              &TextVtbl,
                                               sizeof(TEXTMODE_SCREEN_BUFFER));
     if (!NT_SUCCESS(Status)) return Status;
     NewBuffer->Header.Type = TEXTMODE_BUFFER;
-    NewBuffer->Vtbl = &TextVtbl;
 
     NewBuffer->Buffer = ConsoleAllocHeap(HEAP_ZERO_MEMORY,
                                          TextModeInfo->ScreenBufferSize.X *
@@ -751,11 +752,8 @@ ConDrvWriteConsole(IN PCONSOLE Console,
     ASSERT(Console == ScreenBuffer->Header.Console);
     ASSERT((StringBuffer != NULL) || (StringBuffer == NULL && NumCharsToWrite == 0));
 
-    // if (Console->PauseFlags & (PAUSED_FROM_KEYBOARD | PAUSED_FROM_SCROLLBAR | PAUSED_FROM_SELECTION))
-    if (Console->PauseFlags && Console->UnpauseEvent != NULL)
-    {
-        return STATUS_PENDING;
-    }
+    /* Stop here if the console is paused */
+    if (Console->UnpauseEvent != NULL) return STATUS_PENDING;
 
     if (Unicode)
     {
index 451f5d0..57a0acf 100644 (file)
@@ -56,7 +56,7 @@ typedef struct _CONSOLE_PROCESS_DATA
     HANDLE ConsoleHandle;
     HANDLE ParentConsoleHandle;
 
-    BOOL ConsoleApp;    // TRUE if it is a CUI app, FALSE otherwise.
+    BOOLEAN ConsoleApp;    // TRUE if it is a CUI app, FALSE otherwise.
 
     RTL_CRITICAL_SECTION HandleTableLock;
     ULONG HandleTableSize;
index c92593d..68d6579 100644 (file)
@@ -945,12 +945,10 @@ GuiPaintGraphicsBuffer(PGRAPHICS_SCREEN_BUFFER Buffer,
 static VOID
 OnPaint(PGUI_CONSOLE_DATA GuiData)
 {
-    PCONSOLE_SCREEN_BUFFER ActiveBuffer;
+    PCONSOLE_SCREEN_BUFFER ActiveBuffer = GuiData->ActiveBuffer;
     PAINTSTRUCT ps;
     RECT rcPaint;
 
-    ActiveBuffer = GuiData->ActiveBuffer;
-
     BeginPaint(GuiData->hWindow, &ps);
     if (ps.hdc != NULL &&
         ps.rcPaint.left < ps.rcPaint.right &&