Skip to content
Browse files

TouchInput: fix viewport scrolling when a button has focus

we may need to add other (unscrollable) control types too.
  • Loading branch information...
1 parent cb33766 commit b78b77a7ad495425eb0267a6f6d373d6609232f5 @bradallred bradallred committed May 24, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 gemrb/plugins/SDLVideo/SDL20Video.cpp
View
2 gemrb/plugins/SDLVideo/SDL20Video.cpp
@@ -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

0 comments on commit b78b77a

Please sign in to comment.
Something went wrong with that request. Please try again.