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)
|
inline void Canvas::SetKeyboardOwner(std::size_t canvasIndex)
|
||||||
|
{
|
||||||
|
if (m_keyboardOwner != canvasIndex)
|
||||||
{
|
{
|
||||||
if (m_keyboardOwner != InvalidCanvasIndex)
|
if (m_keyboardOwner != InvalidCanvasIndex)
|
||||||
m_widgetBoxes[m_keyboardOwner].widget->OnFocusLost();
|
m_widgetBoxes[m_keyboardOwner].widget->OnFocusLost();
|
||||||
|
|
@ -86,4 +88,5 @@ namespace Ndk
|
||||||
if (m_keyboardOwner != InvalidCanvasIndex)
|
if (m_keyboardOwner != InvalidCanvasIndex)
|
||||||
m_widgetBoxes[m_keyboardOwner].widget->OnFocusReceived();
|
m_widgetBoxes[m_keyboardOwner].widget->OnFocusReceived();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue