// Testing for !activated_shortcut here could in theory be removed if we decided that activating a remote shortcut altered one of the g.NavDisableXXX flag.
// Mouse (we need a fallback in case the mouse becomes invalid after being used)
// Mouse (we need a fallback in case the mouse becomes invalid after being used)
// The +1.0f offset when stored by OpenPopupEx() allows reopening this or another popup (same or another mouse button) while not moving the mouse, it is pretty standard.
// The +1.0f offset when stored by OpenPopupEx() allows reopening this or another popup (same or another mouse button) while not moving the mouse, it is pretty standard.
returnImTrunc(ImClamp(pos,viewport->Pos,viewport->Pos+viewport->Size));// ImTrunc() is important because non-integer mouse position application in backend might be lossy and result in undesirable non-zero delta.
returnImTrunc(ImClamp(pos,viewport->Pos,viewport->Pos+viewport->Size));// ImTrunc() is important because non-integer mouse position application in backend might be lossy and result in undesirable non-zero delta.