Author: tfaber
Date: Wed Feb 25 13:24:13 2015
New Revision: 66451
URL:
http://svn.reactos.org/svn/reactos?rev=66451&view=rev
Log:
[DESK.CPL]
- Don't convert the selected wallpaper if it is already a bitmap. Patch by Ricardo
Hanke.
CORE-8802 #resolve
Added:
trunk/reactos/dll/cpl/desk/guid.c (with props)
Modified:
trunk/reactos/dll/cpl/desk/CMakeLists.txt
trunk/reactos/dll/cpl/desk/background.c
Modified: trunk/reactos/dll/cpl/desk/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/CMakeLists.tx…
==============================================================================
--- trunk/reactos/dll/cpl/desk/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/desk/CMakeLists.txt [iso-8859-1] Wed Feb 25 13:24:13 2015
@@ -25,6 +25,7 @@
add_library(desk SHARED
${SOURCE}
+ guid.c
desk.rc
${CMAKE_CURRENT_BINARY_DIR}/desk.def)
Modified: trunk/reactos/dll/cpl/desk/background.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/background.c?…
==============================================================================
--- trunk/reactos/dll/cpl/desk/background.c [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/desk/background.c [iso-8859-1] Wed Feb 25 13:24:13 2015
@@ -913,6 +913,7 @@
TCHAR szWallpaper[MAX_PATH];
GpImage *image;
CLSID encoderClsid;
+ GUID guidFormat;
size_t length = 0;
GpStatus status;
@@ -953,6 +954,15 @@
if (!image)
{
RegCloseKey(regKey);
+ return;
+ }
+
+ GdipGetImageRawFormat(image, &guidFormat);
+ if (IsEqualGUID(&guidFormat, &ImageFormatBMP))
+ {
+ GdipDisposeImage(image);
+ RegCloseKey(regKey);
+ SystemParametersInfo(SPI_SETDESKWALLPAPER, 0,
pData->backgroundItems[pData->backgroundSelection].szFilename, SPIF_UPDATEINIFILE);
return;
}
Added: trunk/reactos/dll/cpl/desk/guid.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/guid.c?rev=66…
==============================================================================
--- trunk/reactos/dll/cpl/desk/guid.c (added)
+++ trunk/reactos/dll/cpl/desk/guid.c [iso-8859-1] Wed Feb 25 13:24:13 2015
@@ -0,0 +1,14 @@
+/* DO NOT USE THE PRECOMPILED HEADER FOR THIS FILE! */
+
+#define WIN32_NO_STATuS
+#define _INC_WINDOWS
+#define COM_NO_WINDOWS_H
+
+#include <windef.h>
+#include <winbase.h>
+#include <wingdi.h>
+#include <objbase.h>
+#include <initguid.h>
+#include <gdiplus.h>
+
+/* NO CODE HERE, THIS IS JUST REQUIRED FOR THE GUID DEFINITIONS */
Propchange: trunk/reactos/dll/cpl/desk/guid.c
------------------------------------------------------------------------------
svn:eol-style = native