Skip to content

Commit

Permalink
Classic Desktop Icons 1.1.1 (#321)
Browse files Browse the repository at this point in the history
Fix conflict with Explorer in SysListView32 mode
  • Loading branch information
aubymori authored Sep 28, 2023
1 parent 897fe1e commit 95e4d64
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions mods/classic-desktop-icons.wh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// @id classic-desktop-icons
// @name Classic Desktop Icons
// @description Enables the classic selection style on desktop icons.
// @version 1.1.0
// @version 1.1.1
// @author aubymori
// @github https://github.com/aubymori
// @include explorer.exe
Expand Down Expand Up @@ -49,7 +49,7 @@ struct
BOOL background;
} settings;

HWND hDesktop;
HWND hDesktop = NULL;
BOOL bSubclassed = FALSE;

#define LABELBG settings.background \
Expand Down Expand Up @@ -146,12 +146,14 @@ HWND WINAPI CreateWindowExW_hook(

/**
* Check that the following criteria is met:
* - The desktop is not already set
* - The window has a parent
* - lpClassName is non-null and not a bad pointer (MANY windows pass a bad pointer to lpClassName)
* - The window's class name is "SysListView32"
* - The window's parent's class name is "SHELLDLL_DefView"
*/
if (hWndParent != NULL
if (hDesktop == NULL
&& hWndParent != NULL
&& lpClassName != NULL
&& TextualClassName(lpClassName))
{
Expand Down

0 comments on commit 95e4d64

Please sign in to comment.