Author: bonefish Date: 2011-01-02 01:29:17 +0100 (Sun, 02 Jan 2011) New Revision: 40060 Changeset: http://dev.haiku-os.org/changeset/40060 Modified: haiku/trunk/src/servers/app/DefaultWindowBehaviour.cpp haiku/trunk/src/servers/app/DefaultWindowBehaviour.h Log: Removed Humdinger's resize mode. Modified: haiku/trunk/src/servers/app/DefaultWindowBehaviour.cpp =================================================================== --- haiku/trunk/src/servers/app/DefaultWindowBehaviour.cpp 2011-01-02 00:23:03 UTC (rev 40059) +++ haiku/trunk/src/servers/app/DefaultWindowBehaviour.cpp 2011-01-02 00:29:17 UTC (rev 40060) @@ -701,68 +701,6 @@ }; -// #pragma mark - State - - -struct DefaultWindowBehaviour::HumdingerResizeState : State { - HumdingerResizeState(DefaultWindowBehaviour& behavior, BPoint where) - : - State(behavior), - fInitialMousePosition(where), - fJitterPhase(true) - { - } - - virtual void EnterState(State* previousState) - { - fDesktop->SetManagementCursor( - fDesktop->GetCursorManager().GetCursor(B_CURSOR_ID_MOVE)); - } - - virtual void ExitState(State* nextState) - { - fBehavior._ResetResizeCursor(); - } - - virtual void MouseUp(BMessage* message, BPoint where) - { - // Leave the state, when the middle mouse button has been released. - int32 buttons = message->FindInt32("buttons"); - if ((buttons & B_TERTIARY_MOUSE_BUTTON) == 0) - fBehavior._NextState(NULL); - } - - virtual void MouseMoved(BMessage* message, BPoint where, bool isFake) - { - // ignore the initial movement - float dx = where.x - fInitialMousePosition.x; - float dy = where.y - fInitialMousePosition.y; - if (dx * dx + dy * dy < (fJitterPhase ? 16 : 64)) - return; - - // Enter the next phase, if we're still in the first one. - if (fJitterPhase) { - fInitialMousePosition = where; - fJitterPhase = false; - return; - } - - // The mouse has moved far enough for us to take a guess in which - // direction. - int8 horizontal; - int8 vertical; - _ComputeResizeDirection(dx, dy, horizontal, vertical); - - fBehavior._NextState(new (std::nothrow) ResizeBorderState(fBehavior, - where, horizontal, vertical)); - } - -private: - BPoint fInitialMousePosition; - bool fJitterPhase; -}; - - // #pragma mark - DefaultWindowBehaviour @@ -901,12 +839,6 @@ default: break; } - } else if ((buttons & B_TERTIARY_MOUSE_BUTTON) != 0) { - // Middle-click anywhere on the window shall initiate - // humdinger-resize mode. - if (windowModifier && hitRegion != Decorator::REGION_NONE - && (flags & B_NOT_RESIZABLE) == 0) - action = ACTION_HUMDINGER_RESIZE; } } @@ -976,11 +908,6 @@ STRACE_CLICK(("===> ACTION_RESIZE_BORDER\n")); break; - case ACTION_HUMDINGER_RESIZE: - _NextState(new (std::nothrow) HumdingerResizeState(*this, where)); - STRACE_CLICK(("===> ACTION_HUMDINGER_RESIZE\n")); - break; - default: break; } Modified: haiku/trunk/src/servers/app/DefaultWindowBehaviour.h =================================================================== --- haiku/trunk/src/servers/app/DefaultWindowBehaviour.h 2011-01-02 00:23:03 UTC (rev 40059) +++ haiku/trunk/src/servers/app/DefaultWindowBehaviour.h 2011-01-02 00:29:17 UTC (rev 40060) @@ -49,8 +49,7 @@ ACTION_DRAG, ACTION_SLIDE_TAB, ACTION_RESIZE, - ACTION_RESIZE_BORDER, - ACTION_HUMDINGER_RESIZE + ACTION_RESIZE_BORDER }; enum { @@ -72,7 +71,6 @@ struct ResizeBorderState; struct DecoratorButtonState; struct ManageWindowState; - struct HumdingerResizeState; // to keep gcc 2 happy friend struct State; @@ -83,7 +81,6 @@ friend struct ResizeBorderState; friend struct DecoratorButtonState; friend struct ManageWindowState; - friend struct HumdingerResizeState; private: bool _IsWindowModifier(int32 modifiers) const;