Skip to content

Commit

Permalink
Don't send WINDOW_KEYBOARD_CAPTURE_LOST if the window didn't lost the…
Browse files Browse the repository at this point in the history
… capture
  • Loading branch information
Xottab-DUTY committed Jan 18, 2025
1 parent dd0fc52 commit 6b77aed
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/xrUICore/Windows/UIWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -374,11 +374,14 @@ void CUIWindow::SetKeyboardCapture(CUIWindow* pChildWindow, bool capture_status)

if (capture_status)
{
//оповестить дочернее окно о потере фокуса клавиатуры
if (NULL != m_pKeyboardCapturer)
m_pKeyboardCapturer->SendMessage(this, WINDOW_KEYBOARD_CAPTURE_LOST);
if (m_pKeyboardCapturer != pChildWindow)
{
//оповестить дочернее окно о потере фокуса клавиатуры
if (m_pKeyboardCapturer)
m_pKeyboardCapturer->SendMessage(this, WINDOW_KEYBOARD_CAPTURE_LOST);

m_pKeyboardCapturer = pChildWindow;
m_pKeyboardCapturer = pChildWindow;
}
}
else
m_pKeyboardCapturer = NULL;
Expand Down

0 comments on commit 6b77aed

Please sign in to comment.