Removed generation of scroll event on the X11 button release event as X11 was generating both a pair of press/release events for a single scroll when movement.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14257 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
parent
be13c2202d
commit
d9a6491a43
@ -1476,11 +1476,13 @@ bool GraphicsWindowX11::checkEvents()
|
||||
|
||||
if( ev.xbutton.button == Button4 )
|
||||
{
|
||||
getEventQueue()->mouseScroll(osgGA::GUIEventAdapter::SCROLL_UP, eventTime);
|
||||
//ignore scroll release as X11 is generating button press and release pairs for scroll wheel motion and we only need only event for each scroll action
|
||||
//getEventQueue()->mouseScroll(osgGA::GUIEventAdapter::SCROLL_UP, eventTime);
|
||||
}
|
||||
else if( ev.xbutton.button == Button5)
|
||||
{
|
||||
getEventQueue()->mouseScroll(osgGA::GUIEventAdapter::SCROLL_DOWN, eventTime);
|
||||
//ignore scroll release as X11 is generating button press and release pairs for scroll wheel motion and we only need only event for each scroll action
|
||||
//getEventQueue()->mouseScroll(osgGA::GUIEventAdapter::SCROLL_DOWN, eventTime);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1564,7 +1566,7 @@ bool GraphicsWindowX11::checkEvents()
|
||||
requestRedraw();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return !(getEventQueue()->empty());
|
||||
}
|
||||
|
||||
@ -2173,7 +2175,7 @@ void GraphicsWindowX11::raiseWindow()
|
||||
xev.xclient.data.l[0] = 1;
|
||||
xev.xclient.data.l[1] = stateAbove;
|
||||
xev.xclient.data.l[2] = 0;
|
||||
|
||||
|
||||
XSendEvent(display, RootWindow(display, DefaultScreen(display)),
|
||||
False, SubstructureRedirectMask | SubstructureNotifyMask, &xev);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user