Backing out d3f9af8a4997. a=orange

This commit is contained in:
Mounir Lamouri 2011-02-04 01:41:43 +01:00
Родитель 43c654f285
Коммит a344b8d104
1 изменённых файлов: 1 добавлений и 22 удалений

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

@ -2414,33 +2414,12 @@ nsXULElement::SetTitlebarColor(nscolor aColor, PRBool aActive)
}
}
class SetDrawInTitleBarEvent : public nsRunnable
{
public:
SetDrawInTitleBarEvent(nsIWidget* aWidget, PRBool aState)
: mWidget(aWidget)
, mState(aState)
{}
NS_IMETHOD Run() {
NS_ASSERTION(mWidget, "You shouldn't call this runnable with a null widget!");
mWidget->SetDrawsInTitlebar(mState);
return NS_OK;
}
private:
nsCOMPtr<nsIWidget> mWidget;
PRBool mState;
};
void
nsXULElement::SetDrawsInTitlebar(PRBool aState)
{
nsIWidget* mainWidget = GetWindowWidget();
if (mainWidget) {
nsCOMPtr<nsIRunnable> event = new SetDrawInTitleBarEvent(mainWidget, aState);
NS_DispatchToCurrentThread(event);
mainWidget->SetDrawsInTitlebar(aState);
}
}