зеркало из https://github.com/mozilla/gecko-dev.git
Backing out d3f9af8a4997. a=orange
This commit is contained in:
Родитель
43c654f285
Коммит
a344b8d104
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче