Restrict the 'fake mouse movement' workaround to where it's actually required (Fixes #3978)

new-script-api
scrawl 7 years ago
parent 9b91ea5d34
commit 09e93319f5

@ -366,8 +366,6 @@ namespace MWInput
mInputManager->setMouseVisible(MWBase::Environment::get().getWindowManager()->getCursorVisible());
mInputManager->capture(disableEvents);
// inject some fake mouse movement to force updating MyGUI's widget states
MyGUI::InputManager::getInstance().injectMouseMove( int(mGuiCursorX), int(mGuiCursorY), mMouseWheel);
if (mControlsDisabled)
{
@ -764,6 +762,8 @@ namespace MWInput
mMouseWheel = int(arg.z);
MyGUI::InputManager::getInstance().injectMouseMove( int(mGuiCursorX), int(mGuiCursorY), mMouseWheel);
// FIXME: inject twice to force updating focused widget states (tooltips) resulting from changing the viewport by scroll wheel
MyGUI::InputManager::getInstance().injectMouseMove( int(mGuiCursorX), int(mGuiCursorY), mMouseWheel);
}
if (mMouseLookEnabled && !mControlsDisabled)

Loading…
Cancel
Save