fix dup wheel events on x11

This commit is contained in:
Eduardo Bart 2012-01-19 17:08:15 -02:00
parent 490eae7814
commit 380a13ef83
1 changed files with 10 additions and 6 deletions

View File

@ -672,14 +672,18 @@ void X11Window::poll()
m_inputEvent.mouseButton = Fw::MouseMidButton; m_inputEvent.mouseButton = Fw::MouseMidButton;
break; break;
case Button4: case Button4:
if(event.type == ButtonPress) {
m_inputEvent.type = Fw::MouseWheelInputEvent; m_inputEvent.type = Fw::MouseWheelInputEvent;
m_inputEvent.mouseButton = Fw::MouseMidButton; m_inputEvent.mouseButton = Fw::MouseMidButton;
m_inputEvent.wheelDirection = Fw::MouseWheelUp; m_inputEvent.wheelDirection = Fw::MouseWheelUp;
}
break; break;
case Button5: case Button5:
if(event.type == ButtonPress) {
m_inputEvent.type = Fw::MouseWheelInputEvent; m_inputEvent.type = Fw::MouseWheelInputEvent;
m_inputEvent.mouseButton = Fw::MouseMidButton; m_inputEvent.mouseButton = Fw::MouseMidButton;
m_inputEvent.wheelDirection = Fw::MouseWheelDown; m_inputEvent.wheelDirection = Fw::MouseWheelDown;
}
break; break;
default: default:
m_inputEvent.type = Fw::NoInputEvent; m_inputEvent.type = Fw::NoInputEvent;