From ca1ec21dc21563e63a91d4e307dc5ad0490e6cc4 Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Mon, 1 Oct 2018 09:13:15 +0200 Subject: [PATCH] fix and document window width on screen width dependency --- src/fe-text/mainwindows.c | 4 ++-- src/fe-text/mainwindows.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fe-text/mainwindows.c b/src/fe-text/mainwindows.c index d1495965..b01f3d04 100644 --- a/src/fe-text/mainwindows.c +++ b/src/fe-text/mainwindows.c @@ -252,9 +252,9 @@ MAIN_WINDOW_REC *mainwindow_create(int right) } g_slist_free(line); } else { - if (MAIN_WINDOW_TEXT_WIDTH(parent) < - 2* NEW_WINDOW_WIDTH) + if (MAIN_WINDOW_TEXT_WIDTH(parent) < 2 * NEW_WINDOW_WIDTH) { parent = find_window_with_room_right(); + } if (parent == NULL) return NULL; /* not enough space */ diff --git a/src/fe-text/mainwindows.h b/src/fe-text/mainwindows.h index 414275bf..4810c1e3 100644 --- a/src/fe-text/mainwindows.h +++ b/src/fe-text/mainwindows.h @@ -5,7 +5,7 @@ #include "term.h" #define WINDOW_MIN_SIZE 2 -#define NEW_WINDOW_WIDTH 10 +#define NEW_WINDOW_WIDTH 20 /* must be >= MIN_SCREEN_WIDTH defined in term.c */ #define MAIN_WINDOW_TEXT_HEIGHT(window) \ ((window)->height-(window)->statusbar_lines)