vcl/win/window/salframe.cxx |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit 35f41a78a59ec7c7e3e62d953fe145acf720b6b6
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sat Mar 8 21:18:03 2025 +0000
Commit:     Adolfo Jayme Barrientos <fit...@ubuntu.com>
CommitDate: Thu Mar 13 07:33:10 2025 +0100

    Resolves: tdf#160391 test if dark/light mode changed at WM_THEMECHANGED
    
    what docs there are generally mentions WM_SETTINGCHANGE with lParam of
    ImmersiveColorSet but this seems to be too early for UseDarkMode() that
    uses ShouldAppsUseDarkMode to always return the right thing. While
    at WM_THEMECHANGED UseDarkMode() ShouldAppsUseDarkMode seems to be
    more robust.
    
    Change-Id: I0d582b441d0beeadc61d41e6518012fccdcce6e1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182673
    Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    (cherry picked from commit f668fab0441500da85b76ee042309dcfb67d2253)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182676
    Tested-by: Jenkins
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>
    (cherry picked from commit 5ba47684a61d12298fb33cc40df9a4a215db54cd)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182723

diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index c8885a695052..0f3228ace0a8 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -6117,6 +6117,7 @@ static LRESULT CALLBACK SalFrameWndProc( HWND hWnd, UINT 
nMsg, WPARAM wParam, LP
             break;
 
         case WM_THEMECHANGED:
+            UpdateDarkMode(hWnd);
             GetSalData()->mbThemeChanged = true;
             break;
 

Reply via email to