mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-30 04:13:33 +00:00
[desk.cpl]
- Apply a wallpaper and desktop background only when they have changed - Fixes changing desktop background to the color defined by the theme svn path=/trunk/; revision=54189
This commit is contained in:
@@ -40,6 +40,9 @@ typedef struct
|
||||
|
||||
typedef struct _DATA
|
||||
{
|
||||
BOOL bWallpaperChanged;
|
||||
BOOL bClrBackgroundChanged;
|
||||
|
||||
BackgroundItem backgroundItems[MAX_BACKGROUNDS];
|
||||
|
||||
PDIBITMAP pWallpaperBitmap;
|
||||
@@ -365,6 +368,7 @@ OnColorButton(HWND hwndDlg, PDATA pData)
|
||||
{
|
||||
/* Save selected color to var */
|
||||
g_GlobalData.desktop_color = cc.rgbResult;
|
||||
pData->bClrBackgroundChanged = TRUE;
|
||||
|
||||
/* Apply button will be activated */
|
||||
PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
|
||||
@@ -510,6 +514,8 @@ ListViewItemChanged(HWND hwndDlg, PDATA pData, int itemIndex)
|
||||
return;
|
||||
}
|
||||
|
||||
pData->bWallpaperChanged = TRUE;
|
||||
|
||||
InvalidateRect(GetDlgItem(hwndDlg, IDC_BACKGROUND_PREVIEW),
|
||||
NULL, TRUE);
|
||||
|
||||
@@ -802,8 +808,10 @@ BackgroundPageProc(HWND hwndDlg,
|
||||
switch(lpnm->code)
|
||||
{
|
||||
case PSN_APPLY:
|
||||
SetWallpaper(pData);
|
||||
SetDesktopBackColor(hwndDlg, pData);
|
||||
if(pData->bWallpaperChanged)
|
||||
SetWallpaper(pData);
|
||||
if(pData->bClrBackgroundChanged)
|
||||
SetDesktopBackColor(hwndDlg, pData);
|
||||
return TRUE;
|
||||
|
||||
case LVN_ITEMCHANGED:
|
||||
|
||||
Reference in New Issue
Block a user