From 8b59e647d03ef5c38ae93305e9ffc1a0787c9467 Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Sat, 25 Feb 2017 18:28:55 +0000 Subject: [PATCH] -displaySize git-svn-id: svn://qnap.local/TwoTerm/trunk@3179 5590a31f-7b70-45f8-8c82-aa3a8e5f4507 --- Emulators/Emulator.h | 2 ++ TermWindowController.mm | 3 +++ 2 files changed, 5 insertions(+) diff --git a/Emulators/Emulator.h b/Emulators/Emulator.h index 8050fac..70f0c49 100644 --- a/Emulators/Emulator.h +++ b/Emulators/Emulator.h @@ -43,6 +43,8 @@ extern "C" unsigned EventCharacters(NSEvent *event, std::u32string &rv); -(void)processCharacter: (uint8_t)c screen: (Screen *)screen output: (OutputChannel *)output; -(void)processData: (uint8_t *)data length: (size_t)length screen: (Screen *)screen output: (OutputChannel *)output; +-(struct winsize)displaySize; + @required -(void)keyDown: (NSEvent *)event screen: (Screen *)screen output: (OutputChannel *)output; diff --git a/TermWindowController.mm b/TermWindowController.mm index 2e3eb13..e1b6775 100644 --- a/TermWindowController.mm +++ b/TermWindowController.mm @@ -150,6 +150,9 @@ } + if ([_emulator respondsToSelector: @selector(displaySize)]) { + ws = [_emulator displaySize]; + } [_emulatorView resizeTo: iSize(ws.ws_col, ws.ws_row) animated: NO];