Bug 1666176 Don't use gfxPlatformGtk in nsWindow::GetSystemCSDSupportLevel, r=jhorak

Differential Revision: https://phabricator.services.mozilla.com/D90814
This commit is contained in:
stransky 2020-09-21 07:01:22 +00:00
parent ea223460f7
commit 105067831e

View File

@ -7741,8 +7741,9 @@ nsWindow::CSDSupportLevel nsWindow::GetSystemCSDSupportLevel(bool aIsPopup) {
return sCSDSupportLevel;
}
// We use CSD titlebar mode on Wayland only
if (gfxPlatformGtk::GetPlatform()->IsWaylandDisplay()) {
// nsWindow::GetSystemCSDSupportLevel can be called from various threads
// so we can't use gfxPlatformGtk here.
if (!GDK_IS_X11_DISPLAY(gdk_display_get_default())) {
sCSDSupportLevel = CSD_SUPPORT_CLIENT;
return sCSDSupportLevel;
}