Bug 1667851 [Wayland] Guess subsurface offset from window decorations size, r=jhorak
- Try to set subsurface offset even if we mozcontainer size allocation is not finished. Use window decoration size for it. - Add more logging to mozcontainer code. Depends on D104549 Differential Revision: https://phabricator.services.mozilla.com/D104550
This commit is contained in:
@@ -1072,13 +1072,26 @@ void nsWindow::SetSizeConstraints(const SizeConstraints& aConstraints) {
|
||||
}
|
||||
|
||||
void nsWindow::AddCSDDecorationSize(int* aWidth, int* aHeight) {
|
||||
if (mCSDSupportLevel == GTK_DECORATION_CLIENT && mDrawInTitlebar) {
|
||||
if (mSizeState == nsSizeMode_Normal &&
|
||||
mCSDSupportLevel == GTK_DECORATION_CLIENT && mDrawInTitlebar) {
|
||||
GtkBorder decorationSize = GetCSDDecorationSize(!mIsTopLevel);
|
||||
*aWidth += decorationSize.left + decorationSize.right;
|
||||
*aHeight += decorationSize.top + decorationSize.bottom;
|
||||
}
|
||||
}
|
||||
|
||||
bool nsWindow::GetCSDDecorationOffset(int* aDx, int* aDy) {
|
||||
if (mSizeState == nsSizeMode_Normal &&
|
||||
mCSDSupportLevel == GTK_DECORATION_CLIENT && mDrawInTitlebar) {
|
||||
GtkBorder decorationSize = GetCSDDecorationSize(!mIsTopLevel);
|
||||
*aDx = decorationSize.left;
|
||||
*aDy = decorationSize.top;
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void nsWindow::ApplySizeConstraints(void) {
|
||||
if (mShell) {
|
||||
GdkGeometry geometry;
|
||||
|
||||
Reference in New Issue
Block a user