Fixed logic error in mousemanager.cpp