Cut down on unnecessary update events
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@51785 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2871,7 +2871,7 @@ void wxWindowGTK::OnInternalIdle()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wxUpdateUIEvent::CanUpdate(this) && IsShown())
|
if (wxUpdateUIEvent::CanUpdate(this) && IsShownOnScreen())
|
||||||
UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
|
UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -2958,7 +2958,7 @@ void wxWindowGTK::OnInternalIdle()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wxUpdateUIEvent::CanUpdate(this) && IsShown())
|
if (wxUpdateUIEvent::CanUpdate(this) && IsShownOnScreen())
|
||||||
UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
|
UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -2894,7 +2894,7 @@ void wxWindowMac::OnInternalIdle()
|
|||||||
{
|
{
|
||||||
// This calls the UI-update mechanism (querying windows for
|
// This calls the UI-update mechanism (querying windows for
|
||||||
// menu/toolbar/control state information)
|
// menu/toolbar/control state information)
|
||||||
if (wxUpdateUIEvent::CanUpdate(this) && IsShown())
|
if (wxUpdateUIEvent::CanUpdate(this) && IsShownOnScreen())
|
||||||
UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
|
UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1638,7 +1638,7 @@ void wxWindow::OnInternalIdle()
|
|||||||
{
|
{
|
||||||
// This calls the UI-update mechanism (querying windows for
|
// This calls the UI-update mechanism (querying windows for
|
||||||
// menu/toolbar/control state information)
|
// menu/toolbar/control state information)
|
||||||
if (wxUpdateUIEvent::CanUpdate(this) && IsShown())
|
if (wxUpdateUIEvent::CanUpdate(this) && IsShownOnScreen())
|
||||||
UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
|
UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1479,7 +1479,7 @@ void wxWindowMSW::OnInternalIdle()
|
|||||||
}
|
}
|
||||||
#endif // !HAVE_TRACKMOUSEEVENT
|
#endif // !HAVE_TRACKMOUSEEVENT
|
||||||
|
|
||||||
if (wxUpdateUIEvent::CanUpdate(this) && IsShown())
|
if (wxUpdateUIEvent::CanUpdate(this) && IsShownOnScreen())
|
||||||
UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
|
UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1574,7 +1574,7 @@ void wxWindowMSW::Thaw()
|
|||||||
{
|
{
|
||||||
SendSetRedraw(GetHwnd(), true);
|
SendSetRedraw(GetHwnd(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// we need to refresh everything or otherwise the invalidated area
|
// we need to refresh everything or otherwise the invalidated area
|
||||||
// is not going to be repainted
|
// is not going to be repainted
|
||||||
Refresh();
|
Refresh();
|
||||||
|
@@ -1308,7 +1308,7 @@ void wxWindowX11::OnInternalIdle()
|
|||||||
|
|
||||||
// This calls the UI-update mechanism (querying windows for
|
// This calls the UI-update mechanism (querying windows for
|
||||||
// menu/toolbar/control state information)
|
// menu/toolbar/control state information)
|
||||||
if (wxUpdateUIEvent::CanUpdate((wxWindow*) this) && IsShown())
|
if (wxUpdateUIEvent::CanUpdate((wxWindow*) this) && IsShownOnScreen())
|
||||||
UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
|
UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
|
||||||
|
|
||||||
// Set the input focus if couldn't do it before
|
// Set the input focus if couldn't do it before
|
||||||
|
Reference in New Issue
Block a user