Loading widget/gtk/WidgetUtilsGtk.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -471,11 +471,14 @@ const nsCString& GetDesktopEnvironmentIdentifier() { } bool IsGnomeDesktopEnvironment() { return FindInReadable("gnome"_ns, GetDesktopEnvironmentIdentifier()); static bool sIsGnome = !!FindInReadable("gnome"_ns, GetDesktopEnvironmentIdentifier()); return sIsGnome; } bool IsKdeDesktopEnvironment() { return GetDesktopEnvironmentIdentifier().EqualsLiteral("kde"); static bool sIsKde = GetDesktopEnvironmentIdentifier().EqualsLiteral("kde"); return sIsKde; } } // namespace mozilla::widget widget/gtk/nsWindow.cpp +13 −9 Original line number Diff line number Diff line Loading @@ -4317,15 +4317,19 @@ Maybe<GdkWindowEdge> nsWindow::CheckResizerEdge( // we still want the resizers there, even when tiled. return true; } if (mDrawInTitlebar) { // If we show top resizers on a (non-PIP) tiled window on GNOME, it // doesn't really work, since the window is "stuck" to the top and // bottom, so don't show them in that case. return !mIsTiled; } // If we're not a PIP window nor drawing to the titlebar, we don't need to // add resizers. if (!mDrawInTitlebar) { return false; } // On KDE, allow for 1 extra pixel at the top of regular windows when // drawing to the titlebar. This matches the native titlebar behavior on // that environment. See bug 1813554. // // Don't do that on GNOME (see bug 1822764). If we wanted to do this on // GNOME we'd need an extra check for mIsTiled, since the window is "stuck" // to the top and bottom. // // Other DEs are untested. return mDrawInTitlebar && IsKdeDesktopEnvironment(); }(); if (!canResize) { Loading Loading
widget/gtk/WidgetUtilsGtk.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -471,11 +471,14 @@ const nsCString& GetDesktopEnvironmentIdentifier() { } bool IsGnomeDesktopEnvironment() { return FindInReadable("gnome"_ns, GetDesktopEnvironmentIdentifier()); static bool sIsGnome = !!FindInReadable("gnome"_ns, GetDesktopEnvironmentIdentifier()); return sIsGnome; } bool IsKdeDesktopEnvironment() { return GetDesktopEnvironmentIdentifier().EqualsLiteral("kde"); static bool sIsKde = GetDesktopEnvironmentIdentifier().EqualsLiteral("kde"); return sIsKde; } } // namespace mozilla::widget
widget/gtk/nsWindow.cpp +13 −9 Original line number Diff line number Diff line Loading @@ -4317,15 +4317,19 @@ Maybe<GdkWindowEdge> nsWindow::CheckResizerEdge( // we still want the resizers there, even when tiled. return true; } if (mDrawInTitlebar) { // If we show top resizers on a (non-PIP) tiled window on GNOME, it // doesn't really work, since the window is "stuck" to the top and // bottom, so don't show them in that case. return !mIsTiled; } // If we're not a PIP window nor drawing to the titlebar, we don't need to // add resizers. if (!mDrawInTitlebar) { return false; } // On KDE, allow for 1 extra pixel at the top of regular windows when // drawing to the titlebar. This matches the native titlebar behavior on // that environment. See bug 1813554. // // Don't do that on GNOME (see bug 1822764). If we wanted to do this on // GNOME we'd need an extra check for mIsTiled, since the window is "stuck" // to the top and bottom. // // Other DEs are untested. return mDrawInTitlebar && IsKdeDesktopEnvironment(); }(); if (!canResize) { Loading