mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
[OS/2] Bug 508726 - fix plugin clipping, r=pweilbacher
This commit is contained in:
parent
56d3eef776
commit
89750633ff
@ -1997,20 +1997,20 @@ nsWindow::ConfigureChildren(const nsTArray<Configuration>& aConfigurations)
|
|||||||
for (PRUint32 i = 0; i < rects.Length(); ++i)
|
for (PRUint32 i = 0; i < rects.Length(); ++i)
|
||||||
r.UnionRect(r, rects[i]);
|
r.UnionRect(r, rects[i]);
|
||||||
|
|
||||||
// resize the child; mBounds.x/y contain the child's correct origin;
|
// resize the widget to the dimensions of the bounding rectangle;
|
||||||
// the sum of r.x/y + r.width/height produces the actual clipped
|
// the sum of mBounds.x/y (the widget's unclipped origin) and
|
||||||
// width/height this window should have - it's only smaller than
|
// r.x/y (the clipped rect's offset from that origin) yields the
|
||||||
// normal when part or all the window is scrolled off the right
|
// resized widget's correct position
|
||||||
// or bottom side of the parent
|
w->Resize(configuration.mBounds.x + r.x, configuration.mBounds.y + r.y,
|
||||||
w->Resize(configuration.mBounds.x, configuration.mBounds.y,
|
r.width, r.height, PR_FALSE);
|
||||||
r.width + r.x, r.height + r.y, PR_FALSE);
|
|
||||||
|
|
||||||
// some plugins may shrink their window when the Mozilla widget window
|
// reposition the widget's child (typically, a frame created by
|
||||||
// shrinks, then fail to reinflate when the widget window reinflates;
|
// the plugin) so the correct side(s) get clipped; also, ensure
|
||||||
// this ensures the plugin's window is always at its full size and is
|
// the widget's child is at its full size - some plugins may shrink
|
||||||
// positioned so the correct part of the child will be clipped
|
// their window when widget shrinks
|
||||||
HWND hwnd = WinQueryWindow( w->mWnd, QW_TOP);
|
HWND hwnd = WinQueryWindow( w->mWnd, QW_TOP);
|
||||||
WinSetWindowPos(hwnd, 0, 0, r.height + r.y - configuration.mBounds.height,
|
WinSetWindowPos(hwnd, 0,
|
||||||
|
-r.x, r.height + r.y - configuration.mBounds.height,
|
||||||
configuration.mBounds.width, configuration.mBounds.height,
|
configuration.mBounds.width, configuration.mBounds.height,
|
||||||
SWP_MOVE | SWP_SIZE);
|
SWP_MOVE | SWP_SIZE);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user