summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/input/inputEventHandler.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/input/inputEventHandler.h b/src/input/inputEventHandler.h
index 3879b80..11e2f4e 100644
--- a/src/input/inputEventHandler.h
+++ b/src/input/inputEventHandler.h
@@ -102,8 +102,10 @@ template<IMPLICIT_TYPE_LIST_PARAMS(Trait)>
BEGIN_POLICY_CLASS(Require)
{
static const bool areSystemRequirementsFulfilled =
- NextPolicy::areSystemRequirementsFulfilled ||
- detail::Matches<AllOf<IMPLICIT_TYPE_LIST_ARGS(Trait)>, detail::SystemTraits>::value;
+ (NextPolicy::areSystemRequirementsFulfilled
+ && !NextPolicy::areSystemRequirementsVacuouslyFulfilled)
+ || detail::Matches<AllOf<IMPLICIT_TYPE_LIST_ARGS(Trait)>, detail::SystemTraits>::value;
+ static const bool areSystemRequirementsVacuouslyFulfilled = false;
}
END_POLICY_CLASS
@@ -158,6 +160,9 @@ struct InputEventHandlerPolicyBase
// everywhere
static const bool areSystemRequirementsFulfilled = true;
+ // We need this to implement proper logical OR
+ static const bool areSystemRequirementsVacuouslyFulfilled = true;
+
// Generate an error when no match policy is given.
bool isApplicable(InputEvent const&)
{