Bug 503879, followup to move NS_SYSCOLORCHANGED code into a separate method

This commit is contained in:
Neil Deakin 2011-11-21 12:53:20 -05:00
parent 355968e2b9
commit 989807a354
2 changed files with 18 additions and 11 deletions

View File

@ -4668,17 +4668,7 @@ bool nsWindow::ProcessMessage(UINT msg, WPARAM &wParam, LPARAM &lParam,
break;
case WM_SYSCOLORCHANGE:
if (mWindowType == eWindowType_invisible) {
::EnumThreadWindows(GetCurrentThreadId(), nsWindow::BroadcastMsg, msg);
}
else {
// Note: This is sent for child windows as well as top-level windows.
// The Win32 toolkit normally only sends these events to top-level windows.
// But we cycle through all of the childwindows and send it to them as well
// so all presentations get notified properly.
// See nsWindow::GlobalMsgWindowProc.
DispatchStandardEvent(NS_SYSCOLORCHANGED);
}
OnSysColorChanged();
break;
case WM_NOTIFY:
@ -8001,6 +7991,22 @@ nsWindow::HasBogusPopupsDropShadowOnMultiMonitor() {
return !!sHasBogusPopupsDropShadowOnMultiMonitor;
}
void
nsWindow::OnSysColorChanged()
{
if (mWindowType == eWindowType_invisible) {
::EnumThreadWindows(GetCurrentThreadId(), nsWindow::BroadcastMsg, WM_SYSCOLORCHANGE);
}
else {
// Note: This is sent for child windows as well as top-level windows.
// The Win32 toolkit normally only sends these events to top-level windows.
// But we cycle through all of the childwindows and send it to them as well
// so all presentations get notified properly.
// See nsWindow::GlobalMsgWindowProc.
DispatchStandardEvent(NS_SYSCOLORCHANGED);
}
}
/**************************************************************
**************************************************************
**

View File

@ -443,6 +443,7 @@ protected:
LPARAM aLParam,
LRESULT *aRetValue);
void OnWindowPosChanging(LPWINDOWPOS& info);
void OnSysColorChanged();
/**
* Function that registers when the user has been active (used for detecting