mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
bug 110804 gdk exits during print preview
move the test for invalid size (off screen pixels) to point after last time sizes are set r=yokoyama@netscape.com, sr=waterson@netscape.com
This commit is contained in:
parent
56f7fc2275
commit
f706ed0c13
@ -395,8 +395,6 @@ nsX11AlphaBlend::GetBackground(Display *aDisplay, int aScreen,
|
||||
}
|
||||
PRInt32 copy_width = aWidth - x_skip;
|
||||
PRInt32 copy_height = aHeight - y_skip;
|
||||
if ((copy_width<=0) || (copy_height<=0))
|
||||
return nsnull; // nothing visible
|
||||
|
||||
Window root;
|
||||
int win_x, win_y;
|
||||
@ -426,6 +424,8 @@ nsX11AlphaBlend::GetBackground(Display *aDisplay, int aScreen,
|
||||
copy_height = MIN(copy_height, (int)root_win_height - (aY+y_skip));
|
||||
any_offscreen = PR_TRUE;
|
||||
}
|
||||
if ((copy_width<=0) || (copy_height<=0))
|
||||
return nsnull; // nothing visible
|
||||
|
||||
// get the background image
|
||||
// if any part is off screen XGetImage will fail, so we XCreateImage
|
||||
|
Loading…
Reference in New Issue
Block a user