diff --git a/src/screenshot.cpp b/src/screenshot.cpp index 5c3952de43..65fb8ce8ee 100644 --- a/src/screenshot.cpp +++ b/src/screenshot.cpp @@ -27,6 +27,7 @@ #include "landscape.h" #include "smallmap_colours.h" #include "smallmap_gui.h" +#include "screenshot_gui.h" #include "table/strings.h" @@ -920,8 +921,10 @@ bool MakeScreenshot(ScreenshotType t, const char *name) * of the screenshot. This way the screenshot will always show the name * of the previous screenshot in the 'successful' message instead of the * name of the new screenshot (or an empty name). */ + SetScreenshotWindowHidden(true); UndrawMouseCursor(); DrawDirtyBlocks(); + SetScreenshotWindowHidden(false); } _screenshot_name[0] = '\0'; diff --git a/src/screenshot_gui.cpp b/src/screenshot_gui.cpp index c0e65f13d0..ee0cf588e4 100644 --- a/src/screenshot_gui.cpp +++ b/src/screenshot_gui.cpp @@ -72,3 +72,17 @@ void ShowScreenshotWindow() DeleteWindowById(WC_SCREENSHOT, 0); new ScreenshotWindow(&_screenshot_window_desc); } + +void SetScreenshotWindowHidden(bool hidden) +{ + ScreenshotWindow *scw = (ScreenshotWindow *) FindWindowById(WC_SCREENSHOT, 0); + if (scw != nullptr) { + if (hidden) { + scw->SetDirtyAsBlocks(); + SetBit(scw->left, 30); + } else { + ClrBit(scw->left, 30); + scw->SetDirtyAsBlocks(); + } + } +} diff --git a/src/screenshot_gui.h b/src/screenshot_gui.h index 44a395edb1..03203a6bee 100644 --- a/src/screenshot_gui.h +++ b/src/screenshot_gui.h @@ -11,5 +11,6 @@ #define SCREENSHOT_GUI_H void ShowScreenshotWindow(); +void SetScreenshotWindowHidden(bool hidden); #endif /* SCREENSHOT_GUI_H */