Sdk/Canvas: Prevent OnFocusLost/OnFocusReceived when using SetFocus on an already focused widget
This commit is contained in:
parent
1601849a00
commit
d98b7a8f4f
|
|
@ -77,6 +77,8 @@ namespace Ndk
|
|||
}
|
||||
|
||||
inline void Canvas::SetKeyboardOwner(std::size_t canvasIndex)
|
||||
{
|
||||
if (m_keyboardOwner != canvasIndex)
|
||||
{
|
||||
if (m_keyboardOwner != InvalidCanvasIndex)
|
||||
m_widgetBoxes[m_keyboardOwner].widget->OnFocusLost();
|
||||
|
|
@ -87,3 +89,4 @@ namespace Ndk
|
|||
m_widgetBoxes[m_keyboardOwner].widget->OnFocusReceived();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue