kiplatform: check for null window handle in IsWindowActive().
This commit is contained in:
parent
524ca442f3
commit
dc70df6036
|
@ -49,6 +49,9 @@ void KIPLATFORM::UI::ForceFocus( wxWindow* aWindow )
|
|||
|
||||
bool KIPLATFORM::UI::IsWindowActive( wxWindow* aWindow )
|
||||
{
|
||||
if( !aWindow )
|
||||
return false;
|
||||
|
||||
GtkWindow* window = GTK_WINDOW( aWindow->GetHandle() );
|
||||
|
||||
if( window )
|
||||
|
|
|
@ -75,6 +75,11 @@ void KIPLATFORM::UI::ForceFocus( wxWindow* aWindow )
|
|||
|
||||
bool KIPLATFORM::UI::IsWindowActive( wxWindow* aWindow )
|
||||
{
|
||||
if(! aWindow )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return ( aWindow->GetHWND() == GetForegroundWindow() );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue