зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1863409 [Wayland] Count CSD decoration size borders for CSD windows with system titlebar off r=emilio
Right now we count CSD decoration size borders only for CSD windows with system titlebar on which is incorrect as such windows also have CSD borders on Wayland. Differential Revision: https://phabricator.services.mozilla.com/D193787
This commit is contained in:
Родитель
b723d6a79a
Коммит
0a55cd6b63
|
@ -889,9 +889,17 @@ bool nsWindow::DrawsToCSDTitlebar() const {
|
|||
}
|
||||
|
||||
void nsWindow::AddCSDDecorationSize(int* aWidth, int* aHeight) {
|
||||
if (!DrawsToCSDTitlebar()) {
|
||||
if (mSizeMode != nsSizeMode_Normal ||
|
||||
mGtkWindowDecoration != GTK_DECORATION_CLIENT) {
|
||||
return;
|
||||
}
|
||||
|
||||
// We add decoration borders if titlebar is off or on Wayland
|
||||
// where CSD is always used.
|
||||
if (!mDrawInTitlebar && !GdkIsWaylandDisplay()) {
|
||||
return;
|
||||
}
|
||||
|
||||
GtkBorder decorationSize = GetCSDDecorationSize(IsPopup());
|
||||
*aWidth += decorationSize.left + decorationSize.right;
|
||||
*aHeight += decorationSize.top + decorationSize.bottom;
|
||||
|
|
Загрузка…
Ссылка в новой задаче