mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Bug 626813 - Hide plugins in background tabs to avoid trackpad drivers wanting to scroll them. r=jmathies
This commit is contained in:
parent
74e7a459bf
commit
074c3dcbd6
@ -7291,15 +7291,17 @@ nsWindow::SetWindowClipRegion(const nsTArray<nsIntRect>& aRects,
|
||||
}
|
||||
}
|
||||
|
||||
// If a plugin is not visibile, especially if it is in a background tab,
|
||||
// If a plugin is not visible, especially if it is in a background tab,
|
||||
// it should not be able to steal keyboard focus. This code checks whether
|
||||
// the region that the plugin is being clipped to is NULLREGION. If it is,
|
||||
// the plugin window gets disabled.
|
||||
if(mWindowType == eWindowType_plugin) {
|
||||
if(NULLREGION == ::CombineRgn(dest, dest, dest, RGN_OR)) {
|
||||
::ShowWindow(mWnd, SW_HIDE);
|
||||
::EnableWindow(mWnd, FALSE);
|
||||
} else {
|
||||
::EnableWindow(mWnd, TRUE);
|
||||
::ShowWindow(mWnd, SW_SHOW);
|
||||
}
|
||||
}
|
||||
if (!::SetWindowRgn(mWnd, dest, TRUE)) {
|
||||
|
Loading…
Reference in New Issue
Block a user