From 90000141ed7582d79c5739d0219e6a3a6070b11d Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Thu, 23 Jan 2014 22:03:45 +0100 Subject: [PATCH] Fixed bug that crashed the client on terminal resizing due to wrongly expecting there always to be one active window. --- src/client/control.c | 2 +- src/client/wincontrol.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/control.c b/src/client/control.c index 4c512dc..a58c35c 100644 --- a/src/client/control.c +++ b/src/client/control.c @@ -151,7 +151,7 @@ static uint8_t try_server_commands(struct Command * command) extern uint8_t try_key(uint16_t key) { struct Command * command = get_command_to_keycode(world.kb_global.kbs, key); - if (!command) + if (!command && world.wmeta.active) { struct WinConf * wc = get_winconf_by_win(world.wmeta.active); if (0 == wc->view) diff --git a/src/client/wincontrol.h b/src/client/wincontrol.h index 8290379..2ecb4be 100644 --- a/src/client/wincontrol.h +++ b/src/client/wincontrol.h @@ -27,7 +27,7 @@ struct WinConf { struct Win * win; /* Window / Win struct configured by this WinConf. */ struct KeyBindingDB kb; /* Window-specific keybindings. */ - struct yx_uint16 center; /* Designated Win.center */ + struct yx_uint16 center; /* Designated Win.center. */ int16_t height; /* Designated height to pass to init_win(). */ int16_t width; /* Designated width to pass to init_win(). */ uint8_t height_type; /* 0: read .height/.width as size in positive cells; */ -- 2.30.2