Rebase against 486f33ee64121d0331fb3e943791ec42bd98ef51.

This commit is contained in:
Elizabeth Figura
2025-10-15 16:46:31 -05:00
parent ec458fc7ae
commit 7c674a599b
4 changed files with 15 additions and 60 deletions

View File

@@ -1,42 +0,0 @@
From 4b890399fb10c9ed8cf4d17db4373a170b3f0b66 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 15 Aug 2015 21:12:00 +0200
Subject: [PATCH] shell32: Set SFGAO_HASSUBFOLDER correctly for normal
shellfolders.
---
dlls/shell32/shlfolder.c | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/dlls/shell32/shlfolder.c b/dlls/shell32/shlfolder.c
index f288b7f7ab1..18499190fee 100644
--- a/dlls/shell32/shlfolder.c
+++ b/dlls/shell32/shlfolder.c
@@ -450,7 +450,23 @@ HRESULT SHELL32_GetItemAttributes (IShellFolder2 *psf, LPCITEMIDLIST pidl, LPDWO
SFGAO_CANRENAME | SFGAO_CANLINK | SFGAO_CANMOVE | SFGAO_CANCOPY;
if (file_attr & FILE_ATTRIBUTE_DIRECTORY)
- *pdwAttributes |= (SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_FILESYSANCESTOR | SFGAO_STORAGEANCESTOR | SFGAO_STORAGE);
+ {
+ IEnumIDList *enum_list;
+ IShellFolder *child;
+
+ *pdwAttributes |= (SFGAO_FOLDER | SFGAO_FILESYSANCESTOR | SFGAO_STORAGEANCESTOR | SFGAO_STORAGE);
+
+ if (SUCCEEDED(IShellFolder2_BindToObject(psf, pidl, NULL, &IID_IShellFolder, (void **)&child)))
+ {
+ if (IShellFolder_EnumObjects(child, NULL, SHCONTF_FOLDERS|SHCONTF_INCLUDEHIDDEN, &enum_list) == S_OK)
+ {
+ if (IEnumIDList_Skip(enum_list, 1) != S_OK)
+ *pdwAttributes &= ~SFGAO_HASSUBFOLDER;
+ IEnumIDList_Release(enum_list);
+ }
+ IShellFolder_Release(child);
+ }
+ }
else
{
*pdwAttributes &= ~(SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_FILESYSANCESTOR | SFGAO_STORAGEANCESTOR | SFGAO_STORAGE);
--
2.33.0

View File

@@ -1 +0,0 @@
Fixes: [24851] Only set SFGAO_HASSUBFOLDER when there are really subfolders

View File

@@ -1,18 +1,18 @@
From c30eb624c99b01d7b6e1c3e21cf40869cd3075a8 Mon Sep 17 00:00:00 2001
From b7e91a68996298890b45a006a3888b18f23d0708 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Sat, 24 Jan 2015 05:12:49 +0100
Subject: [PATCH] winex11: Fix handling of window attributes for WS_EX_LAYERED
| WS_EX_COMPOSITED.
---
dlls/winex11.drv/window.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
dlls/winex11.drv/window.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index a733d566d4f..4099d2b9879 100644
index e9edc0022c8..f3cbb858798 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -448,7 +448,7 @@ static unsigned long get_mwm_decorations_for_style( DWORD style, DWORD ex_style
@@ -457,7 +457,7 @@ static unsigned long get_mwm_decorations_for_style( DWORD style, DWORD ex_style
unsigned long ret = 0;
if (ex_style & WS_EX_TOOLWINDOW) return 0;
@@ -21,17 +21,15 @@ index a733d566d4f..4099d2b9879 100644
if ((style & WS_CAPTION) == WS_CAPTION)
{
@@ -3080,8 +3080,9 @@ void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, HWND owner_hint, UIN
BOOL needs_map = TRUE;
@@ -3116,7 +3116,7 @@ void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, HWND owner_hint, UIN
debugstr_window_rects(new_rects), new_style, swp_flags );
/* layered windows are mapped only once their attributes are set */
- if (ex_style & WS_EX_LAYERED && !data->layered && !IsRectEmpty( &new_rects->window )) new_style &= ~WS_VISIBLE;
+ if ((ex_style & (WS_EX_LAYERED | WS_EX_COMPOSITED)) == WS_EX_LAYERED && !data->layered && !IsRectEmpty( &new_rects->window )) new_style &= ~WS_VISIBLE;
XFlush( gdi_display ); /* make sure painting is done before we move the window */
/* layered windows are mapped only once their attributes are set */
- if (NtUserGetWindowLongW( hwnd, GWL_EXSTYLE ) & WS_EX_LAYERED)
+ if ((NtUserGetWindowLongW( hwnd, GWL_EXSTYLE ) & (WS_EX_LAYERED | WS_EX_COMPOSITED)) == WS_EX_LAYERED)
needs_map = data->layered || IsRectEmpty( &new_rects->window );
+
release_win_data( data );
if (needs_icon) fetch_icon_data( hwnd, 0, 0 );
if (needs_map) map_window( hwnd, new_style, activate );
--
2.47.2
2.51.0

View File

@@ -1 +1 @@
2827471c57299793d8e0868679184f8d762a5309
486f33ee64121d0331fb3e943791ec42bd98ef51