aboutsummaryrefslogtreecommitdiffstats
path: root/kirc.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--kirc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kirc.c b/kirc.c
index 99af9c1..56fcb0a 100644
--- a/kirc.c
+++ b/kirc.c
@@ -328,13 +328,13 @@ main(int argc, char **argv) {
for (;;) {
int poll_res = poll(fds, 2, -1);
- ioctl(0, TIOCGWINSZ, &window_dims);
- cmax = window_dims.ws_col;
if (poll_res != -1) {
if (fds[0].revents & POLLIN) {
handle_user_input();
}
if (fds[1].revents & POLLIN && (keyboard_hit() < 1)) {
+ ioctl(0, TIOCGWINSZ, &window_dims);
+ cmax = window_dims.ws_col;
int rc = handle_server_message();
if (rc != 0) {
if (rc == -2) return EXIT_FAILURE;