Bug 618683 - Quirk the full screen focus fix landed in bug 608013 to silverlight. r=bsmedberg

This commit is contained in:
Jim Mathies 2011-07-26 14:18:23 -05:00
Родитель 8d9d3b37c3
Коммит 90daaa944f
3 изменённых файлов: 8 добавлений и 1 удалений

Просмотреть файл

@ -2003,7 +2003,9 @@ PluginInstanceChild::AnswerSetPluginFocus()
// when a button click brings up a full screen window. Since we send // when a button click brings up a full screen window. Since we send
// this in response to a WM_SETFOCUS event on our parent, the parent // this in response to a WM_SETFOCUS event on our parent, the parent
// should have focus when we receive this. If not, ignore the call. // should have focus when we receive this. If not, ignore the call.
if (::GetFocus() == mPluginWindowHWND || ::GetFocus() != mPluginParentHWND) if (::GetFocus() == mPluginWindowHWND ||
((GetQuirks() & PluginModuleChild::QUIRK_SILVERLIGHT_FOCUS_CHECK_PARENT) &&
(::GetFocus() != mPluginParentHWND)))
return true; return true;
::SetFocus(mPluginWindowHWND); ::SetFocus(mPluginWindowHWND);
return true; return true;

Просмотреть файл

@ -1910,6 +1910,7 @@ PluginModuleChild::InitQuirksModes(const nsCString& aMimeType)
mQuirks |= QUIRK_SILVERLIGHT_DEFAULT_TRANSPARENT; mQuirks |= QUIRK_SILVERLIGHT_DEFAULT_TRANSPARENT;
#ifdef OS_WIN #ifdef OS_WIN
mQuirks |= QUIRK_WINLESS_TRACKPOPUP_HOOK; mQuirks |= QUIRK_WINLESS_TRACKPOPUP_HOOK;
mQuirks |= QUIRK_SILVERLIGHT_FOCUS_CHECK_PARENT;
#endif #endif
} }

Просмотреть файл

@ -294,6 +294,10 @@ public:
// Win: QuickTime steals focus on SetWindow calls even if it's hidden. // Win: QuickTime steals focus on SetWindow calls even if it's hidden.
// Avoid calling SetWindow in that case. // Avoid calling SetWindow in that case.
QUIRK_QUICKTIME_AVOID_SETWINDOW = 1 << 7, QUIRK_QUICKTIME_AVOID_SETWINDOW = 1 << 7,
// Win: Check to make sure the parent window has focus before calling
// set focus on the child. Addresses a full screen dialog prompt
// problem in Silverlight.
QUIRK_SILVERLIGHT_FOCUS_CHECK_PARENT = 1 << 8,
}; };
int GetQuirks() { return mQuirks; } int GetQuirks() { return mQuirks; }