Bug 1816436 - On GTK set decoration when no titlebar and resize handles requested. r=stransky

This avoids drawing border and shadow of a hidden titlebar for the global
webrtc indicator.

Differential Revision: https://phabricator.services.mozilla.com/D169784
This commit is contained in:
Andreas Pehrson 2023-02-16 14:50:24 +00:00
Родитель e821f0c6db
Коммит 0b16ff8d4f
1 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -8718,6 +8718,14 @@ void nsWindow::SetDrawsInTitlebar(bool aState) {
return;
}
if (mWindowType == WindowType::Dialog &&
!bool(mBorderStyle & BorderStyle::Title) &&
!bool(mBorderStyle & BorderStyle::ResizeH)) {
gtk_window_set_decorated(GTK_WINDOW(mShell), !aState);
LOG(" set decoration for dialog with titlebar=no %d", aState);
return;
}
if (mGtkWindowDecoration == GTK_DECORATION_SYSTEM) {
SetWindowDecoration(aState ? BorderStyle::Border : mBorderStyle);
} else if (mGtkWindowDecoration == GTK_DECORATION_CLIENT) {