void\r
_Control::OnAncestorVisibleStateChanged(const _Control& control)\r
{\r
+ _Control* pControl = GetFocused();\r
+ if (pControl == this)\r
+ {\r
+ SetFocused(false);\r
+ } \r
}\r
\r
void\r
\r
if (visibleState == false)\r
{\r
+ _Window* pTop = GetRootWindow();\r
+ if (pTop)\r
+ {\r
+ if ((this) == pTop->GetFocusedControl())\r
+ {\r
+ pTop->SetFocusedControl(null);\r
+ }\r
+ }\r
+\r
+ _Control* pControl = GetFocused();\r
+ if (pControl == this)\r
+ {\r
+ SetFocused(false);\r
+ }\r
int owneeCount = GetOwneeCount();\r
for (int i = 0; i < owneeCount; ++i)\r
{\r