[haiku-commits] haiku: hrev45198 - src/servers/app/decorator

  • From: jscipione@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 25 Jan 2013 06:35:52 +0100 (CET)

hrev45198 adds 2 changesets to branch 'master'
old head: 3071859cc6842d96fa086771c9463085ea0f2246
new head: 65b9235d19ff2d85e3a7a20c0661e8813d9a7da0
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=65b9235+%5E3071859

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

feb6002: Look at resize flags when setting resize arrows

65b9235: Fix gcc4 build by adding parens

                                     [ John Scipione <jscipione@xxxxxxxxx> ]

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

1 file changed, 11 insertions(+), 7 deletions(-)
.../app/decorator/DefaultWindowBehaviour.cpp       | 18 +++++++++++-------

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

Commit:      feb6002cf8f48ac846a98a6dd6730f3711d34c8b
URL:         http://cgit.haiku-os.org/haiku/commit/?id=feb6002
Author:      John Scipione <jscipione@xxxxxxxxx>
Date:        Fri Jan 25 05:28:44 2013 UTC

Look at resize flags when setting resize arrows

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

diff --git a/src/servers/app/decorator/DefaultWindowBehaviour.cpp 
b/src/servers/app/decorator/DefaultWindowBehaviour.cpp
index 585d305..4412566 100644
--- a/src/servers/app/decorator/DefaultWindowBehaviour.cpp
+++ b/src/servers/app/decorator/DefaultWindowBehaviour.cpp
@@ -1149,6 +1149,15 @@ DefaultWindowBehaviour::_SetNowAllowedCursor()
 void
 DefaultWindowBehaviour::_SetResizeCursor(int8 horizontal, int8 vertical)
 {
+       if ((fWindow->Flags() & B_NOT_RESIZABLE) != 0)
+               horizontal = vertical = NONE;
+       else {
+               if ((fWindow->Flags() & B_NOT_H_RESIZABLE) != 0)
+                       horizontal = NONE;
+               if ((fWindow->Flags() & B_NOT_V_RESIZABLE) != 0)
+                       vertical = NONE;
+       }
+
        fDesktop->SetManagementCursor(_ResizeCursorFor(horizontal, vertical));
 }
 
@@ -1213,11 +1222,6 @@ DefaultWindowBehaviour::_SetBorderResizeCursor(BPoint 
where)
                        break;
        }
 
-       if ((fWindow->Flags() & B_NOT_H_RESIZABLE) != 0)
-               horizontal = NONE;
-       if ((fWindow->Flags() & B_NOT_V_RESIZABLE) != 0)
-               vertical = NONE;
-
        _SetResizeCursor(horizontal, vertical);
 }
 

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

Revision:    hrev45198
Commit:      65b9235d19ff2d85e3a7a20c0661e8813d9a7da0
URL:         http://cgit.haiku-os.org/haiku/commit/?id=65b9235
Author:      John Scipione <jscipione@xxxxxxxxx>
Date:        Fri Jan 25 05:34:23 2013 UTC

Fix gcc4 build by adding parens

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

diff --git a/src/servers/app/decorator/DefaultWindowBehaviour.cpp 
b/src/servers/app/decorator/DefaultWindowBehaviour.cpp
index 4412566..b1f13f5 100644
--- a/src/servers/app/decorator/DefaultWindowBehaviour.cpp
+++ b/src/servers/app/decorator/DefaultWindowBehaviour.cpp
@@ -843,8 +843,8 @@ DefaultWindowBehaviour::MouseDown(BMessage* message, BPoint 
where,
                uint32 flags = fWindow->Flags();
 
                if ((buttons & B_SECONDARY_MOUSE_BUTTON) != 0
-                       || _IsControlModifier(fLastModifiers)
-                               && (buttons & B_PRIMARY_MOUSE_BUTTON) != 0) {
+                       || (_IsControlModifier(fLastModifiers)
+                               && (buttons & B_PRIMARY_MOUSE_BUTTON) != 0)) {
                        // right mouse button or control + left mouse button
                        switch (hitRegion) {
                                case Decorator::REGION_TAB:


Other related posts: