summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-08-13 17:27:11 -0400
committermidipix <writeonce@midipix.org>2016-08-14 07:49:33 -0400
commit79c2fe897d88310734d46cfa6692fda3727e76d5 (patch)
treeb27bd0e84ae9964637b8e41be71f7adc534fdfd1 /src
parentfd0f9bfc4a2287f34924370240e313042c0b17d8 (diff)
downloadptycon-79c2fe897d88310734d46cfa6692fda3727e76d5.tar.bz2
ptycon-79c2fe897d88310734d46cfa6692fda3727e76d5.tar.xz
console bridge: added --bell support.
Diffstat (limited to 'src')
-rw-r--r--src/console/ptyc_console_alloc.c1
-rw-r--r--src/console/ptyc_console_writer.c5
-rw-r--r--src/internal/ptycon_bridge_impl.h1
3 files changed, 7 insertions, 0 deletions
diff --git a/src/console/ptyc_console_alloc.c b/src/console/ptyc_console_alloc.c
index ea44971..a8f1610 100644
--- a/src/console/ptyc_console_alloc.c
+++ b/src/console/ptyc_console_alloc.c
@@ -162,6 +162,7 @@ int ptyc_alloc_console(struct ptyc_driver_ctx * dctx)
tctx->screen_size.x = 512;
tctx->screen_size.y = 4096;
+ tctx->drvflags = ictx->cctx.drvflags;
if (!(ntcon->alloc_console()))
return NT_STATUS_UNSUCCESSFUL;
diff --git a/src/console/ptyc_console_writer.c b/src/console/ptyc_console_writer.c
index 63384c0..38461a0 100644
--- a/src/console/ptyc_console_writer.c
+++ b/src/console/ptyc_console_writer.c
@@ -109,6 +109,11 @@ static void * __fastcall ptyc_screen_handler(struct ptyc_term_ctx * tctx)
/* switch mode */
return tctx->ctrl_handler;
} else {
+ /* filter out bell key? */
+ if (*tctx->wch_pty == 0x7)
+ if (!(tctx->drvflags & PTYC_DRIVER_BELL))
+ return ptyc_screen_handler;
+
/* copy character to the screen buffer */
*tctx->wch_con = *tctx->wch_pty;
diff --git a/src/internal/ptycon_bridge_impl.h b/src/internal/ptycon_bridge_impl.h
index 51ce93e..6e31aad 100644
--- a/src/internal/ptycon_bridge_impl.h
+++ b/src/internal/ptycon_bridge_impl.h
@@ -56,6 +56,7 @@ struct ptyc_term_ctx {
ptyc_term_handler * ctrl_handler;
ptyc_term_handler * const * ctrl_handlers[PTYC_CTRL_STATE_CAP];
ptyc_term_handler * ctrl_command;
+ uint64_t drvflags;
uint16_t foreground;
uint16_t background;
nt_coord screen_size;