* fhandler.h (fhandler_console::dwBufferSize): Delete.

(fhandler_console::dwCursorPosition): Ditto.
(fhandler_console::wAttributes): Ditto.
(fhandler_console::b): New field encompassing previously disparate screen
buffer info.
(fhandler_console::save_bufsize): Rename from savebufsiz
(fhandler_console::save_buf): Rename sfrom savebuf.
(fhandler_console::save_cursor): New field.
(fhandler_console::save_restore): New function.
(fhandler_console::con): Rename from dev_state.
(fhandler_console::focus_aware): Accommodate name change.
* fhandler_console.cc: Use 'b' field of dev_console throughout instead of
disparate names.  Accommodate dev_state -> con rename.
(dev_state:save_restore): New function.  Attempt to save the entire screen
buffer rather than just the visible part.  Clear the buffer when saving, like
Linux.
(fhandler_console::char_command): Use con.save_restore() for Save/restore
screen sequence.
This commit is contained in:
Christopher Faylor 2014-03-09 22:49:56 +00:00
parent bc7c78b225
commit dc5694dc88
3 changed files with 391 additions and 365 deletions

View File

@ -1,3 +1,24 @@
2014-03-09 Christopher Faylor <me.cygwin2014@cgf.cx>
* fhandler.h (fhandler_console::dwBufferSize): Delete.
(fhandler_console::dwCursorPosition): Ditto.
(fhandler_console::wAttributes): Ditto.
(fhandler_console::b): New field encompassing previously disparate
screen buffer info.
(fhandler_console::save_bufsize): Rename from savebufsiz
(fhandler_console::save_buf): Rename sfrom savebuf.
(fhandler_console::save_cursor): New field.
(fhandler_console::save_restore): New function.
(fhandler_console::con): Rename from dev_state.
(fhandler_console::focus_aware): Accommodate name change.
* fhandler_console.cc: Use 'b' field of dev_console throughout instead
of disparate names. Accommodate dev_state -> con rename.
(dev_state:save_restore): New function. Attempt to save the entire
screen buffer rather than just the visible part. Clear the buffer when
saving, like Linux.
(fhandler_console::char_command): Use con.save_restore() for
Save/restore screen sequence.
2014-03-09 Christopher Faylor <me.cygwin2014@cgf.cx>
* sigproc.cc (_cygtls::remove_wq): Reset thread_ev inside of lock. Set

View File

@ -1287,23 +1287,22 @@ class dev_console
/* saved cursor coordinates */
int savex, savey;
/* saved screen */
COORD savebufsiz;
PCHAR_INFO savebuf;
struct
{
short Top, Bottom;
short Top;
short Bottom;
} scroll_region;
SHORT winTop;
SHORT winBottom;
CONSOLE_SCREEN_BUFFER_INFOEX b;
COORD dwWinSize;
COORD dwBufferSize;
COORD dwCursorPosition;
WORD wAttributes;
COORD dwEnd;
/* saved screen */
COORD save_bufsize;
PCHAR_INFO save_buf;
COORD save_cursor;
COORD dwLastCursorPosition;
COORD dwMousePosition; /* scroll-adjusted coord of mouse event */
COORD dwLastMousePosition; /* scroll-adjusted coord of previous mouse event */
@ -1330,6 +1329,7 @@ class dev_console
bool __reg3 scroll_window (HANDLE, int, int, int, int);
void __reg3 scroll_buffer (HANDLE, int, int, int, int, int, int);
void __reg3 clear_screen (HANDLE, int, int, int, int);
void __reg3 save_restore (HANDLE, char);
friend class fhandler_console;
};
@ -1341,7 +1341,7 @@ public:
struct console_state
{
tty_min tty_min_state;
dev_console dev_state;
dev_console con;
};
private:
static const unsigned MAX_WRITE_CHARS;
@ -1413,7 +1413,7 @@ private:
int ioctl (unsigned int cmd, void *);
int init (HANDLE, DWORD, mode_t);
bool mouse_aware (MOUSE_EVENT_RECORD& mouse_event);
bool focus_aware () {return shared_console_info->dev_state.use_focus;}
bool focus_aware () {return shared_console_info->con.use_focus;}
select_record *select_read (select_stuff *);
select_record *select_write (select_stuff *);

File diff suppressed because it is too large Load Diff