Bug 284661. Be sure to resize the transparency bitmap if GTK resizes our window interactively. r+sr=blizzard

This commit is contained in:
roc+%cs.cmu.edu 2005-03-31 02:22:01 +00:00
Родитель 5407685688
Коммит 3775730705
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -1374,6 +1374,8 @@ nsWindow::OnSizeAllocate(GtkWidget *aWidget, GtkAllocation *aAllocation)
nsRect rect(aAllocation->x, aAllocation->y,
aAllocation->width, aAllocation->height);
ResizeTransparencyBitmap(rect.width, rect.height);
mBounds.width = rect.width;
mBounds.height = rect.height;
@ -2735,6 +2737,9 @@ nsWindow::ResizeTransparencyBitmap(PRInt32 aNewWidth, PRInt32 aNewHeight)
if (!mTransparencyBitmap)
return;
if (aNewWidth == mBounds.width && aNewHeight == mBounds.height)
return;
PRInt32 newSize = ((aNewWidth+7)/8)*aNewHeight;
gchar* newBits = new gchar[newSize];
if (!newBits) {