Screenshot: Don't take screenshot of open menu

...take screenshot of window with the menu open instead.

menus are windows, this is an implementation detail.
This commit is contained in:
John Scipione
2016-03-31 14:40:26 -07:00
parent c4ec640b46
commit bcd52c65cb
+5 -2
View File
@@ -26,6 +26,7 @@
#include <TranslatorFormats.h> #include <TranslatorFormats.h>
#include <WindowInfo.h> #include <WindowInfo.h>
#include <WindowPrivate.h>
#include "Utility.h" #include "Utility.h"
@@ -307,8 +308,10 @@ Screenshot::_GetActiveWindowFrame()
for (int i = 0; i < tokenCount; i++) { for (int i = 0; i < tokenCount; i++) {
token = tokens[i]; token = tokens[i];
windowInfo = get_window_info(token); windowInfo = get_window_info(token);
if (windowInfo && !windowInfo->is_mini if (windowInfo != NULL
&& !(windowInfo->show_hide_level > 0)) { && windowInfo->feel != kMenuWindowFeel
&& !windowInfo->is_mini
&& !(windowInfo->show_hide_level > 0)) {
foundActiveWindow = true; foundActiveWindow = true;
break; break;
} }