From: Christian Heller Date: Thu, 23 Jan 2014 21:03:45 +0000 (+0100) Subject: Fixed bug that crashed the client on terminal resizing due to wrongly expecting there... X-Git-Tag: tce~869 X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/static/%7B%7B%20web_path%20%7D%7D/decks?a=commitdiff_plain;h=90000141ed7582d79c5739d0219e6a3a6070b11d;p=plomrogue Fixed bug that crashed the client on terminal resizing due to wrongly expecting there always to be one active window. --- 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; */