diff --git a/src/ui/cuidragable.cpp b/src/ui/cuidragable.cpp index 33215054b..b4c2d7f8a 100644 --- a/src/ui/cuidragable.cpp +++ b/src/ui/cuidragable.cpp @@ -14,7 +14,7 @@ cUIDragable::~cUIDragable() { } Uint32 cUIDragable::OnMouseDown( const eeVector2i& Pos, const Uint32 Flags ) { - if ( !( cInput::instance()->LastPressTrigger() & mDragButton ) && ( Flags & mDragButton ) && DragEnable() && !Dragging() ) { + if ( !( cUIManager::instance()->LastPressTrigger() & mDragButton ) && ( Flags & mDragButton ) && DragEnable() && !Dragging() ) { Dragging( true ); mDragPoint = Pos; } diff --git a/src/ui/cuimanager.cpp b/src/ui/cuimanager.cpp index 49f82a3e3..7b6ec51c7 100644 --- a/src/ui/cuimanager.cpp +++ b/src/ui/cuimanager.cpp @@ -211,4 +211,8 @@ const Uint32& cUIManager::PressTrigger() const { return mKM->PressTrigger(); } +const Uint32& cUIManager::LastPressTrigger() const { + return mKM->LastPressTrigger(); +} + }} diff --git a/src/ui/cuimanager.hpp b/src/ui/cuimanager.hpp index cbd371c2c..296fdd3ea 100644 --- a/src/ui/cuimanager.hpp +++ b/src/ui/cuimanager.hpp @@ -43,6 +43,8 @@ class EE_API cUIManager : public tSingleton { cInput * GetInput() const; const Uint32& PressTrigger() const; + + const Uint32& LastPressTrigger() const; protected: cEngine * mEE; cInput * mKM; diff --git a/src/ui/cuiwindow.cpp b/src/ui/cuiwindow.cpp index 3a47d1017..9999d5f33 100644 --- a/src/ui/cuiwindow.cpp +++ b/src/ui/cuiwindow.cpp @@ -283,9 +283,12 @@ Uint32 cUIWindow::OnMessage( const cUIMessage * Msg ) { return cUIComplexControl::OnMessage( Msg ); } - void cUIWindow::DoResize ( const cUIMessage * Msg ) { - if ( !( mWinFlags & UI_WIN_RESIZEABLE ) || !( Msg->Flags() & EE_BUTTON_LMASK ) || RESIZE_NONE != mResizeType ) + if ( !( mWinFlags & UI_WIN_RESIZEABLE ) || + !( Msg->Flags() & EE_BUTTON_LMASK ) || + RESIZE_NONE != mResizeType || + ( cUIManager::instance()->LastPressTrigger() & EE_BUTTON_LMASK ) + ) return; DecideResizeType( Msg->Sender() );