From d8db8216ded5652863ef46f14de90245f6b942a9 Mon Sep 17 00:00:00 2001 From: Clemens Zeidler Date: Mon, 6 Dec 2010 19:31:11 +0000 Subject: [PATCH] Correctly check if the mouse has been on the tab. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39750 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/decorators/SATDecorator/SATDecorator.h | 2 +- src/add-ons/decorators/SATDecorator/SATWindow.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/add-ons/decorators/SATDecorator/SATDecorator.h b/src/add-ons/decorators/SATDecorator/SATDecorator.h index caceac89f5..3eb9c5d011 100644 --- a/src/add-ons/decorators/SATDecorator/SATDecorator.h +++ b/src/add-ons/decorators/SATDecorator/SATDecorator.h @@ -43,7 +43,7 @@ public: /*! Indicates that window is stacked */ void SetStackedMode(bool stacked, BRegion* dirty); bool StackedMode() const - { return fStackedMode; }; + { return fStackedMode; } /*! Set the tab length if the decorator is in stacked mode and if the tab is the last one in the tab bar. */ diff --git a/src/add-ons/decorators/SATDecorator/SATWindow.cpp b/src/add-ons/decorators/SATDecorator/SATWindow.cpp index bc12edf0a5..c3ef650e54 100644 --- a/src/add-ons/decorators/SATDecorator/SATWindow.cpp +++ b/src/add-ons/decorators/SATDecorator/SATWindow.cpp @@ -797,7 +797,7 @@ SATWindow::_RestoreOriginalSize(bool stayBelowMouse) if (decorator == NULL) return; BRect tabRect = decorator->TabRect(); - if (mousePosition.y < tabRect.bottom + if (mousePosition.y < tabRect.bottom && mousePosition.y > tabRect.top && mousePosition.x <= frame.right + decorator->BorderWidth() +1 && mousePosition.x >= frame.left + decorator->BorderWidth()) { // verify mouse stays on the tab