Bug 1667851 [Wayland] Use map_event to create wl_subsurface of MozContainer when it's size is already allocated, r=jhorak

- Recently we use size allocation event to create wl_subsurface of MozContainer. Unfortunately size allocation event
  is not called when a window is opened second time, as its size is already set. Use map_event to create
  wl_subsurface in this case.

Depends on D104550

Differential Revision: https://phabricator.services.mozilla.com/D104551
This commit is contained in:
stransky
2021-02-09 19:41:10 +00:00
parent 00be9a0257
commit 01a743d096
4 changed files with 64 additions and 22 deletions

View File

@@ -1080,6 +1080,7 @@ void nsWindow::AddCSDDecorationSize(int* aWidth, int* aHeight) {
}
}
#ifdef MOZ_WAYLAND
bool nsWindow::GetCSDDecorationOffset(int* aDx, int* aDy) {
if (mSizeState == nsSizeMode_Normal &&
mCSDSupportLevel == GTK_DECORATION_CLIENT && mDrawInTitlebar) {
@@ -1091,6 +1092,7 @@ bool nsWindow::GetCSDDecorationOffset(int* aDx, int* aDy) {
return false;
}
}
#endif
void nsWindow::ApplySizeConstraints(void) {
if (mShell) {