зеркало из https://github.com/mozilla/gecko-dev.git
fix wrong placement of windows on linux r=alecf
This commit is contained in:
Родитель
1388ba58b5
Коммит
7e740cf4c6
|
@ -2332,21 +2332,15 @@ NS_IMETHODIMP nsWindow::Move(PRInt32 aX, PRInt32 aY)
|
||||||
if (mIsToplevel && mShell)
|
if (mIsToplevel && mShell)
|
||||||
{
|
{
|
||||||
// do it the way it should be done period.
|
// do it the way it should be done period.
|
||||||
if (!mParent)
|
if (mParent && mWindowType == eWindowType_popup) {
|
||||||
{
|
|
||||||
// XXX don't move the window if it is toplevel window.. this keeps us from moving the
|
|
||||||
// window's title bar off the screen in some Window managers
|
|
||||||
// if (mWindowType != eWindowType_toplevel)
|
|
||||||
gtk_widget_set_uposition(mShell, aX, aY);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// *VERY* stupid hack to make gfx combo boxes work
|
// *VERY* stupid hack to make gfx combo boxes work
|
||||||
nsRect oldrect, newrect;
|
nsRect oldrect, newrect;
|
||||||
oldrect.x = aX;
|
oldrect.x = aX;
|
||||||
oldrect.y = aY;
|
oldrect.y = aY;
|
||||||
mParent->WidgetToScreen(oldrect, newrect);
|
mParent->WidgetToScreen(oldrect, newrect);
|
||||||
gtk_widget_set_uposition(mShell, newrect.x, newrect.y);
|
gtk_widget_set_uposition(mShell, newrect.x, newrect.y);
|
||||||
|
} else {
|
||||||
|
gtk_widget_set_uposition(mShell, aX, aY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (mSuperWin)
|
else if (mSuperWin)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче