[haiku-commits] haiku: hrev50178 - src/apps/screenshot headers/private/interface

  • From: jscipione@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 31 Mar 2016 23:46:55 +0200 (CEST)

hrev50178 adds 2 changesets to branch 'master'
old head: cb80fc94c246e789c3b469dd51fdfbdb54f00451
new head: bcd52c65cbb36ba816cfda808e197f2129ce34b5
overview: 
http://cgit.haiku-os.org/haiku/log/?qt=range&q=bcd52c65cbb3+%5Ecb80fc94c246

----------------------------------------------------------------------------

c4ec640b468f: WindowInfo: spaces => tabs

bcd52c65cbb3: 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.

                                     [ John Scipione <jscipione@xxxxxxxxx> ]

----------------------------------------------------------------------------

2 files changed, 8 insertions(+), 5 deletions(-)
headers/private/interface/WindowInfo.h | 6 +++---
src/apps/screenshot/Screenshot.cpp     | 7 +++++--

############################################################################

Commit:      c4ec640b468fca3bc800644a8357f4801757c3f5
URL:         http://cgit.haiku-os.org/haiku/commit/?id=c4ec640b468f
Author:      John Scipione <jscipione@xxxxxxxxx>
Date:        Thu Mar 31 21:39:49 2016 UTC

WindowInfo: spaces => tabs

----------------------------------------------------------------------------

diff --git a/headers/private/interface/WindowInfo.h 
b/headers/private/interface/WindowInfo.h
index 7396943..3769920 100644
--- a/headers/private/interface/WindowInfo.h
+++ b/headers/private/interface/WindowInfo.h
@@ -14,7 +14,7 @@
 
 struct window_info {
        team_id         team;
-    int32      server_token;
+       int32           server_token;
 
        int32           thread;
        int32           client_token;
@@ -22,8 +22,8 @@ struct window_info {
        uint32          workspaces;
 
        int32           layer;  // see ServerWindow::GetInfo()
-    uint32             feel;
-    uint32      flags;
+       uint32          feel;
+       uint32          flags;
        int32           window_left;
        int32           window_top;
        int32           window_right;

############################################################################

Revision:    hrev50178
Commit:      bcd52c65cbb36ba816cfda808e197f2129ce34b5
URL:         http://cgit.haiku-os.org/haiku/commit/?id=bcd52c65cbb3
Author:      John Scipione <jscipione@xxxxxxxxx>
Date:        Thu Mar 31 21:40:26 2016 UTC

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.

----------------------------------------------------------------------------

diff --git a/src/apps/screenshot/Screenshot.cpp 
b/src/apps/screenshot/Screenshot.cpp
index ef17978..d9b4f57 100644
--- a/src/apps/screenshot/Screenshot.cpp
+++ b/src/apps/screenshot/Screenshot.cpp
@@ -26,6 +26,7 @@
 #include <TranslatorFormats.h>
 
 #include <WindowInfo.h>
+#include <WindowPrivate.h>
 
 #include "Utility.h"
 
@@ -307,8 +308,10 @@ Screenshot::_GetActiveWindowFrame()
                        for (int i = 0; i < tokenCount; i++) {
                                token = tokens[i];
                                windowInfo = get_window_info(token);
-                               if (windowInfo && !windowInfo->is_mini
-                                               && 
!(windowInfo->show_hide_level > 0)) {
+                               if (windowInfo != NULL
+                                       && windowInfo->feel != kMenuWindowFeel
+                                       && !windowInfo->is_mini
+                                       && !(windowInfo->show_hide_level > 0)) {
                                        foundActiveWindow = true;
                                        break;
                                }


Other related posts: