Use AppFocusChanged().
This commit is contained in:
@@ -106,12 +106,8 @@ static bool ChangeAppPri()
|
|||||||
|
|
||||||
static void CheckFocus()
|
static void CheckFocus()
|
||||||
{
|
{
|
||||||
static bool bHasFocus = true;
|
if( !HOOKS->AppFocusChanged() )
|
||||||
|
|
||||||
bool bHasFocusNow = HOOKS->AppHasFocus();
|
|
||||||
if( bHasFocus == bHasFocusNow )
|
|
||||||
return;
|
return;
|
||||||
bHasFocus = bHasFocusNow;
|
|
||||||
|
|
||||||
/* If we lose focus, we may lose input events, especially key releases. */
|
/* If we lose focus, we may lose input events, especially key releases. */
|
||||||
INPUTFILTER->Reset();
|
INPUTFILTER->Reset();
|
||||||
|
|||||||
Reference in New Issue
Block a user