Author: hbelusca
Date: Sun Mar 31 00:47:44 2013
New Revision: 58624
URL:
http://svn.reactos.org/svn/reactos?rev=58624&view=rev
Log:
[CONSRV]
Trigger WINDOW_BUFFER_SIZE_EVENT event when resizing the screen-buffer.
Modified:
branches/ros-csrss/win32ss/user/consrv/frontends/gui/guiterm.c
Modified: branches/ros-csrss/win32ss/user/consrv/frontends/gui/guiterm.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/f…
==============================================================================
--- branches/ros-csrss/win32ss/user/consrv/frontends/gui/guiterm.c [iso-8859-1]
(original)
+++ branches/ros-csrss/win32ss/user/consrv/frontends/gui/guiterm.c [iso-8859-1] Sun Mar 31
00:47:44 2013
@@ -1938,7 +1938,10 @@
return STATUS_INVALID_PARAMETER;
if (Size.X == ScreenBuffer->ScreenBufferSize.X && Size.Y ==
ScreenBuffer->ScreenBufferSize.Y)
+ {
+ // FIXME: Trigger a buffer resize event ??
return STATUS_SUCCESS;
+ }
Buffer = RtlAllocateHeap(ConSrvHeap, 0, Size.X * Size.Y * 2);
if (!Buffer)
@@ -2004,6 +2007,19 @@
ScreenBuffer->ShowX = Size.X - Console->ConsoleSize.X;
if (ScreenBuffer->ShowY > Size.Y - Console->ConsoleSize.Y)
ScreenBuffer->ShowY = Size.Y - Console->ConsoleSize.Y;
+
+ /*
+ * Trigger a buffer resize event
+ */
+ if (Console->InputBuffer.Mode & ENABLE_WINDOW_INPUT)
+ {
+ INPUT_RECORD er;
+
+ er.EventType = WINDOW_BUFFER_SIZE_EVENT;
+ er.Event.WindowBufferSizeEvent.dwSize = ScreenBuffer->ScreenBufferSize;
+
+ ConioProcessInputEvent(Console, &er);
+ }
/* TODO: Should update scrollbar, but can't use anything that
* calls SendMessage or it could cause deadlock --> Use PostMessage */