https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5c505d9a9b804a5464f34…
commit 5c505d9a9b804a5464f348ebc09265f28d4b75b4
Author: Doug Lyons <douglyons(a)douglyons.com>
AuthorDate: Sat Feb 22 23:31:50 2025 -0600
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Wed Mar 12 12:18:53 2025 +0100
[NTUSER] Handle window update region larger than the current window in clip region (#7731)
CORE-18206 CORE-18799 CORE-19371
Fixes infinite loop of:
err: Message WM_PAINT count 1 Internal Paint Set? FALSE
The symptom appears in the following scenario (as reported in CORE-18799):
A program (game) runs at a small resolution (e.g. 640 x 480), but the
game window gets invalidated at a larger size (e.g. 1152 x 864 screen
resolution) before switching to the smaller (640 x 480) size.
Because of this, the window's update region is larger than the current
window so only the 640 x 480 region gets validated leaving the remaining
region invalid. This causes the recurring WM_PAINT messages because there
is no way to invalidate the remaining area.
---
win32ss/user/ntuser/winpos.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/win32ss/user/ntuser/winpos.c b/win32ss/user/ntuser/winpos.c
index d06730112be..da895726b7a 100644
--- a/win32ss/user/ntuser/winpos.c
+++ b/win32ss/user/ntuser/winpos.c
@@ -2037,7 +2037,17 @@ co_WinPosSetWindowPos(
}
else if(VisAfter)
{
- REGION_bOffsetRgn(VisAfter, -Window->rcWindow.left, -Window->rcWindow.top);
+ /* Clip existing update region to new window size */
+ if (Window->hrgnUpdate != NULL)
+ {
+ PREGION RgnUpdate = REGION_LockRgn(Window->hrgnUpdate);
+ if (RgnUpdate)
+ {
+ RgnType = IntGdiCombineRgn(RgnUpdate, RgnUpdate, VisAfter, RGN_AND);
+ REGION_UnlockRgn(RgnUpdate);
+ }
+ }
+ REGION_bOffsetRgn(VisAfter, -Window->rcWindow.left, -Window->rcWindow.top);
}
/*
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b45debb93aa6a5da07b3d…
commit b45debb93aa6a5da07b3d5563194e3d700cfffef
Author: Miguel Almeida <miguelbarraalmeida(a)gmail.com>
AuthorDate: Tue Mar 11 12:49:39 2025 +0000
Commit: GitHub <noreply(a)github.com>
CommitDate: Tue Mar 11 13:49:39 2025 +0100
[COMCTL32] Fix shift-selecting files not working as expected in small/large icons views (#7729)
CORE-10386
Fixes the behavior when selecting multiple files in a folder with the Shift key, while using either the Large Icons or Small Icons view, so that it is consistent with how it works on Windows.
Proposed changes:
Disable the specialized code for these views in LISTVIEW_SetGroupSelection, using the same code as for the list and details views, which also works fine for them.
---
dll/win32/comctl32/listview.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/dll/win32/comctl32/listview.c b/dll/win32/comctl32/listview.c
index c94b85fac64..eb165e835c4 100644
--- a/dll/win32/comctl32/listview.c
+++ b/dll/win32/comctl32/listview.c
@@ -3725,8 +3725,10 @@ static void LISTVIEW_SetGroupSelection(LISTVIEW_INFO *infoPtr, INT nItem)
item.state = LVIS_SELECTED;
item.stateMask = LVIS_SELECTED;
+#ifndef __REACTOS__
if ((infoPtr->uView == LV_VIEW_LIST) || (infoPtr->uView == LV_VIEW_DETAILS))
{
+#endif
if (infoPtr->nSelectionMark == -1)
{
infoPtr->nSelectionMark = nItem;
@@ -3740,6 +3742,7 @@ static void LISTVIEW_SetGroupSelection(LISTVIEW_INFO *infoPtr, INT nItem)
sel.upper = max(infoPtr->nSelectionMark, nItem) + 1;
ranges_add(selection, sel);
}
+#ifndef __REACTOS__
}
else
{
@@ -3765,6 +3768,7 @@ static void LISTVIEW_SetGroupSelection(LISTVIEW_INFO *infoPtr, INT nItem)
}
iterator_destroy(&i);
}
+#endif
/* disable per item notifications on LVS_OWNERDATA style
FIXME: single LVN_ODSTATECHANGED should be used */