Fixed a bug causing layer-switch events to noe be handled by GAL.

This commit is contained in:
Andrew Zonenberg 2015-07-13 17:18:29 +02:00 committed by Maciej Suminski
commit 6289f5bcf4
1 changed files with 9 additions and 3 deletions

View File

@ -338,9 +338,6 @@ public:
if( !( m_category & aEvent.m_category ) ) if( !( m_category & aEvent.m_category ) )
return false; return false;
if( !( m_actions & aEvent.m_actions ) )
return false;
if( m_category == TC_COMMAND || m_category == TC_MESSAGE ) if( m_category == TC_COMMAND || m_category == TC_MESSAGE )
{ {
if( (bool) m_commandStr && (bool) aEvent.m_commandStr ) if( (bool) m_commandStr && (bool) aEvent.m_commandStr )
@ -350,6 +347,15 @@ public:
return *m_commandId == *aEvent.m_commandId; return *m_commandId == *aEvent.m_commandId;
} }
// BUGFIX: TA_ANY should match EVERYTHING, even TA_NONE (for TC_MESSAGE)
if( m_actions == TA_ANY && aEvent.m_actions == TA_NONE && aEvent.m_category == TC_MESSAGE )
return true;
// BUGFIX: This check must happen after the TC_COMMAND check because otherwise events of
// the form { TC_COMMAND, TA_NONE } will be incorrectly skipped
if( !( m_actions & aEvent.m_actions ) )
return false;
return true; return true;
} }