зеркало из https://github.com/mozilla/gecko-dev.git
Bug 553882 - [OS/2] Plugin-related coding errors. r=wuno
This commit is contained in:
Родитель
79f573a0a6
Коммит
cc7bf936b1
|
@ -308,14 +308,19 @@ static MRESULT EXPENTRY PluginWndProc(HWND hWnd, ULONG msg, MPARAM mp1, MPARAM m
|
||||||
// doesn't receive it, window activation/deactivation won't happen.
|
// doesn't receive it, window activation/deactivation won't happen.
|
||||||
WinDefWindowProc(hWnd, msg, mp1, mp2);
|
WinDefWindowProc(hWnd, msg, mp1, mp2);
|
||||||
|
|
||||||
// If focus is being gained, and the plugin widget neither lost
|
// If focus is being gained, and the plugin widget neither lost nor
|
||||||
// nor gained the focus, then a child just got it from some other
|
// gained the focus, then a child just got it from some other window.
|
||||||
// window. Post a WM_FOCUSCHANGED msg that identifies the child
|
// If that other window was neither a child of the widget nor owned
|
||||||
// as the window losing focus. After nsWindow::ActivatePlugin()
|
// by a child of the widget (e.g. a popup menu), post a WM_FOCUSCHANGED
|
||||||
// activates the plugin, it will restore the focus to the child.
|
// msg that identifies the child as the window losing focus. After
|
||||||
|
// nsWindow:: ActivatePlugin() activates the plugin, it will restore
|
||||||
|
// the focus to the child.
|
||||||
if (SHORT1FROMMP(mp2) && (HWND)mp1 != hWnd) {
|
if (SHORT1FROMMP(mp2) && (HWND)mp1 != hWnd) {
|
||||||
HWND hFocus = WinQueryFocus(HWND_DESKTOP);
|
HWND hFocus = WinQueryFocus(HWND_DESKTOP);
|
||||||
if (hFocus != hWnd) {
|
if (hFocus != hWnd &&
|
||||||
|
WinIsChild(hFocus, hWnd) &&
|
||||||
|
!WinIsChild((HWND)mp1, hWnd) &&
|
||||||
|
!WinIsChild(WinQueryWindow((HWND)mp1, QW_OWNER), hWnd)) {
|
||||||
WinPostMsg(hWnd, WM_FOCUSCHANGED, (MPARAM)hFocus, mp2);
|
WinPostMsg(hWnd, WM_FOCUSCHANGED, (MPARAM)hFocus, mp2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -261,6 +261,13 @@ nsWindow::~nsWindow()
|
||||||
Destroy();
|
Destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Once a plugin window has been destroyed,
|
||||||
|
// its parent, the clipping window, can be destroyed.
|
||||||
|
if (mClipWnd) {
|
||||||
|
WinDestroyWindow(mClipWnd);
|
||||||
|
mClipWnd = 0;
|
||||||
|
}
|
||||||
|
|
||||||
// If it exists, destroy our os2FrameWindow helper object.
|
// If it exists, destroy our os2FrameWindow helper object.
|
||||||
if (mFrame) {
|
if (mFrame) {
|
||||||
delete mFrame;
|
delete mFrame;
|
||||||
|
@ -812,11 +819,11 @@ void nsWindow::Scroll(const nsIntPoint& aDelta,
|
||||||
// but not the part outside it [at least on Windows]. For
|
// but not the part outside it [at least on Windows]. For
|
||||||
// these widgets, we have to invalidate them to get both
|
// these widgets, we have to invalidate them to get both
|
||||||
// parts updated after the scroll.
|
// parts updated after the scroll.
|
||||||
if (w->mBounds.Intersects(affectedRect)) {
|
if (w->mWnd && w->mBounds.Intersects(affectedRect)) {
|
||||||
if (!ClipRegionContainedInRect(configuration.mClipRegion,
|
if (!ClipRegionContainedInRect(configuration.mClipRegion,
|
||||||
affectedRect - (w->mBounds.TopLeft()
|
affectedRect -
|
||||||
+ aDelta)) && mWnd) {
|
(w->mBounds.TopLeft() + aDelta))) {
|
||||||
WinInvalidateRect(mWnd, 0, FALSE);
|
WinInvalidateRect(w->mWnd, 0, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send a WM_VRNDISABLED to the plugin child of this widget.
|
// Send a WM_VRNDISABLED to the plugin child of this widget.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче