GUI/knob animation: fire release binding over PUI
Fire the release bindings for active pick callbacks, even for a ‘handled’ mouse release. This means knobs, etc will fire their release binding if the mouse is over a PUI dialog. https://sourceforge.net/p/flightgear/codetickets/2347/
This commit is contained in:
parent
8a1109160b
commit
06b026a218
2 changed files with 19 additions and 9 deletions
src
|
@ -575,6 +575,12 @@ void FGMouseInput::doMouseClick (int b, int updown, int x, int y, bool mainWindo
|
||||||
|
|
||||||
callbacks.pop_front();
|
callbacks.pop_front();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ea->getHandled()) {
|
||||||
|
// for https://sourceforge.net/p/flightgear/codetickets/2347/
|
||||||
|
// we cleared the active picks, but don't do further processing
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mode.pass_through) {
|
if (mode.pass_through) {
|
||||||
|
|
|
@ -123,15 +123,19 @@ bool FGEventHandler::handle(const osgGA::GUIEventAdapter& ea,
|
||||||
// Event handlers seem to be called even if the according event has already
|
// Event handlers seem to be called even if the according event has already
|
||||||
// been handled. Already handled events shouldn't be handled multiple times
|
// been handled. Already handled events shouldn't be handled multiple times
|
||||||
// so we need to exit here manually.
|
// so we need to exit here manually.
|
||||||
if( ea.getHandled()
|
if (ea.getHandled()
|
||||||
// Let mouse move events pass to correctly handle mouse cursor hide
|
// Let mouse move events pass to correctly handle mouse cursor hide
|
||||||
// timeout while moving just on the canvas gui.
|
// timeout while moving just on the canvas gui.
|
||||||
// TODO We should clean up the whole mouse input and make hide
|
// TODO We should clean up the whole mouse input and make hide
|
||||||
// timeout independent of the event handler which consumed the
|
// timeout independent of the event handler which consumed the
|
||||||
// event.
|
// event.
|
||||||
&& ea.getEventType() != osgGA::GUIEventAdapter::MOVE
|
|
||||||
&& ea.getEventType() != osgGA::GUIEventAdapter::DRAG )
|
// if we see a release, still process for active pick callbacks
|
||||||
return false;
|
// https://sourceforge.net/p/flightgear/codetickets/2347/
|
||||||
|
|
||||||
|
&& ea.getEventType() != osgGA::GUIEventAdapter::MOVE && ea.getEventType() != osgGA::GUIEventAdapter::DRAG && ea.getEventType() != osgGA::GUIEventAdapter::RELEASE) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
int x = 0;
|
int x = 0;
|
||||||
int y = 0;
|
int y = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue