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

New commits:
commit f668fab0441500da85b76ee042309dcfb67d2253
Author:     Caolán McNamara <[email protected]>
AuthorDate: Sat Mar 8 21:18:03 2025 +0000
Commit:     Caolán McNamara <[email protected]>
CommitDate: Sat Mar 8 23:00:51 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 <[email protected]>
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index d105d25b82fa..364bc44b7139 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -6036,6 +6036,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