From 3a12f56a62ce1d48eaad6e4e33aac7131bc9ba60 Mon Sep 17 00:00:00 2001 From: pelya Date: Sun, 6 Dec 2015 03:23:09 +0200 Subject: [PATCH] Fixed windows hidden when moved slightly off-screen to the left --- src/window.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/window.cpp b/src/window.cpp index 9f0df91fa4..34291ec94b 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -2114,8 +2114,10 @@ static void EnsureVisibleCaption(Window *w, int nx, int ny) ny = Clamp(ny, 0, _screen.height - MIN_VISIBLE_TITLE_BAR); /* Make sure the title bar isn't hidden behind the main tool bar or the status bar. */ - PreventHiding(&nx, &ny, caption_rect, FindWindowById(WC_MAIN_TOOLBAR, 0), w->left, PHD_DOWN); - PreventHiding(&nx, &ny, caption_rect, FindWindowById(WC_MAIN_TOOLBAR_RIGHT, 0), w->left, PHD_DOWN); + if (!_settings_client.gui.vertical_toolbar || _game_mode == GM_EDITOR) { + // This call hides the window totally with vertical toolbar if you move it slightly off-screen to the left + PreventHiding(&nx, &ny, caption_rect, FindWindowById(WC_MAIN_TOOLBAR, 0), w->left, PHD_DOWN); + } PreventHiding(&nx, &ny, caption_rect, FindWindowById(WC_STATUS_BAR, 0), w->left, PHD_UP); }