[OS/2] Bug 418645: content of mplayer plugin spills over into content area when scrolling, r=mkaply

This commit is contained in:
mozilla@weilbacher.org 2008-04-14 11:42:51 -07:00
parent e6daab3c80
commit 10ee622678
2 changed files with 29 additions and 0 deletions

View File

@ -2272,6 +2272,32 @@ NS_METHOD nsWindow::SetColorMap(nsColorMap *aColorMap)
return NS_ERROR_NOT_IMPLEMENTED;
}
//-------------------------------------------------------------------------
//
// Notify a child window of a coming move by sending it a WM_VRNDISABLED
// message. Only do that if it's not one of ours like e.g. plugin windows.
//
//-------------------------------------------------------------------------
BOOL nsWindow::NotifyForeignChildWindows(HWND aWnd)
{
HENUM hEnum = WinBeginEnumWindows(aWnd);
HWND hwnd;
while ((hwnd = WinGetNextWindow(hEnum)) != NULLHANDLE) {
char className[19];
WinQueryClassName(hwnd, 19, className);
if (strcmp(className, WindowClass()) != 0) {
// This window is not one of our windows so notify it (and wait for
// the call to return so that the plugin has time to react)
WinSendMsg(hwnd, WM_VRNDISABLED, MPVOID, MPVOID);
} else {
// Recurse starting at this Mozilla child window.
NotifyForeignChildWindows(hwnd);
}
}
return WinEndEnumWindows(hEnum);
}
//-------------------------------------------------------------------------
//
// Scroll the bits of a window
@ -2298,6 +2324,7 @@ NS_METHOD nsWindow::Scroll(PRInt32 aDx, PRInt32 aDy, nsRect *aClipRect)
HPS hps = 0;
CheckDragStatus(ACTION_SCROLL, &hps);
NotifyForeignChildWindows(mWnd);
WinScrollWindow( mWnd, aDx, -aDy, aClipRect ? &rcl : 0, 0, 0,
0, SW_SCROLLCHILDREN | SW_INVALIDATERGN);
Update();

View File

@ -333,6 +333,8 @@ protected:
HBITMAP CreateTransparencyMask(PRInt32 format, PRUint8* aImageData,
PRUint32 aWidth, PRUint32 aHeight);
BOOL NotifyForeignChildWindows(HWND aWnd);
// Enumeration of the methods which are accessible on the PM thread
enum {
CREATE,