Skip to content

Commit 16b032b

Browse files
author
Rafal Harabien
committed
[DESK]
* Fix a bug when after changing color scheme Apply and then OK is clicked. Background color was restored to the previous one in this case. Spotted by Gabriel Ilardi. svn path=/trunk/; revision=51531
1 parent aea7bfc commit 16b032b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

reactos/dll/cpl/desk/appearance.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,14 @@ AppearancePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
115115
hwndDlg, AdvAppearanceDlgProc, (LPARAM)g) == IDOK)
116116
{
117117
PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
118-
g->Theme = g->ThemeAdv;
119-
g_GlobalData.desktop_color = g->Theme.crColor[COLOR_DESKTOP];
120118
g->bHasChanged = TRUE;
119+
g->Theme = g->ThemeAdv;
121120
g->ThemeId = -1; /* Customized */
121+
g_GlobalData.desktop_color = g->Theme.crColor[COLOR_DESKTOP];
122+
122123
SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_COLORSCHEME, CB_SETCURSEL, (WPARAM)-1, 0);
123124
SetDlgItemText(hwndDlg, IDC_APPEARANCE_COLORSCHEME, TEXT(""));
125+
124126
SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_PREVIEW, PVM_UPDATETHEME, 0, (LPARAM)&g->Theme);
125127
}
126128
break;
@@ -136,6 +138,7 @@ AppearancePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
136138
{
137139
g->Theme = Theme;
138140
g->ThemeId = ThemeId;
141+
g_GlobalData.desktop_color = g->Theme.crColor[COLOR_DESKTOP];
139142
SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_PREVIEW, PVM_UPDATETHEME, 0, (LPARAM)&Theme);
140143
}
141144
}

0 commit comments

Comments
 (0)