Skip to content

Commit

Permalink
TouchInput: fix viewport scrolling when a button has focus
Browse files Browse the repository at this point in the history
we may need to add other (unscrollable) control types too.
  • Loading branch information
bradallred committed May 24, 2013
1 parent cb33766 commit b78b77a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gemrb/plugins/SDLVideo/SDL20Video.cpp
Expand Up @@ -427,7 +427,7 @@ int SDL20VideoDriver::ProcessEvent(const SDL_Event & event)
if (focusCtrl && focusCtrl->ControlType == IE_GUI_TEXTAREA) {
// if we are scrolling a text area we dont want the keyboard in the way
HideSoftKeyboard();
} else if (!focusCtrl) {
} else if (!focusCtrl || focusCtrl->ControlType == IE_GUI_BUTTON) {
// ensure the control we touched becomes focused before attempting to scroll it.
// we cannot safely call ProcessFirstTouch anymore because now we process mouse events
// this can result in a selection box being created
Expand Down

0 comments on commit b78b77a

Please sign in to comment.