Changeset 255342 in webkit


Ignore:
Timestamp:
Jan 29, 2020, 1:49:33 AM (5 years ago)
Author:
Carlos Garcia Campos
Message:

[GTK] Should use light theme unless website declares support for dark themes in color-schemes property
https://bugs.webkit.org/show_bug.cgi?id=197947

Reviewed by Michael Catanzaro.

.:

Do not define HAVE_OS_DARK_MODE_SUPPORT.

  • Source/cmake/OptionsGTK.cmake:

Source/WebCore:

  • dom/Document.cpp:

(WebCore::Document::useDarkAppearance const): Remove HAVE(OS_DARK_MODE_SUPPORT) because ENABLE(DARK_MODE_CSS)
guards should be enough.

  • page/FrameView.cpp:

(WebCore::FrameView::updateBackgroundRecursively): Revert changes made in r244635.

  • page/Page.cpp:

(WebCore::Page::effectiveAppearanceDidChange): Use ENABLE(DARK_MODE_CSS) instead of HAVE(OS_DARK_MODE_SUPPORT).
(WebCore::Page::useDarkAppearance const): Ditto.

  • rendering/RenderThemeGtk.cpp:

(WebCore::RenderThemeGtk::systemColor const): Revert changes made in r244635.

  • rendering/RenderThemeGtk.h:
  • testing/InternalSettings.cpp:

(WebCore::InternalSettings::setUseDarkAppearanceInternal): Revert changes made in r244635.

Source/WebKit:

Handle the theme changes in the UI process, converting dark variant to the light one before sending the theme
name to the web process. The web process is still notified when a dark theme is in use, so that if website
prefers a dark color scheme it will be used, but the gtk theme that will be used for controls styling will
always be light.

  • Shared/WebPageCreationParameters.cpp:

(WebKit::WebPageCreationParameters::encode const): Encode themeName.
(WebKit::WebPageCreationParameters::decode): Decode themeName.

  • Shared/WebPageCreationParameters.h:
  • UIProcess/API/gtk/PageClientImpl.cpp:

(WebKit::PageClientImpl::themeName const): Get the theme name that should be used by the web process.

  • UIProcess/API/gtk/PageClientImpl.h:
  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(themeChanged): Call WebPageProxy::themeDidChange().
(applicationPreferDarkThemeChanged):
(webkitWebViewBaseSetToplevelOnScreenWindow): Use a different callback for the theme name change.

  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.cpp:
  • UIProcess/WebPageProxy.h:
  • UIProcess/gtk/WebPageProxyGtk.cpp:

(WebKit::WebPageProxy::themeDidChange): Send ThemeDidChange message to the web process with the theme name to use.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::WebPage): Initialize the theme name.
(WebKit::WebPage::effectiveAppearanceDidChange): Use this now for GTK port too.

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in: Add ThemeDidChange message.
  • WebProcess/WebPage/gtk/WebPageGtk.cpp:

(WebKit::WebPage::themeDidChange): Set the theme given name in gtk settings.

  • WebProcess/gtk/WebProcessMainGtk.cpp:

Source/WTF:

Do not define HAVE_OS_DARK_MODE_SUPPORT for the GTK port.

  • wtf/PlatformHave.h:

LayoutTests:

Rebaseline several tests for the new behavior.

  • platform/gtk/css-dark-mode/color-scheme-priority-expected.txt: Added.
  • platform/gtk/css-dark-mode/default-colors-expected.txt:
  • platform/gtk/css-dark-mode/prefers-color-scheme-expected.txt:
Location:
trunk
Files:
1 added
29 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r255273 r255342  
     12020-01-28  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK] Should use light theme unless website declares support for dark themes in color-schemes property
     4        https://bugs.webkit.org/show_bug.cgi?id=197947
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        Do not define HAVE_OS_DARK_MODE_SUPPORT.
     9
     10        * Source/cmake/OptionsGTK.cmake:
     11
    1122020-01-28  Don Olmstead  <don.olmstead@sony.com>
    213
  • trunk/LayoutTests/ChangeLog

    r255341 r255342  
     12020-01-28  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK] Should use light theme unless website declares support for dark themes in color-schemes property
     4        https://bugs.webkit.org/show_bug.cgi?id=197947
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        Rebaseline several tests for the new behavior.
     9
     10        * platform/gtk/css-dark-mode/color-scheme-priority-expected.txt: Added.
     11        * platform/gtk/css-dark-mode/default-colors-expected.txt:
     12        * platform/gtk/css-dark-mode/prefers-color-scheme-expected.txt:
     13
    1142020-01-29  Megan Gardner  <megan_gardner@apple.com>
    215
  • trunk/LayoutTests/platform/gtk/css-dark-mode/default-colors-expected.txt

    r246676 r255342  
    33PASS View base background color is white, since the page isn't in dark mode
    44PASS Set dark appearance
    5 FAIL Body text color is black, since the page hasn't set a supported color scheme assert_equals: expected "rgb(0, 0, 0)" but got "rgb(255, 255, 255)"
     5PASS Body text color is black, since the page hasn't set a supported color scheme
    66PASS View base background color is white, since the page hasn't set a supported color scheme
    77PASS Set prefers-color-schemes: light dark on the body
    8 PASS Body text color is white
    9 FAIL View base background color is a dark grey assert_equals: expected "rgb(30, 30, 30)" but got "rgb(51, 57, 59)"
     8FAIL Body text color is white assert_equals: expected "rgb(255, 255, 255)" but got "rgb(0, 0, 0)"
     9FAIL View base background color is a dark grey assert_equals: expected "rgb(30, 30, 30)" but got "rgb(255, 255, 255)"
    1010
  • trunk/LayoutTests/platform/gtk/css-dark-mode/prefers-color-scheme-expected.txt

    r244766 r255342  
    33PASS Element colors are correct in light color scheme with boolean context query
    44PASS Dark color scheme enabled
    5 FAIL Element colors are correct in dark color scheme assert_equals: expected "rgb(0, 0, 0)" but got "rgb(255, 255, 255)"
    6 FAIL Element colors are correct in dark color scheme with boolean context query assert_equals: expected "rgb(0, 0, 0)" but got "rgb(255, 255, 255)"
     5PASS Element colors are correct in dark color scheme
     6PASS Element colors are correct in dark color scheme with boolean context query
    77
  • trunk/Source/WTF/ChangeLog

    r255255 r255342  
     12020-01-28  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK] Should use light theme unless website declares support for dark themes in color-schemes property
     4        https://bugs.webkit.org/show_bug.cgi?id=197947
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        Do not define HAVE_OS_DARK_MODE_SUPPORT for the GTK port.
     9
     10        * wtf/PlatformHave.h:
     11
    1122020-01-28  Jonathan Bedard  <jbedard@apple.com>
    213
  • trunk/Source/WTF/wtf/PlatformHave.h

    r255255 r255342  
    374374#endif
    375375
    376 #if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400) || PLATFORM(IOS) || PLATFORM(MACCATALYST) || PLATFORM(GTK)
     376#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400) || PLATFORM(IOS) || PLATFORM(MACCATALYST)
    377377#define HAVE_OS_DARK_MODE_SUPPORT 1
    378378#endif
  • trunk/Source/WebCore/ChangeLog

    r255340 r255342  
     12020-01-28  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK] Should use light theme unless website declares support for dark themes in color-schemes property
     4        https://bugs.webkit.org/show_bug.cgi?id=197947
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        * dom/Document.cpp:
     9        (WebCore::Document::useDarkAppearance const): Remove HAVE(OS_DARK_MODE_SUPPORT) because ENABLE(DARK_MODE_CSS)
     10        guards should be enough.
     11        * page/FrameView.cpp:
     12        (WebCore::FrameView::updateBackgroundRecursively): Revert changes made in r244635.
     13        * page/Page.cpp:
     14        (WebCore::Page::effectiveAppearanceDidChange): Use ENABLE(DARK_MODE_CSS) instead of HAVE(OS_DARK_MODE_SUPPORT).
     15        (WebCore::Page::useDarkAppearance const): Ditto.
     16        * rendering/RenderThemeGtk.cpp:
     17        (WebCore::RenderThemeGtk::systemColor const): Revert changes made in r244635.
     18        * rendering/RenderThemeGtk.h:
     19        * testing/InternalSettings.cpp:
     20        (WebCore::InternalSettings::setUseDarkAppearanceInternal): Revert changes made in r244635.
     21
    1222020-01-29  Sunny He  <sunny_he@apple.com>
    223
  • trunk/Source/WebCore/dom/Document.cpp

    r255260 r255342  
    70947094bool Document::useDarkAppearance(const RenderStyle* style) const
    70957095{
    7096 #if HAVE(OS_DARK_MODE_SUPPORT)
    70977096#if ENABLE(DARK_MODE_CSS)
    70987097    OptionSet<ColorScheme> colorScheme;
     
    71227121    if (colorScheme.contains(ColorScheme::Dark))
    71237122        return pageUsesDarkAppearance;
    7124 #endif
    7125 #else
    7126     UNUSED_PARAM(style);
    71277123#endif
    71287124
  • trunk/Source/WebCore/page/FrameView.cpp

    r255226 r255342  
    30323032{
    30333033#if HAVE(OS_DARK_MODE_SUPPORT)
    3034 #if PLATFORM(COCOA)
    3035     static const auto cssValueControlBackground = CSSValueAppleSystemControlBackground;
    3036 #else
    3037     static const auto cssValueControlBackground = CSSValueWindow;
    3038 #endif
    3039     Color baseBackgroundColor = backgroundColor.valueOr(RenderTheme::singleton().systemColor(cssValueControlBackground, styleColorOptions()));
     3034    Color baseBackgroundColor = backgroundColor.valueOr(RenderTheme::singleton().systemColor(CSSValueAppleSystemControlBackground, styleColorOptions()));
    30403035#else
    30413036    Color baseBackgroundColor = backgroundColor.valueOr(Color::white);
  • trunk/Source/WebCore/page/Page.cpp

    r255338 r255342  
    27342734void Page::effectiveAppearanceDidChange(bool useDarkAppearance, bool useElevatedUserInterfaceLevel)
    27352735{
    2736 #if HAVE(OS_DARK_MODE_SUPPORT)
     2736#if ENABLE(DARK_MODE_CSS)
    27372737    if (m_useDarkAppearance == useDarkAppearance && m_useElevatedUserInterfaceLevel == useElevatedUserInterfaceLevel)
    27382738        return;
     
    27582758bool Page::useDarkAppearance() const
    27592759{
    2760 #if HAVE(OS_DARK_MODE_SUPPORT)
     2760#if ENABLE(DARK_MODE_CSS)
    27612761    FrameView* view = mainFrame().view();
    27622762    if (!view || !equalLettersIgnoringASCIICase(view->mediaType(), "screen"))
  • trunk/Source/WebCore/rendering/RenderThemeGtk.cpp

    r252308 r255342  
    125125#endif
    126126
    127 static void themeChangedCallback()
    128 {
    129     Page::updateStyleForAllPagesAfterGlobalChangeInEnvironment();
    130 }
    131 
    132 RenderThemeGtk::RenderThemeGtk()
    133 {
    134     static bool themeMonitorInitialized = false;
    135     if (!themeMonitorInitialized) {
    136         GtkSettings* settings = gtk_settings_get_default();
    137         g_signal_connect(settings, "notify::gtk-theme-name", G_CALLBACK(themeChangedCallback), nullptr);
    138         g_signal_connect(settings, "notify::gtk-color-scheme", G_CALLBACK(themeChangedCallback), nullptr);
    139         themeMonitorInitialized = true;
    140     }
    141 }
    142 
    143127enum RenderThemePart {
    144128    Entry,
     
    952936    case CSSValueGraytext:
    953937        return styleColor(Entry, GTK_STATE_FLAG_INSENSITIVE, StyleColorForeground);
    954     case CSSValueWebkitControlBackground:
    955         return styleColor(Entry, GTK_STATE_FLAG_ACTIVE, StyleColorBackground);
    956     case CSSValueWindow: {
    957         // Only get window color from the theme in dark mode.
    958         gboolean preferDarkTheme = FALSE;
    959         if (auto* settings = gtk_settings_get_default())
    960             g_object_get(settings, "gtk-application-prefer-dark-theme", &preferDarkTheme, nullptr);
    961         if (preferDarkTheme)
    962             return styleColor(Window, GTK_STATE_FLAG_ACTIVE, StyleColorBackground);
    963         break;
    964     }
    965938    default:
    966939        break;
  • trunk/Source/WebCore/rendering/RenderThemeGtk.h

    r252308 r255342  
    105105
    106106private:
    107     RenderThemeGtk();
    108107    virtual ~RenderThemeGtk();
    109108
  • trunk/Source/WebCore/testing/InternalSettings.cpp

    r255241 r255342  
    5252#endif
    5353
    54 #if PLATFORM(GTK)
    55 #include <gtk/gtk.h>
    56 #endif
    57 
    5854namespace WebCore {
    5955
     
    544540void InternalSettings::setUseDarkAppearanceInternal(bool useDarkAppearance)
    545541{
    546 #if PLATFORM(GTK)
    547     // GTK doesn't allow to change the theme from the web process, but tests need to do it, so
    548     // we do it here only for tests.
    549     if (auto* settings = gtk_settings_get_default()) {
    550         gboolean preferDarkTheme;
    551         g_object_get(settings, "gtk-application-prefer-dark-theme", &preferDarkTheme, nullptr);
    552         if (preferDarkTheme != useDarkAppearance)
    553             g_object_set(settings, "gtk-application-prefer-dark-theme", useDarkAppearance, nullptr);
    554     }
    555 #endif
    556542    ASSERT(m_page);
    557543    m_page->effectiveAppearanceDidChange(useDarkAppearance, m_page->useElevatedUserInterfaceLevel());
  • trunk/Source/WebKit/ChangeLog

    r255339 r255342  
     12020-01-28  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK] Should use light theme unless website declares support for dark themes in color-schemes property
     4        https://bugs.webkit.org/show_bug.cgi?id=197947
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        Handle the theme changes in the UI process, converting dark variant to the light one before sending the theme
     9        name to the web process. The web process is still notified when a dark theme is in use, so that if website
     10        prefers a dark color scheme it will be used, but the gtk theme that will be used for controls styling will
     11        always be light.
     12
     13        * Shared/WebPageCreationParameters.cpp:
     14        (WebKit::WebPageCreationParameters::encode const): Encode themeName.
     15        (WebKit::WebPageCreationParameters::decode): Decode themeName.
     16        * Shared/WebPageCreationParameters.h:
     17        * UIProcess/API/gtk/PageClientImpl.cpp:
     18        (WebKit::PageClientImpl::themeName const): Get the theme name that should be used by the web process.
     19        * UIProcess/API/gtk/PageClientImpl.h:
     20        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
     21        (themeChanged): Call WebPageProxy::themeDidChange().
     22        (applicationPreferDarkThemeChanged):
     23        (webkitWebViewBaseSetToplevelOnScreenWindow): Use a different callback for the theme name change.
     24        * UIProcess/PageClient.h:
     25        * UIProcess/WebPageProxy.cpp:
     26        * UIProcess/WebPageProxy.h:
     27        * UIProcess/gtk/WebPageProxyGtk.cpp:
     28        (WebKit::WebPageProxy::themeDidChange): Send ThemeDidChange message to the web process with the theme name to use.
     29        * WebProcess/WebPage/WebPage.cpp:
     30        (WebKit::WebPage::WebPage): Initialize the theme name.
     31        (WebKit::WebPage::effectiveAppearanceDidChange): Use this now for GTK port too.
     32        * WebProcess/WebPage/WebPage.h:
     33        * WebProcess/WebPage/WebPage.messages.in: Add ThemeDidChange message.
     34        * WebProcess/WebPage/gtk/WebPageGtk.cpp:
     35        (WebKit::WebPage::themeDidChange): Set the theme given name in gtk settings.
     36        * WebProcess/gtk/WebProcessMainGtk.cpp:
     37
    1382020-01-28  Timothy Horton  <timothy_horton@apple.com>
    239
  • trunk/Source/WebKit/Shared/WebPageCreationParameters.cpp

    r255127 r255342  
    143143    encoder << shouldCaptureVideoInGPUProcess;
    144144    encoder << shouldCaptureDisplayInUIProcess;
     145
     146#if PLATFORM(GTK)
     147    encoder << themeName;
     148#endif
    145149}
    146150
     
    439443        return WTF::nullopt;
    440444
     445#if PLATFORM(GTK)
     446    if (!decoder.decode(parameters.themeName))
     447        return WTF::nullopt;
     448#endif
     449
    441450    return parameters;
    442451}
  • trunk/Source/WebKit/Shared/WebPageCreationParameters.h

    r255127 r255342  
    214214    bool shouldCaptureVideoInGPUProcess { false };
    215215    bool shouldCaptureDisplayInUIProcess { false };
     216
     217#if PLATFORM(GTK)
     218    String themeName;
     219#endif
    216220};
    217221
  • trunk/Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp

    r253749 r255342  
    584584}
    585585
     586String PageClientImpl::themeName() const
     587{
     588    if (auto* themeNameEnv = g_getenv("GTK_THEME")) {
     589        String name = String::fromUTF8(themeNameEnv);
     590        if (name.endsWith("-dark") || name.endsWith(":dark"))
     591            return name.substring(0, name.length() - 5);
     592        return name;
     593    }
     594
     595    GUniqueOutPtr<char> themeNameSetting;
     596    g_object_get(gtk_widget_get_settings(m_viewWidget), "gtk-theme-name", &themeNameSetting.outPtr(), nullptr);
     597    String name = String::fromUTF8(themeNameSetting.get());
     598    if (name.endsWith("-dark"))
     599        return name.substring(0, name.length() - 5);
     600    return name;
     601}
     602
    586603} // namespace WebKit
  • trunk/Source/WebKit/UIProcess/API/gtk/PageClientImpl.h

    r255322 r255342  
    173173    void didChangeWebPageID() const override;
    174174
     175    String themeName() const override;
     176
    175177    // Members of PageClientImpl class
    176178    GtkWidget* m_viewWidget;
  • trunk/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp

    r254822 r255342  
    296296static void themeChanged(WebKitWebViewBase* webViewBase)
    297297{
     298    webViewBase->priv->pageProxy->themeDidChange();
     299}
     300
     301static void applicationPreferDarkThemeChanged(WebKitWebViewBase* webViewBase)
     302{
    298303    webViewBase->priv->pageProxy->effectiveAppearanceDidChange();
    299304}
     
    375380        g_signal_connect_swapped(settings, "notify::gtk-theme-name", G_CALLBACK(themeChanged), webViewBase);
    376381    priv->applicationPreferDarkThemeID =
    377         g_signal_connect_swapped(settings, "notify::gtk-application-prefer-dark-theme", G_CALLBACK(themeChanged), webViewBase);
     382        g_signal_connect_swapped(settings, "notify::gtk-application-prefer-dark-theme", G_CALLBACK(applicationPreferDarkThemeChanged), webViewBase);
    378383
    379384    if (gtk_widget_get_realized(GTK_WIDGET(window)))
  • trunk/Source/WebKit/UIProcess/PageClient.h

    r255322 r255342  
    517517
    518518    virtual void didChangeWebPageID() const { }
     519
     520#if PLATFORM(GTK)
     521    virtual String themeName() const = 0;
     522#endif
    519523};
    520524
  • trunk/Source/WebKit/UIProcess/WebPageProxy.cpp

    r255322 r255342  
    76427642    parameters.shouldCaptureDisplayInUIProcess = m_process->processPool().configuration().shouldCaptureDisplayInUIProcess();
    76437643
     7644#if PLATFORM(GTK)
     7645    parameters.themeName = pageClient().themeName();
     7646#endif
     7647
    76447648    return parameters;
    76457649}
  • trunk/Source/WebKit/UIProcess/WebPageProxy.h

    r255322 r255342  
    870870    PlatformViewWidget viewWidget();
    871871    bool makeGLContextCurrent();
     872    void themeDidChange();
    872873#endif
    873874
  • trunk/Source/WebKit/UIProcess/gtk/WebPageProxyGtk.cpp

    r254121 r255342  
    185185}
    186186
     187void WebPageProxy::themeDidChange()
     188{
     189    if (!hasRunningProcess())
     190        return;
     191
     192    send(Messages::WebPage::ThemeDidChange(pageClient().themeName()));
     193    effectiveAppearanceDidChange();
     194}
     195
    187196} // namespace WebKit
  • trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp

    r255127 r255342  
    594594    setPaginationLineGridEnabled(parameters.paginationLineGridEnabled);
    595595
     596#if PLATFORM(GTK)
     597    themeDidChange(WTFMove(parameters.themeName));
     598#endif
     599
    596600    effectiveAppearanceDidChange(parameters.useDarkAppearance, parameters.useElevatedUserInterfaceLevel);
    597601
     
    47104714#endif
    47114715
    4712 #if !PLATFORM(GTK)
    47134716void WebPage::effectiveAppearanceDidChange(bool useDarkAppearance, bool useElevatedUserInterfaceLevel)
    47144717{
    47154718    corePage()->effectiveAppearanceDidChange(useDarkAppearance, useElevatedUserInterfaceLevel);
    47164719}
    4717 #endif
    47184720
    47194721void WebPage::freezeLayerTreeDueToSwipeAnimation()
  • trunk/Source/WebKit/WebProcess/WebPage/WebPage.h

    r255127 r255342  
    797797
    798798    void getCenterForZoomGesture(const WebCore::IntPoint& centerInViewCoordinates, CompletionHandler<void(WebCore::IntPoint&&)>&&);
     799
     800    void themeDidChange(String&&);
    799801#endif
    800802
     
    20452047
    20462048    String m_overriddenMediaType;
     2049
     2050#if PLATFORM(GTK)
     2051    String m_themeName;
     2052#endif
    20472053};
    20482054
  • trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in

    r255127 r255342  
    507507    EffectiveAppearanceDidChange(bool useDarkAppearance, bool useElevatedUserInterfaceLevel);
    508508
     509#if PLATFORM(GTK)
     510    ThemeDidChange(String themeName)
     511#endif
     512
    509513#if PLATFORM(COCOA)
    510514    RequestActiveNowPlayingSessionInfo(WebKit::CallbackID callbackID)
  • trunk/Source/WebKit/WebProcess/WebPage/gtk/WebPageGtk.cpp

    r254122 r255342  
    158158}
    159159
    160 void WebPage::effectiveAppearanceDidChange(bool useDarkAppearance, bool useInactiveAppearance)
     160void WebPage::themeDidChange(String&& themeName)
    161161{
    162     if (auto* settings = gtk_settings_get_default())
    163         g_object_set(settings, "gtk-application-prefer-dark-theme", useDarkAppearance, nullptr);
    164     corePage()->effectiveAppearanceDidChange(useDarkAppearance, useInactiveAppearance);
     162    if (m_themeName == themeName)
     163        return;
     164
     165    m_themeName = WTFMove(themeName);
     166    g_object_set(gtk_settings_get_default(), "gtk-theme-name", m_themeName.utf8().data(), nullptr);
     167    Page::updateStyleForAllPagesAfterGlobalChangeInEnvironment();
    165168}
    166169
  • trunk/Source/WebKit/WebProcess/gtk/WebProcessMainGtk.cpp

    r255067 r255342  
    5454        XInitThreads();
    5555#endif
     56
     57        // Ignore the GTK_THEME environment variable, the theme is always set by the UI process now.
     58        g_unsetenv("GTK_THEME");
     59
    5660        gtk_init(nullptr, nullptr);
    5761
  • trunk/Source/cmake/OptionsGTK.cmake

    r255241 r255342  
    211211
    212212SET_AND_EXPOSE_TO_BUILD(HAVE_GTK_UNIX_PRINTING ${GTKUnixPrint_FOUND})
    213 SET_AND_EXPOSE_TO_BUILD(HAVE_OS_DARK_MODE_SUPPORT 1)
    214213
    215214if (USE_WPE_RENDERER)
Note: See TracChangeset for help on using the changeset viewer.