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.
This commit is contained in:
Kevin Easton
2017-11-10 17:16:58 +11:00
parent c6f420b53d
commit a71ee883e1
2 changed files with 8 additions and 6 deletions

View File

@@ -1,5 +1,8 @@
[Changes 1.2.2] [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) * Allow $mychannels() to query a window attached to a different server. (caf)
* Fix crash when passing $mychannels() a non-existent window refnum. (caf) * Fix crash when passing $mychannels() a non-existent window refnum. (caf)

View File

@@ -1078,6 +1078,7 @@ void BX_hide_window(Window *window)
{ {
if (!window->screen) if (!window->screen)
{ {
if (!get_int_var(WINDOW_QUIET_VAR))
say("You can't hide an invisible window."); say("You can't hide an invisible window.");
return; return;
} }
@@ -1087,12 +1088,10 @@ void BX_hide_window(Window *window)
say("You can't hide the last window."); say("You can't hide the last window.");
return; return;
} }
if (window->screen)
{
remove_window_from_screen(window); remove_window_from_screen(window);
add_to_invisible_list(window); add_to_invisible_list(window);
} }
}
/* /*
* swap_last_window: This swaps the current window with the last window * swap_last_window: This swaps the current window with the last window