From a71ee883e19759e6f0db93019a16670ee92fb0fc Mon Sep 17 00:00:00 2001 From: Kevin Easton Date: Fri, 10 Nov 2017 17:16:58 +1100 Subject: [PATCH] Make "You can't hide an invisible window" message respect /SET WINDOW_QUIET Also remove unnecessary NULL check, window->screen is already checked for NULL. --- Changelog | 3 +++ source/window.c | 11 +++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Changelog b/Changelog index 8a21569..d162e8f 100644 --- a/Changelog +++ b/Changelog @@ -1,5 +1,8 @@ [Changes 1.2.2] +* Make "You can't hide an invisible window" message respect + /SET WINDOW_QUIET. (caf) + * Allow $mychannels() to query a window attached to a different server. (caf) * Fix crash when passing $mychannels() a non-existent window refnum. (caf) diff --git a/source/window.c b/source/window.c index e554a8a..27b4468 100644 --- a/source/window.c +++ b/source/window.c @@ -1078,7 +1078,8 @@ void BX_hide_window(Window *window) { if (!window->screen) { - say("You can't hide an invisible window."); + if (!get_int_var(WINDOW_QUIET_VAR)) + say("You can't hide an invisible window."); return; } if (window->screen->visible_windows == 1) @@ -1087,11 +1088,9 @@ void BX_hide_window(Window *window) say("You can't hide the last window."); return; } - if (window->screen) - { - remove_window_from_screen(window); - add_to_invisible_list(window); - } + + remove_window_from_screen(window); + add_to_invisible_list(window); } /*