Wine-Devel
By thread
wine-devel@list.winehq.org
By month
Messages by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
June 2022
- 68 participants
- 3274 messages
[PATCH v3 1/6] comctl32/tests: Expand ownerdata listview tests.
by Angelo Haller
From: Angelo Haller <angelo(a)szanni.org>
Add more test cases to ownderdata listviews:
- Check LVN_ITEMCHANGED IDs
- Multi select via key up/down while pressing SHIFT/SHIFT+CONTROL
- Single select via key up/down while pressing SHIFT/SHIFT+CONTROL
- Deselect via up/down
Signed-off-by: Angelo Haller <angelo(a)szanni.org>
---
v3: Add missing WM_KEYUP events. Add more combinations of up/down keys.
---
dlls/comctl32/tests/listview.c | 253 +++++++++++++++++++++++++++++++--
1 file changed, 243 insertions(+), 10 deletions(-)
diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c
index 6ac7f53137d..0b17fb7c834 100644
--- a/dlls/comctl32/tests/listview.c
+++ b/dlls/comctl32/tests/listview.c
@@ -255,11 +255,77 @@ static const struct message ownerdata_deselect_all_parent_seq[] = {
{ 0 }
};
-static const struct message ownerdata_multiselect_odstatechanged_seq[] = {
- { WM_NOTIFY, sent|id, 0, 0, LVN_ITEMCHANGED },
+static const struct message ownerdata_multiselect_select_0_to_1_odstatechanged_seq[] = {
+ { WM_NOTIFY, sent|id|wparam, -1, 0, LVN_ITEMCHANGED },
{ WM_NOTIFY, sent|id, 0, 0, LVN_ODSTATECHANGED },
- { WM_NOTIFY, sent|id, 0, 0, LVN_ITEMCHANGED },
- { WM_NOTIFY, sent|id, 0, 0, LVN_ITEMCHANGED },
+ { WM_NOTIFY, sent|id|wparam, 0, 0, LVN_ITEMCHANGED },
+ { WM_NOTIFY, sent|id|wparam, 1, 0, LVN_ITEMCHANGED },
+ { 0 }
+};
+
+static const struct message ownerdata_multiselect_select_0_odstatechanged_seq[] = {
+ { WM_NOTIFY, sent|id|wparam, -1, 0, LVN_ITEMCHANGED },
+ { WM_NOTIFY, sent|id|wparam, 1, 0, LVN_ITEMCHANGED },
+ { WM_NOTIFY, sent|id|wparam, 0, 0, LVN_ITEMCHANGED },
+ { 0 }
+};
+
+static const struct message ownerdata_multiselect_select_0_modkey_odstatechanged_seq[] = {
+ { WM_NOTIFY, sent|id|wparam, -1, 0, LVN_ITEMCHANGED },
+ { WM_NOTIFY, sent|id|wparam, 0, 0, LVN_ITEMCHANGED },
+ { WM_NOTIFY, sent|id|wparam, 1, 0, LVN_ITEMCHANGED },
+ { WM_NOTIFY, sent|id|wparam, 0, 0, LVN_ITEMCHANGED },
+ { 0 }
+};
+
+static const struct message ownerdata_multiselect_move_0_to_1_odstatechanged_seq[] = {
+ { WM_NOTIFY, sent|id|wparam, 0, 0, LVN_ITEMCHANGED },
+ { WM_NOTIFY, sent|id|wparam, 1, 0, LVN_ITEMCHANGED },
+ { 0 }
+};
+
+static const struct message ownerdata_multiselect_select_0_to_2_odstatechanged_seq[] = {
+ { WM_NOTIFY, sent|id|wparam, -1, 0, LVN_ITEMCHANGED },
+ { WM_NOTIFY, sent|id, 0, 0, LVN_ODSTATECHANGED },
+ { WM_NOTIFY, sent|id|wparam, 1, 0, LVN_ITEMCHANGED },
+ { WM_NOTIFY, sent|id|wparam, 2, 0, LVN_ITEMCHANGED },
+ { 0 }
+};
+
+static const struct message ownerdata_multiselect_select_3_odstatechanged_seq[] = {
+ { WM_NOTIFY, sent|id|wparam, -1, 0, LVN_ITEMCHANGED },
+ { WM_NOTIFY, sent|id|wparam, 2, 0, LVN_ITEMCHANGED },
+ { WM_NOTIFY, sent|id|wparam, 3, 0, LVN_ITEMCHANGED },
+ { 0 }
+};
+
+static const struct message ownerdata_multiselect_select_3_modkey_odstatechanged_seq[] = {
+ { WM_NOTIFY, sent|id|wparam, -1, 0, LVN_ITEMCHANGED },
+ { WM_NOTIFY, sent|id|wparam, 3, 0, LVN_ITEMCHANGED },
+ { WM_NOTIFY, sent|id|wparam, 2, 0, LVN_ITEMCHANGED },
+ { WM_NOTIFY, sent|id|wparam, 3, 0, LVN_ITEMCHANGED },
+ { 0 }
+};
+
+static const struct message ownerdata_multiselect_select_3_to_2_odstatechanged_seq[] = {
+ { WM_NOTIFY, sent|id|wparam, -1, 0, LVN_ITEMCHANGED },
+ { WM_NOTIFY, sent|id, 0, 0, LVN_ODSTATECHANGED },
+ { WM_NOTIFY, sent|id|wparam, 3, 0, LVN_ITEMCHANGED },
+ { WM_NOTIFY, sent|id|wparam, 2, 0, LVN_ITEMCHANGED },
+ { 0 }
+};
+
+static const struct message ownerdata_multiselect_move_3_to_2_odstatechanged_seq[] = {
+ { WM_NOTIFY, sent|id|wparam, 3, 0, LVN_ITEMCHANGED },
+ { WM_NOTIFY, sent|id|wparam, 2, 0, LVN_ITEMCHANGED },
+ { 0 }
+};
+
+static const struct message ownerdata_multiselect_select_3_to_1_odstatechanged_seq[] = {
+ { WM_NOTIFY, sent|id|wparam, -1, 0, LVN_ITEMCHANGED },
+ { WM_NOTIFY, sent|id, 0, 0, LVN_ODSTATECHANGED },
+ { WM_NOTIFY, sent|id|wparam, 2, 0, LVN_ITEMCHANGED },
+ { WM_NOTIFY, sent|id|wparam, 1, 0, LVN_ITEMCHANGED },
{ 0 }
};
@@ -3571,38 +3637,205 @@ static void test_ownerdata_multiselect(void)
flush_sequences(sequences, NUM_MSG_SEQUENCES);
+ /* Select multiple items via SHIFT+DOWN */
+ res = SendMessageA(hwnd, WM_KEYDOWN, VK_DOWN, 0);
+ expect(0, res);
+ ok_sequence(sequences, PARENT_ODSTATECHANGED_SEQ_INDEX,
+ ownerdata_multiselect_select_0_to_1_odstatechanged_seq,
+ "ownerdata multiselect: select multiple via SHIFT+DOWN", TRUE);
+ res = SendMessageA(hwnd, WM_KEYUP, VK_DOWN, 0);
+ expect(0, res);
+ res = SendMessageA(hwnd, LVM_GETSELECTEDCOUNT, 0, 0);
+ expect(2, res);
+
+ flush_sequences(sequences, NUM_MSG_SEQUENCES);
+
+ /* Select one item via SHIFT+UP */
+ res = SendMessageA(hwnd, WM_KEYDOWN, VK_UP, 0);
+ expect(0, res);
+ ok_sequence(sequences, PARENT_ODSTATECHANGED_SEQ_INDEX,
+ ownerdata_multiselect_select_0_modkey_odstatechanged_seq,
+ "ownerdata multiselect: select one via SHIFT+UP", TRUE);
+ res = SendMessageA(hwnd, WM_KEYUP, VK_UP, 0);
+ expect(0, res);
+ res = SendMessageA(hwnd, LVM_GETSELECTEDCOUNT, 0, 0);
+ expect(1, res);
+
+ hold_key(VK_CONTROL);
+
+ flush_sequences(sequences, NUM_MSG_SEQUENCES);
+
+ /* Select multiple items via SHIFT+CONTROL+DOWN */
+ res = SendMessageA(hwnd, WM_KEYDOWN, VK_DOWN, 0);
+ expect(0, res);
+ ok_sequence(sequences, PARENT_ODSTATECHANGED_SEQ_INDEX,
+ ownerdata_multiselect_select_0_to_1_odstatechanged_seq,
+ "ownerdata multiselect: select multiple via SHIFT+CONTROL+DOWN", TRUE);
+ res = SendMessageA(hwnd, WM_KEYUP, VK_DOWN, 0);
+ expect(0, res);
+ res = SendMessageA(hwnd, LVM_GETSELECTEDCOUNT, 0, 0);
+ expect(2, res);
+
+ flush_sequences(sequences, NUM_MSG_SEQUENCES);
+
+ /* Select one item via SHIFT+CONTROL*UP */
+ res = SendMessageA(hwnd, WM_KEYDOWN, VK_UP, 0);
+ expect(0, res);
+ ok_sequence(sequences, PARENT_ODSTATECHANGED_SEQ_INDEX,
+ ownerdata_multiselect_select_0_modkey_odstatechanged_seq,
+ "ownerdata multiselect: select one via SHIFT+CONTROL+UP", TRUE);
+ res = SendMessageA(hwnd, WM_KEYUP, VK_UP, 0);
+ expect(0, res);
+ res = SendMessageA(hwnd, LVM_GETSELECTEDCOUNT, 0, 0);
+ expect(1, res);
+
+ release_key(VK_SHIFT);
+
+ flush_sequences(sequences, NUM_MSG_SEQUENCES);
+
+ /* Keep selection but move cursor via CONTROL+DOWN */
res = SendMessageA(hwnd, WM_KEYDOWN, VK_DOWN, 0);
expect(0, res);
+ ok_sequence(sequences, PARENT_ODSTATECHANGED_SEQ_INDEX,
+ ownerdata_multiselect_move_0_to_1_odstatechanged_seq,
+ "ownerdata multiselect: keep selection but move cursor via CONTROL+DOWN", FALSE);
+ res = SendMessageA(hwnd, WM_KEYUP, VK_DOWN, 0);
+ expect(0, res);
+ res = SendMessageA(hwnd, LVM_GETSELECTEDCOUNT, 0, 0);
+ expect(1, res);
+
+ hold_key(VK_SHIFT);
+
+ flush_sequences(sequences, NUM_MSG_SEQUENCES);
+ /* Select multiple via SHIFT+CONTROL+DOWN after moving cursor over an item without selecting */
+ res = SendMessageA(hwnd, WM_KEYDOWN, VK_DOWN, 0);
+ expect(0, res);
ok_sequence(sequences, PARENT_ODSTATECHANGED_SEQ_INDEX,
- ownerdata_multiselect_odstatechanged_seq,
- "ownerdata select multiple notification", TRUE);
+ ownerdata_multiselect_select_0_to_2_odstatechanged_seq,
+ "ownerdata multiselect: select multiple after skip via SHIFT+CONTROL+DOWN", TRUE);
+ res = SendMessageA(hwnd, WM_KEYUP, VK_DOWN, 0);
+ expect(0, res);
+ res = SendMessageA(hwnd, LVM_GETSELECTEDCOUNT, 0, 0);
+ expect(3, res);
+
+ release_key(VK_CONTROL);
+ release_key(VK_SHIFT);
+ flush_sequences(sequences, NUM_MSG_SEQUENCES);
+
+ /* Deselect all items, select item 3 via DOWN */
+ res = SendMessageA(hwnd, WM_KEYDOWN, VK_DOWN, 0);
+ expect(0, res);
+ ok_sequence(sequences, PARENT_ODSTATECHANGED_SEQ_INDEX,
+ ownerdata_multiselect_select_3_odstatechanged_seq,
+ "ownerdata multiselect: deselect all, select item 3 via DOWN", TRUE);
res = SendMessageA(hwnd, WM_KEYUP, VK_DOWN, 0);
expect(0, res);
+ res = SendMessageA(hwnd, LVM_GETSELECTEDCOUNT, 0, 0);
+ expect(1, res);
+
+ hold_key(VK_SHIFT);
+ flush_sequences(sequences, NUM_MSG_SEQUENCES);
+
+ /* Select multiple items via SHIFT+UP */
+ res = SendMessageA(hwnd, WM_KEYDOWN, VK_UP, 0);
+ expect(0, res);
+ ok_sequence(sequences, PARENT_ODSTATECHANGED_SEQ_INDEX,
+ ownerdata_multiselect_select_3_to_2_odstatechanged_seq,
+ "ownerdata multiselect: select multiple via SHIFT+UP", TRUE);
+ res = SendMessageA(hwnd, WM_KEYUP, VK_UP, 0);
+ expect(0, res);
res = SendMessageA(hwnd, LVM_GETSELECTEDCOUNT, 0, 0);
expect(2, res);
+ flush_sequences(sequences, NUM_MSG_SEQUENCES);
+
+ /* Select one item via SHIFT+DOWN */
+ res = SendMessageA(hwnd, WM_KEYDOWN, VK_DOWN, 0);
+ expect(0, res);
+ ok_sequence(sequences, PARENT_ODSTATECHANGED_SEQ_INDEX,
+ ownerdata_multiselect_select_3_modkey_odstatechanged_seq,
+ "ownerdata multiselect: select one via SHIFT+DOWN", TRUE);
+ res = SendMessageA(hwnd, WM_KEYUP, VK_DOWN, 0);
+ expect(0, res);
+ res = SendMessageA(hwnd, LVM_GETSELECTEDCOUNT, 0, 0);
+ expect(1, res);
+
hold_key(VK_CONTROL);
flush_sequences(sequences, NUM_MSG_SEQUENCES);
+ /* Select multiple items via SHIFT+CONTROL+UP */
+ res = SendMessageA(hwnd, WM_KEYDOWN, VK_UP, 0);
+ expect(0, res);
+ ok_sequence(sequences, PARENT_ODSTATECHANGED_SEQ_INDEX,
+ ownerdata_multiselect_select_3_to_2_odstatechanged_seq,
+ "ownerdata multiselect: select multiple via SHIFT+CONTROL+UP", TRUE);
+ res = SendMessageA(hwnd, WM_KEYUP, VK_UP, 0);
+ expect(0, res);
+ res = SendMessageA(hwnd, LVM_GETSELECTEDCOUNT, 0, 0);
+ expect(2, res);
+
+ flush_sequences(sequences, NUM_MSG_SEQUENCES);
+
+ /* Select one item via SHIFT+CONTROL+DOWN */
res = SendMessageA(hwnd, WM_KEYDOWN, VK_DOWN, 0);
expect(0, res);
+ ok_sequence(sequences, PARENT_ODSTATECHANGED_SEQ_INDEX,
+ ownerdata_multiselect_select_3_modkey_odstatechanged_seq,
+ "ownerdata multiselect: select one via SHIFT+CONTROL+DOWN", TRUE);
+ res = SendMessageA(hwnd, WM_KEYUP, VK_DOWN, 0);
+ expect(0, res);
+ res = SendMessageA(hwnd, LVM_GETSELECTEDCOUNT, 0, 0);
+ expect(1, res);
+ release_key(VK_SHIFT);
+
+ flush_sequences(sequences, NUM_MSG_SEQUENCES);
+
+ /* Keep selection but move cursor via CONTROL+UP */
+ res = SendMessageA(hwnd, WM_KEYDOWN, VK_UP, 0);
+ expect(0, res);
ok_sequence(sequences, PARENT_ODSTATECHANGED_SEQ_INDEX,
- ownerdata_multiselect_odstatechanged_seq,
- "ownerdata select multiple notification", TRUE);
+ ownerdata_multiselect_move_3_to_2_odstatechanged_seq,
+ "ownerdata multiselect: keep selection but move cursor via CONTROL+UP ", FALSE);
+ res = SendMessageA(hwnd, WM_KEYUP, VK_UP, 0);
+ expect(0, res);
+ res = SendMessageA(hwnd, LVM_GETSELECTEDCOUNT, 0, 0);
+ expect(1, res);
- res = SendMessageA(hwnd, WM_KEYUP, VK_DOWN, 0);
+ hold_key(VK_SHIFT);
+
+ flush_sequences(sequences, NUM_MSG_SEQUENCES);
+
+ /* Select multiple via SHIFT+CONTROL+DOWN after moving cursor over an item without selecting */
+ res = SendMessageA(hwnd, WM_KEYDOWN, VK_UP, 0);
+ expect(0, res);
+ ok_sequence(sequences, PARENT_ODSTATECHANGED_SEQ_INDEX,
+ ownerdata_multiselect_select_3_to_1_odstatechanged_seq,
+ "ownerdata multiselect: select multiple after skip via SHIFT+CONTROL+UP", TRUE);
+ res = SendMessageA(hwnd, WM_KEYUP, VK_UP, 0);
expect(0, res);
+ res = SendMessageA(hwnd, LVM_GETSELECTEDCOUNT, 0, 0);
+ expect(3, res);
release_key(VK_CONTROL);
release_key(VK_SHIFT);
+ flush_sequences(sequences, NUM_MSG_SEQUENCES);
+
+ /* Deselect all items, select item 3 via UP */
+ res = SendMessageA(hwnd, WM_KEYDOWN, VK_UP, 0);
+ expect(0, res);
+ ok_sequence(sequences, PARENT_ODSTATECHANGED_SEQ_INDEX,
+ ownerdata_multiselect_select_0_odstatechanged_seq,
+ "ownerdata multiselect: deselect all, select item 0 via UP", TRUE);
+ res = SendMessageA(hwnd, WM_KEYUP, VK_UP, 0);
+ expect(0, res);
res = SendMessageA(hwnd, LVM_GETSELECTEDCOUNT, 0, 0);
- expect(3, res);
+ expect(1, res);
DestroyWindow(hwnd);
}
--
2.36.1
June 18, 2022
[PATCH v3 0/6] Fix LVS_OWNERDATA list view multi select.
by Angelo Haller
From: Angelo Haller <angelo(a)szanni.org>
The following patches fix sending of the LVN_ODSTATECHANGED notification for
LVS_OWNERDATA list views, adding more refined tests in the process and
fixing various bugs.
This is v3 addressing most of the concerns that were raised in v2,
especially adding even more tests.
I was sadly not able to trigger any deselect sequences through emulating
mouse clicks. I was actually completely unable even send a lef mouse
button down at all. Both SendMessage and SendInput fail, on wind and
windows.
I am unsure if programmatic mouse clicks are even supported in list
views? Some forums seem to suggest, that this is only the case for
buttons and similar elements. I was following the code snippets in
other parts of the comctl32 tests.
The other thing might be that the signal is getting caught somewhere in
the test code. If anybody has any more insight in this regard, I'd be
happy to add additional mouse click tests as well.
The other thing I was unable to do is activate the single select tests
via SHIFT/+COMMAND to show we need patch 6/6.
Windows weirdly informs about the selected item twice, once to inform
the item has been selected and then in another call later about the
item being focused as well. This seemingly only affects
LVS_OWNERDATA listviews from my tests.
Warning: I have had access to the Windows Research Kernel (WRK) 1.2
~10 years ago. These changes are regarding comctrl32 & tests which are NOT
part of the WRK. As outlined in https://wiki.winehq.org/Developer_FAQ this
should therefore satisfy the requirement of ONLY submitting patches to
components I have NOT had access to.
Angelo Haller (6):
comctl32/tests: Expand ownerdata listview tests.
comctl32/listview: Fix deselect on LVS_OWNERDATA.
comctl32/listview: Move sending LVN_ODSTATECHANGED notifications to a
function.
comctl32/listview: Send LVN_ODSTATECHANGED only for virtual lists.
comctl32/listview: Send LVN_ODSTATECHANGED notification.
comctl32/listview: Send LVN_ODSTATECHANGED only for true ranges.
dlls/comctl32/listview.c | 55 ++++---
dlls/comctl32/tests/listview.c | 253 +++++++++++++++++++++++++++++++--
2 files changed, 281 insertions(+), 27 deletions(-)
Signed-off-by: Angelo Haller <angelo(a)szanni.org>
--
2.36.1
June 18, 2022
[PATCH] wined3d: Add GPU information for NVIDIA Ampere A10 and AMD Radeon Pro V620 GPUs.
by Bhavesh Davda
Signed-off-by: Bhavesh Davda <bhaveshd(a)hotmail.com>
---
dlls/wined3d/adapter_gl.c | 1 +
dlls/wined3d/directx.c | 3 +++
dlls/wined3d/wined3d_private.h | 3 +++
3 files changed, 7 insertions(+)
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c
index 05e8c11..d341668 100644
--- a/dlls/wined3d/adapter_gl.c
+++ b/dlls/wined3d/adapter_gl.c
@@ -1311,6 +1311,7 @@ cards_nvidia_binary[] =
{
/* Direct 3D 11 */
{"Tesla T4", CARD_NVIDIA_TESLA_T4},
+ {"Ampere A10", CARD_NVIDIA_AMPERE_A10},
{"RTX 2080 Ti", CARD_NVIDIA_GEFORCE_RTX2080TI}, /* GeForce 2000 - highend */
{"RTX 2080", CARD_NVIDIA_GEFORCE_RTX2080}, /* GeForce 2000 - highend */
{"RTX 2070", CARD_NVIDIA_GEFORCE_RTX2070}, /* GeForce 2000 - highend */
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 925b2df..6f8d1ed 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -475,6 +475,7 @@ static const struct wined3d_gpu_description gpu_description_table[] =
{HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_RTX2080, "NVIDIA GeForce RTX 2080", DRIVER_NVIDIA_KEPLER, 8192},
{HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_RTX2080TI, "NVIDIA GeForce RTX 2080 Ti", DRIVER_NVIDIA_KEPLER, 11264},
{HW_VENDOR_NVIDIA, CARD_NVIDIA_TESLA_T4, "NVIDIA Tesla T4", DRIVER_NVIDIA_KEPLER, 16384},
+ {HW_VENDOR_NVIDIA, CARD_NVIDIA_AMPERE_A10, "NVIDIA Ampere A10", DRIVER_NVIDIA_KEPLER, 24576},
/* AMD cards */
{HW_VENDOR_AMD, CARD_AMD_RAGE_128PRO, "ATI Rage Fury", DRIVER_AMD_RAGE_128PRO, 16 },
@@ -536,6 +537,8 @@ static const struct wined3d_gpu_description gpu_description_table[] =
{HW_VENDOR_AMD, CARD_AMD_RADEON_RX_NAVI_10, "Radeon RX 5700 / 5700 XT", DRIVER_AMD_RX, 8192},
{HW_VENDOR_AMD, CARD_AMD_RADEON_RX_NAVI_14, "Radeon RX 5500M", DRIVER_AMD_RX, 4096},
{HW_VENDOR_AMD, CARD_AMD_RADEON_RX_NAVI_21, "Radeon RX 6800/6800 XT / 6900 XT", DRIVER_AMD_RX, 16384},
+ {HW_VENDOR_AMD, CARD_AMD_RADEON_PRO_V620, "Radeon Pro V620", DRIVER_AMD_RX, 32768},
+ {HW_VENDOR_AMD, CARD_AMD_RADEON_PRO_V620_VF, "Radeon Pro V620 VF", DRIVER_AMD_RX, 32768},
{HW_VENDOR_AMD, CARD_AMD_VANGOGH, "AMD VANGOGH", DRIVER_AMD_RX, 4096},
/* Red Hat */
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 73d13d6..5f058d1 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3014,6 +3014,8 @@ enum wined3d_pci_device
CARD_AMD_RADEON_RX_NAVI_10 = 0x731f,
CARD_AMD_RADEON_RX_NAVI_14 = 0x7340,
CARD_AMD_RADEON_RX_NAVI_21 = 0x73bf,
+ CARD_AMD_RADEON_PRO_V620 = 0x73a1,
+ CARD_AMD_RADEON_PRO_V620_VF = 0x73ae,
CARD_AMD_VANGOGH = 0x163f,
CARD_NVIDIA_RIVA_128 = 0x0018,
@@ -3160,6 +3162,7 @@ enum wined3d_pci_device
CARD_NVIDIA_GEFORCE_RTX2080 = 0x1e87,
CARD_NVIDIA_GEFORCE_RTX2080TI = 0x1e07,
CARD_NVIDIA_TESLA_T4 = 0x1eb8,
+ CARD_NVIDIA_AMPERE_A10 = 0x2236,
CARD_REDHAT_VIRGL = 0x1010,
--
1.8.3.1
June 18, 2022
Re: [PATCH 1/4] win32u: Move process_rawinput_message() from user32.
by Marvin
Hi,
It looks like your patch introduced the new failures shown below.
Please investigate and fix them before resubmitting your patch.
If they are not new, fixing them anyway would help a lot. Otherwise
please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how
to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=117216
Your paranoid android.
=== debian11 (32 bit report) ===
user32:
msg.c:6881: Test failed: SetFocus(hwnd) on a button: 6: the msg 0x002b was expected, but got msg 0x001c instead
msg.c:6881: Test failed: SetFocus(hwnd) on a button: 7: the msg 0x0111 was expected, but got msg 0x0086 instead
msg.c:6881: Test failed: SetFocus(hwnd) on a button: 8: the msg 0x8000 was expected, but got msg 0x0006 instead
msg.c:6881: Test failed: SetFocus(hwnd) on a button: 9: the msg sequence is not complete: expected 0000 - actual 0009
June 18, 2022
[PATCH 4/4] win32u: Use syscall interface for NtUserGetRawInputBuffer.
by Zebediah Figura
From: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/win32u/gdiobj.c | 1 -
dlls/win32u/syscall.c | 1 +
dlls/win32u/win32u.spec | 2 +-
dlls/win32u/win32u_private.h | 1 -
dlls/win32u/wrappers.c | 6 ------
dlls/wow64win/syscall.h | 1 +
dlls/wow64win/user.c | 18 ++++++++++++++++++
7 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/dlls/win32u/gdiobj.c b/dlls/win32u/gdiobj.c
index 0b148a628b3..9d95d3cf94a 100644
--- a/dlls/win32u/gdiobj.c
+++ b/dlls/win32u/gdiobj.c
@@ -1184,7 +1184,6 @@ static struct unix_funcs unix_funcs =
NtUserGetMessage,
NtUserGetPriorityClipboardFormat,
NtUserGetQueueStatus,
- NtUserGetRawInputBuffer,
NtUserGetSystemMenu,
NtUserGetUpdateRect,
NtUserGetUpdateRgn,
diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c
index cf5615f4dde..12af30f6c98 100644
--- a/dlls/win32u/syscall.c
+++ b/dlls/win32u/syscall.c
@@ -145,6 +145,7 @@ static void * const syscalls[] =
NtUserGetProcessDpiAwarenessContext,
NtUserGetProcessWindowStation,
NtUserGetProp,
+ NtUserGetRawInputBuffer,
NtUserGetRawInputData,
NtUserGetSystemDpiForProcess,
NtUserGetThreadDesktop,
diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec
index 80bfb0bc253..c71f0d20429 100644
--- a/dlls/win32u/win32u.spec
+++ b/dlls/win32u/win32u.spec
@@ -983,7 +983,7 @@
@ stdcall -syscall NtUserGetProp(long wstr)
@ stdcall NtUserGetQueueStatus(long)
@ stub NtUserGetQueueStatusReadonly
-@ stdcall NtUserGetRawInputBuffer(ptr ptr long)
+@ stdcall -syscall NtUserGetRawInputBuffer(ptr ptr long)
@ stdcall -syscall NtUserGetRawInputData(ptr long ptr ptr long)
@ stub NtUserGetRawInputDeviceInfo
@ stub NtUserGetRawInputDeviceList
diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h
index 631d20f04b0..aa7918d4d12 100644
--- a/dlls/win32u/win32u_private.h
+++ b/dlls/win32u/win32u_private.h
@@ -248,7 +248,6 @@ struct unix_funcs
BOOL (WINAPI *pNtUserGetMessage)( MSG *msg, HWND hwnd, UINT first, UINT last );
INT (WINAPI *pNtUserGetPriorityClipboardFormat)( UINT *list, INT count );
DWORD (WINAPI *pNtUserGetQueueStatus)( UINT flags );
- UINT (WINAPI *pNtUserGetRawInputBuffer)( RAWINPUT *data, UINT *data_size, UINT header_size );
HMENU (WINAPI *pNtUserGetSystemMenu)( HWND hwnd, BOOL revert );
BOOL (WINAPI *pNtUserGetUpdateRect)( HWND hwnd, RECT *rect, BOOL erase );
INT (WINAPI *pNtUserGetUpdateRgn)( HWND hwnd, HRGN hrgn, BOOL erase );
diff --git a/dlls/win32u/wrappers.c b/dlls/win32u/wrappers.c
index a4504135314..b451e57e3b1 100644
--- a/dlls/win32u/wrappers.c
+++ b/dlls/win32u/wrappers.c
@@ -1048,12 +1048,6 @@ DWORD WINAPI NtUserGetQueueStatus( UINT flags )
return unix_funcs->pNtUserGetQueueStatus( flags );
}
-UINT WINAPI DECLSPEC_HOTPATCH NtUserGetRawInputBuffer( RAWINPUT *data, UINT *data_size, UINT header_size )
-{
- if (!unix_funcs) return ~0u;
- return unix_funcs->pNtUserGetRawInputBuffer( data, data_size, header_size );
-}
-
BOOL WINAPI NtUserGetUpdatedClipboardFormats( UINT *formats, UINT size, UINT *out_size )
{
if (!unix_funcs) return FALSE;
diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h
index 6c4e12bf59a..618a7990554 100644
--- a/dlls/wow64win/syscall.h
+++ b/dlls/wow64win/syscall.h
@@ -132,6 +132,7 @@
SYSCALL_ENTRY( NtUserGetProcessDpiAwarenessContext ) \
SYSCALL_ENTRY( NtUserGetProcessWindowStation ) \
SYSCALL_ENTRY( NtUserGetProp ) \
+ SYSCALL_ENTRY( NtUserGetRawInputBuffer ) \
SYSCALL_ENTRY( NtUserGetRawInputData ) \
SYSCALL_ENTRY( NtUserGetSystemDpiForProcess ) \
SYSCALL_ENTRY( NtUserGetThreadDesktop ) \
diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c
index e48afcf69c4..c5c3a81c475 100644
--- a/dlls/wow64win/user.c
+++ b/dlls/wow64win/user.c
@@ -957,3 +957,21 @@ NTSTATUS WINAPI wow64_NtUserGetRawInputData( UINT *args )
return ~0u;
}
}
+
+NTSTATUS WINAPI wow64_NtUserGetRawInputBuffer( UINT *args )
+{
+ RAWINPUT *data = get_ptr( &args );
+ UINT *data_size = get_ptr( &args );
+ UINT header_size = get_ulong( &args );
+
+ if (header_size != sizeof(RAWINPUTHEADER32))
+ {
+ SetLastError( ERROR_INVALID_PARAMETER );
+ return ~0u;
+ }
+
+ /* RAWINPUT has different sizes on 32-bit and 64-bit, but no translation is
+ * done. The function actually returns different structures depending on
+ * whether it's operating under WoW64 or not. */
+ return NtUserGetRawInputBuffer( data, data_size, sizeof(RAWINPUTHEADER) );
+}
--
GitLab
https://gitlab.winehq.org/wine/wine/-/merge_requests/271
June 18, 2022
[PATCH 3/4] win32u: Use syscall interface for NtUserGetRawInputData.
by Zebediah Figura
From: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/win32u/gdiobj.c | 1 -
dlls/win32u/syscall.c | 1 +
dlls/win32u/win32u.spec | 2 +-
dlls/win32u/win32u_private.h | 2 -
dlls/win32u/wrappers.c | 6 ---
dlls/wow64win/syscall.h | 1 +
dlls/wow64win/user.c | 99 ++++++++++++++++++++++++++++++++++++
7 files changed, 102 insertions(+), 10 deletions(-)
diff --git a/dlls/win32u/gdiobj.c b/dlls/win32u/gdiobj.c
index 121ed4bbefd..0b148a628b3 100644
--- a/dlls/win32u/gdiobj.c
+++ b/dlls/win32u/gdiobj.c
@@ -1185,7 +1185,6 @@ static struct unix_funcs unix_funcs =
NtUserGetPriorityClipboardFormat,
NtUserGetQueueStatus,
NtUserGetRawInputBuffer,
- NtUserGetRawInputData,
NtUserGetSystemMenu,
NtUserGetUpdateRect,
NtUserGetUpdateRgn,
diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c
index ffb1529e03f..cf5615f4dde 100644
--- a/dlls/win32u/syscall.c
+++ b/dlls/win32u/syscall.c
@@ -145,6 +145,7 @@ static void * const syscalls[] =
NtUserGetProcessDpiAwarenessContext,
NtUserGetProcessWindowStation,
NtUserGetProp,
+ NtUserGetRawInputData,
NtUserGetSystemDpiForProcess,
NtUserGetThreadDesktop,
NtUserGetTitleBarInfo,
diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec
index 4a8d839007e..80bfb0bc253 100644
--- a/dlls/win32u/win32u.spec
+++ b/dlls/win32u/win32u.spec
@@ -984,7 +984,7 @@
@ stdcall NtUserGetQueueStatus(long)
@ stub NtUserGetQueueStatusReadonly
@ stdcall NtUserGetRawInputBuffer(ptr ptr long)
-@ stdcall NtUserGetRawInputData(ptr long ptr ptr long)
+@ stdcall -syscall NtUserGetRawInputData(ptr long ptr ptr long)
@ stub NtUserGetRawInputDeviceInfo
@ stub NtUserGetRawInputDeviceList
@ stub NtUserGetRawPointerDeviceData
diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h
index 406d71ab06d..631d20f04b0 100644
--- a/dlls/win32u/win32u_private.h
+++ b/dlls/win32u/win32u_private.h
@@ -249,8 +249,6 @@ struct unix_funcs
INT (WINAPI *pNtUserGetPriorityClipboardFormat)( UINT *list, INT count );
DWORD (WINAPI *pNtUserGetQueueStatus)( UINT flags );
UINT (WINAPI *pNtUserGetRawInputBuffer)( RAWINPUT *data, UINT *data_size, UINT header_size );
- UINT (WINAPI *pNtUserGetRawInputData)( HRAWINPUT rawinput, UINT command,
- void *data, UINT *data_size, UINT header_size );
HMENU (WINAPI *pNtUserGetSystemMenu)( HWND hwnd, BOOL revert );
BOOL (WINAPI *pNtUserGetUpdateRect)( HWND hwnd, RECT *rect, BOOL erase );
INT (WINAPI *pNtUserGetUpdateRgn)( HWND hwnd, HRGN hrgn, BOOL erase );
diff --git a/dlls/win32u/wrappers.c b/dlls/win32u/wrappers.c
index 05c25a006e9..a4504135314 100644
--- a/dlls/win32u/wrappers.c
+++ b/dlls/win32u/wrappers.c
@@ -1054,12 +1054,6 @@ UINT WINAPI DECLSPEC_HOTPATCH NtUserGetRawInputBuffer( RAWINPUT *data, UINT *dat
return unix_funcs->pNtUserGetRawInputBuffer( data, data_size, header_size );
}
-UINT WINAPI NtUserGetRawInputData( HRAWINPUT rawinput, UINT command, void *data, UINT *data_size, UINT header_size )
-{
- if (!unix_funcs) return ~0u;
- return unix_funcs->pNtUserGetRawInputData( rawinput, command, data, data_size, header_size );
-}
-
BOOL WINAPI NtUserGetUpdatedClipboardFormats( UINT *formats, UINT size, UINT *out_size )
{
if (!unix_funcs) return FALSE;
diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h
index e1364c2811e..6c4e12bf59a 100644
--- a/dlls/wow64win/syscall.h
+++ b/dlls/wow64win/syscall.h
@@ -132,6 +132,7 @@
SYSCALL_ENTRY( NtUserGetProcessDpiAwarenessContext ) \
SYSCALL_ENTRY( NtUserGetProcessWindowStation ) \
SYSCALL_ENTRY( NtUserGetProp ) \
+ SYSCALL_ENTRY( NtUserGetRawInputData ) \
SYSCALL_ENTRY( NtUserGetSystemDpiForProcess ) \
SYSCALL_ENTRY( NtUserGetThreadDesktop ) \
SYSCALL_ENTRY( NtUserGetTitleBarInfo ) \
diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c
index 08b8fb6f2a0..e48afcf69c4 100644
--- a/dlls/wow64win/user.c
+++ b/dlls/wow64win/user.c
@@ -56,6 +56,14 @@ typedef struct
POINT pt;
} MSG32;
+typedef struct
+{
+ UINT dwType;
+ UINT dwSize;
+ UINT hDevice;
+ UINT wParam;
+} RAWINPUTHEADER32;
+
static MSG *msg_32to64( MSG *msg, MSG32 *msg32 )
{
if (!msg32) return NULL;
@@ -858,3 +866,94 @@ NTSTATUS WINAPI wow64_NtUserGetTitleBarInfo( UINT *args )
return NtUserGetTitleBarInfo( hwnd, info );
}
+
+NTSTATUS WINAPI wow64_NtUserGetRawInputData( UINT *args )
+{
+ HRAWINPUT handle = get_handle( &args );
+ UINT command = get_ulong( &args );
+ void *data = get_ptr( &args );
+ UINT *data_size = get_ptr( &args );
+ UINT header_size = get_ulong( &args );
+
+ if (header_size != sizeof(RAWINPUTHEADER32))
+ {
+ SetLastError( ERROR_INVALID_PARAMETER );
+ return ~0u;
+ }
+
+ switch (command)
+ {
+ case RID_INPUT:
+ if (data)
+ {
+ UINT data_size64, body_size, ret;
+ RAWINPUTHEADER32 *data32 = data;
+ RAWINPUTHEADER *data64 = NULL;
+
+ data_size64 = *data_size + sizeof(RAWINPUTHEADER);
+ if (!(data64 = Wow64AllocateTemp( data_size64 )))
+ {
+ SetLastError( STATUS_NO_MEMORY );
+ return ~0u;
+ }
+
+ ret = NtUserGetRawInputData( handle, command, data64, &data_size64, sizeof(RAWINPUTHEADER) );
+ if (ret == ~0u) return ret;
+
+ body_size = ret - sizeof(RAWINPUTHEADER);
+ if (*data_size < sizeof(RAWINPUTHEADER32) + body_size)
+ {
+ SetLastError( ERROR_INSUFFICIENT_BUFFER );
+ return ~0u;
+ }
+
+ data32->dwType = data64->dwType;
+ data32->dwSize = sizeof(RAWINPUTHEADER32) + body_size;
+ data32->hDevice = (UINT_PTR)data64->hDevice;
+ data32->wParam = data64->wParam;
+ memcpy( data32 + 1, data64 + 1, body_size );
+ return sizeof(RAWINPUTHEADER32) + body_size;
+ }
+ else
+ {
+ UINT data_size64, ret;
+
+ ret = NtUserGetRawInputData( handle, command, NULL, &data_size64, sizeof(RAWINPUTHEADER) );
+ if (ret == ~0u) return ret;
+ *data_size = data_size64 - sizeof(RAWINPUTHEADER) + sizeof(RAWINPUTHEADER32);
+ return 0;
+ }
+
+ case RID_HEADER:
+ {
+ UINT data_size64 = sizeof(RAWINPUTHEADER);
+ RAWINPUTHEADER32 *data32 = data;
+ RAWINPUTHEADER data64;
+ UINT ret;
+
+ if (!data)
+ {
+ *data_size = sizeof(RAWINPUTHEADER);
+ return 0;
+ }
+
+ if (*data_size < sizeof(RAWINPUTHEADER))
+ {
+ SetLastError( ERROR_INSUFFICIENT_BUFFER );
+ return ~0u;
+ }
+
+ ret = NtUserGetRawInputData( handle, command, &data64, &data_size64, sizeof(RAWINPUTHEADER) );
+ if (ret == ~0u) return ret;
+ data32->dwType = data64.dwType;
+ data32->dwSize = data64.dwSize - sizeof(RAWINPUTHEADER) + sizeof(RAWINPUTHEADER32);
+ data32->hDevice = (UINT_PTR)data64.hDevice;
+ data32->wParam = data64.wParam;
+ return sizeof(RAWINPUTHEADER);
+ }
+
+ default:
+ SetLastError( ERROR_INVALID_PARAMETER );
+ return ~0u;
+ }
+}
--
GitLab
https://gitlab.winehq.org/wine/wine/-/merge_requests/271
June 18, 2022
[PATCH 2/4] win32u: Move raw input thread data allocation from user32.
by Zebediah Figura
From: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/user32/rawinput.c | 11 -----------
dlls/user32/user_main.c | 2 --
dlls/user32/user_private.h | 1 -
dlls/win32u/ntuser_private.h | 1 -
dlls/win32u/rawinput.c | 15 ++++++++++++---
dlls/win32u/sysparams.c | 1 +
6 files changed, 13 insertions(+), 18 deletions(-)
diff --git a/dlls/user32/rawinput.c b/dlls/user32/rawinput.c
index 9286aceb670..d6290f08d12 100644
--- a/dlls/user32/rawinput.c
+++ b/dlls/user32/rawinput.c
@@ -351,17 +351,6 @@ BOOL rawinput_device_get_usages(HANDLE handle, USAGE *usage_page, USAGE *usage)
}
-struct rawinput_thread_data * WINAPI rawinput_thread_data(void)
-{
- struct user_thread_info *thread_info = get_user_thread_info();
- struct rawinput_thread_data *data = thread_info->rawinput;
- if (data) return data;
- data = thread_info->rawinput = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
- RAWINPUT_BUFFER_SIZE + sizeof(struct user_thread_info) );
- return data;
-}
-
-
/***********************************************************************
* GetRawInputDeviceList (USER32.@)
*/
diff --git a/dlls/user32/user_main.c b/dlls/user32/user_main.c
index 72d5f30e536..55e72dcf203 100644
--- a/dlls/user32/user_main.c
+++ b/dlls/user32/user_main.c
@@ -169,7 +169,6 @@ static const struct user_callbacks user_funcs =
register_imm,
unregister_imm,
try_finally,
- rawinput_thread_data,
};
static NTSTATUS WINAPI User32CopyImage( const struct copy_image_params *params, ULONG size )
@@ -271,7 +270,6 @@ static void thread_detach(void)
NtUserCallNoParam( NtUserThreadDetach );
HeapFree( GetProcessHeap(), 0, thread_info->wmchar_data );
- HeapFree( GetProcessHeap(), 0, thread_info->rawinput );
exiting_thread_id = 0;
}
diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h
index d15a3b6856e..71248e03bb8 100644
--- a/dlls/user32/user_private.h
+++ b/dlls/user32/user_private.h
@@ -62,7 +62,6 @@ struct tagWND;
struct hardware_msg_data;
extern BOOL rawinput_device_get_usages(HANDLE handle, USAGE *usage_page, USAGE *usage);
-extern struct rawinput_thread_data * WINAPI rawinput_thread_data(void);
extern void CDECL rawinput_update_device_list(void);
extern BOOL post_dde_message( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, DWORD dest_tid,
diff --git a/dlls/win32u/ntuser_private.h b/dlls/win32u/ntuser_private.h
index fd644484e48..eb851f57cdb 100644
--- a/dlls/win32u/ntuser_private.h
+++ b/dlls/win32u/ntuser_private.h
@@ -50,7 +50,6 @@ struct user_callbacks
void (WINAPI *unregister_imm)( HWND hwnd );
NTSTATUS (CDECL *try_finally)( NTSTATUS (CDECL *func)( void *), void *arg,
void (CALLBACK *finally_func)( BOOL ));
- struct rawinput_thread_data *(WINAPI *get_rawinput_thread_data)(void);
};
#define WM_SYSTIMER 0x0118
diff --git a/dlls/win32u/rawinput.c b/dlls/win32u/rawinput.c
index 046e25ecf6a..d6d4e0c13f7 100644
--- a/dlls/win32u/rawinput.c
+++ b/dlls/win32u/rawinput.c
@@ -58,6 +58,15 @@ typedef struct
} RAWINPUT64;
#endif
+static struct rawinput_thread_data *get_rawinput_thread_data(void)
+{
+ struct user_thread_info *thread_info = get_user_thread_info();
+ struct rawinput_thread_data *data = thread_info->rawinput;
+ if (data) return data;
+ data = thread_info->rawinput = calloc( 1, RAWINPUT_BUFFER_SIZE + sizeof(struct user_thread_info) );
+ return data;
+}
+
static bool rawinput_from_hardware_message( RAWINPUT *rawinput, const struct hardware_msg_data *msg_data )
{
SIZE_T size;
@@ -223,7 +232,7 @@ UINT WINAPI NtUserGetRawInputBuffer( RAWINPUT *data, UINT *data_size, UINT heade
return 0;
}
- if (!user_callbacks || !(thread_data = user_callbacks->get_rawinput_thread_data())) return ~0u;
+ if (!(thread_data = get_rawinput_thread_data())) return ~0u;
rawinput = thread_data->buffer;
/* first RAWINPUT block in the buffer is used for WM_INPUT message data */
@@ -286,7 +295,7 @@ UINT WINAPI NtUserGetRawInputData( HRAWINPUT rawinput, UINT command, void *data,
TRACE( "rawinput %p, command %#x, data %p, data_size %p, header_size %u.\n",
rawinput, command, data, data_size, header_size );
- if (!user_callbacks || !(thread_data = user_callbacks->get_rawinput_thread_data()))
+ if (!(thread_data = get_rawinput_thread_data()))
{
SetLastError( ERROR_OUTOFMEMORY );
return ~0u;
@@ -339,7 +348,7 @@ BOOL process_rawinput_message( MSG *msg, UINT hw_id, const struct hardware_msg_d
{
struct rawinput_thread_data *thread_data;
- if (!user_callbacks || !(thread_data = user_callbacks->get_rawinput_thread_data()))
+ if (!(thread_data = get_rawinput_thread_data()))
return FALSE;
if (msg->message == WM_INPUT_DEVICE_CHANGE)
diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c
index 01469c345c2..26426586fb8 100644
--- a/dlls/win32u/sysparams.c
+++ b/dlls/win32u/sysparams.c
@@ -4689,6 +4689,7 @@ static void thread_detach(void)
free( thread_info->key_state );
thread_info->key_state = 0;
+ free( thread_info->rawinput );
destroy_thread_windows();
NtClose( thread_info->server_queue );
--
GitLab
https://gitlab.winehq.org/wine/wine/-/merge_requests/271
June 18, 2022
[PATCH 1/4] win32u: Move process_rawinput_message() from user32.
by Zebediah Figura
From: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/user32/message.c | 19 ------
dlls/user32/rawinput.c | 120 +----------------------------------
dlls/user32/sysparams.c | 2 +-
dlls/user32/user_main.c | 2 +-
dlls/user32/user_private.h | 3 +-
dlls/user32/win.h | 1 -
dlls/win32u/message.c | 2 +-
dlls/win32u/ntuser_private.h | 2 +-
dlls/win32u/rawinput.c | 23 +++++++
dlls/win32u/win32u_private.h | 4 ++
10 files changed, 33 insertions(+), 145 deletions(-)
diff --git a/dlls/user32/message.c b/dlls/user32/message.c
index 02c40f2ca4f..eff0c4efbcf 100644
--- a/dlls/user32/message.c
+++ b/dlls/user32/message.c
@@ -558,25 +558,6 @@ BOOL unpack_dde_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM *lparam
return TRUE;
}
-BOOL process_rawinput_message( MSG *msg, UINT hw_id, const struct hardware_msg_data *msg_data )
-{
- struct rawinput_thread_data *thread_data = rawinput_thread_data();
-
- if (msg->message == WM_INPUT_DEVICE_CHANGE)
- rawinput_update_device_list();
- else
- {
- thread_data->buffer->header.dwSize = RAWINPUT_BUFFER_SIZE;
- if (!rawinput_from_hardware_message( thread_data->buffer, msg_data )) return FALSE;
- thread_data->hw_id = hw_id;
- msg->lParam = (LPARAM)hw_id;
- }
-
- msg->pt = point_phys_to_win_dpi( msg->hwnd, msg->pt );
- return TRUE;
-}
-
-
/***********************************************************************
* SendMessageTimeoutW (USER32.@)
*/
diff --git a/dlls/user32/rawinput.c b/dlls/user32/rawinput.c
index f8980f03e9e..9286aceb670 100644
--- a/dlls/user32/rawinput.c
+++ b/dlls/user32/rawinput.c
@@ -297,7 +297,7 @@ static void enumerate_devices( DWORD type, const WCHAR *class )
NtClose( class_key );
}
-void rawinput_update_device_list(void)
+void CDECL rawinput_update_device_list(void)
{
DWORD idx;
@@ -362,124 +362,6 @@ struct rawinput_thread_data * WINAPI rawinput_thread_data(void)
}
-BOOL rawinput_from_hardware_message(RAWINPUT *rawinput, const struct hardware_msg_data *msg_data)
-{
- SIZE_T size;
-
- rawinput->header.dwType = msg_data->rawinput.type;
- if (msg_data->rawinput.type == RIM_TYPEMOUSE)
- {
- static const unsigned int button_flags[] =
- {
- 0, /* MOUSEEVENTF_MOVE */
- RI_MOUSE_LEFT_BUTTON_DOWN, /* MOUSEEVENTF_LEFTDOWN */
- RI_MOUSE_LEFT_BUTTON_UP, /* MOUSEEVENTF_LEFTUP */
- RI_MOUSE_RIGHT_BUTTON_DOWN, /* MOUSEEVENTF_RIGHTDOWN */
- RI_MOUSE_RIGHT_BUTTON_UP, /* MOUSEEVENTF_RIGHTUP */
- RI_MOUSE_MIDDLE_BUTTON_DOWN, /* MOUSEEVENTF_MIDDLEDOWN */
- RI_MOUSE_MIDDLE_BUTTON_UP, /* MOUSEEVENTF_MIDDLEUP */
- };
- unsigned int i;
-
- rawinput->header.dwSize = FIELD_OFFSET(RAWINPUT, data) + sizeof(RAWMOUSE);
- rawinput->header.hDevice = WINE_MOUSE_HANDLE;
- rawinput->header.wParam = 0;
-
- rawinput->data.mouse.usFlags = MOUSE_MOVE_RELATIVE;
- rawinput->data.mouse.usButtonFlags = 0;
- rawinput->data.mouse.usButtonData = 0;
- for (i = 1; i < ARRAY_SIZE(button_flags); ++i)
- {
- if (msg_data->flags & (1 << i))
- rawinput->data.mouse.usButtonFlags |= button_flags[i];
- }
- if (msg_data->flags & MOUSEEVENTF_WHEEL)
- {
- rawinput->data.mouse.usButtonFlags |= RI_MOUSE_WHEEL;
- rawinput->data.mouse.usButtonData = msg_data->rawinput.mouse.data;
- }
- if (msg_data->flags & MOUSEEVENTF_HWHEEL)
- {
- rawinput->data.mouse.usButtonFlags |= RI_MOUSE_HORIZONTAL_WHEEL;
- rawinput->data.mouse.usButtonData = msg_data->rawinput.mouse.data;
- }
- if (msg_data->flags & MOUSEEVENTF_XDOWN)
- {
- if (msg_data->rawinput.mouse.data == XBUTTON1)
- rawinput->data.mouse.usButtonFlags |= RI_MOUSE_BUTTON_4_DOWN;
- else if (msg_data->rawinput.mouse.data == XBUTTON2)
- rawinput->data.mouse.usButtonFlags |= RI_MOUSE_BUTTON_5_DOWN;
- }
- if (msg_data->flags & MOUSEEVENTF_XUP)
- {
- if (msg_data->rawinput.mouse.data == XBUTTON1)
- rawinput->data.mouse.usButtonFlags |= RI_MOUSE_BUTTON_4_UP;
- else if (msg_data->rawinput.mouse.data == XBUTTON2)
- rawinput->data.mouse.usButtonFlags |= RI_MOUSE_BUTTON_5_UP;
- }
-
- rawinput->data.mouse.ulRawButtons = 0;
- rawinput->data.mouse.lLastX = msg_data->rawinput.mouse.x;
- rawinput->data.mouse.lLastY = msg_data->rawinput.mouse.y;
- rawinput->data.mouse.ulExtraInformation = msg_data->info;
- }
- else if (msg_data->rawinput.type == RIM_TYPEKEYBOARD)
- {
- rawinput->header.dwSize = FIELD_OFFSET(RAWINPUT, data) + sizeof(RAWKEYBOARD);
- rawinput->header.hDevice = WINE_KEYBOARD_HANDLE;
- rawinput->header.wParam = 0;
-
- rawinput->data.keyboard.MakeCode = msg_data->rawinput.kbd.scan;
- rawinput->data.keyboard.Flags = msg_data->flags & KEYEVENTF_KEYUP ? RI_KEY_BREAK : RI_KEY_MAKE;
- if (msg_data->flags & KEYEVENTF_EXTENDEDKEY) rawinput->data.keyboard.Flags |= RI_KEY_E0;
- rawinput->data.keyboard.Reserved = 0;
-
- switch (msg_data->rawinput.kbd.vkey)
- {
- case VK_LSHIFT:
- case VK_RSHIFT:
- rawinput->data.keyboard.VKey = VK_SHIFT;
- rawinput->data.keyboard.Flags &= ~RI_KEY_E0;
- break;
- case VK_LCONTROL:
- case VK_RCONTROL:
- rawinput->data.keyboard.VKey = VK_CONTROL;
- break;
- case VK_LMENU:
- case VK_RMENU:
- rawinput->data.keyboard.VKey = VK_MENU;
- break;
- default:
- rawinput->data.keyboard.VKey = msg_data->rawinput.kbd.vkey;
- break;
- }
-
- rawinput->data.keyboard.Message = msg_data->rawinput.kbd.message;
- rawinput->data.keyboard.ExtraInformation = msg_data->info;
- }
- else if (msg_data->rawinput.type == RIM_TYPEHID)
- {
- size = msg_data->size - sizeof(*msg_data);
- if (size > rawinput->header.dwSize - sizeof(*rawinput)) return FALSE;
-
- rawinput->header.dwSize = FIELD_OFFSET( RAWINPUT, data.hid.bRawData ) + size;
- rawinput->header.hDevice = ULongToHandle( msg_data->rawinput.hid.device );
- rawinput->header.wParam = 0;
-
- rawinput->data.hid.dwCount = msg_data->rawinput.hid.count;
- rawinput->data.hid.dwSizeHid = msg_data->rawinput.hid.length;
- memcpy( rawinput->data.hid.bRawData, msg_data + 1, size );
- }
- else
- {
- FIXME("Unhandled rawinput type %#x.\n", msg_data->rawinput.type);
- return FALSE;
- }
-
- return TRUE;
-}
-
-
/***********************************************************************
* GetRawInputDeviceList (USER32.@)
*/
diff --git a/dlls/user32/sysparams.c b/dlls/user32/sysparams.c
index ec83a1822a5..738186afb89 100644
--- a/dlls/user32/sysparams.c
+++ b/dlls/user32/sysparams.c
@@ -724,7 +724,7 @@ POINT point_win_to_phys_dpi( HWND hwnd, POINT pt )
/**********************************************************************
* point_phys_to_win_dpi
*/
-POINT point_phys_to_win_dpi( HWND hwnd, POINT pt )
+static POINT point_phys_to_win_dpi( HWND hwnd, POINT pt )
{
return map_dpi_point( pt, get_win_monitor_dpi( hwnd ), GetDpiForWindow( hwnd ));
}
diff --git a/dlls/user32/user_main.c b/dlls/user32/user_main.c
index 4901bcf7193..72d5f30e536 100644
--- a/dlls/user32/user_main.c
+++ b/dlls/user32/user_main.c
@@ -162,7 +162,7 @@ static const struct user_callbacks user_funcs =
MENU_GetSysMenu,
notify_ime,
post_dde_message,
- process_rawinput_message,
+ rawinput_update_device_list,
rawinput_device_get_usages,
SCROLL_SetStandardScrollPainted,
unpack_dde_message,
diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h
index 9a2b7de4509..d15a3b6856e 100644
--- a/dlls/user32/user_private.h
+++ b/dlls/user32/user_private.h
@@ -61,10 +61,9 @@ struct dce;
struct tagWND;
struct hardware_msg_data;
-extern BOOL rawinput_from_hardware_message(RAWINPUT *rawinput, const struct hardware_msg_data *msg_data);
extern BOOL rawinput_device_get_usages(HANDLE handle, USAGE *usage_page, USAGE *usage);
extern struct rawinput_thread_data * WINAPI rawinput_thread_data(void);
-extern void rawinput_update_device_list(void);
+extern void CDECL rawinput_update_device_list(void);
extern BOOL post_dde_message( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, DWORD dest_tid,
DWORD type ) DECLSPEC_HIDDEN;
diff --git a/dlls/user32/win.h b/dlls/user32/win.h
index 1dfc8eb0ad1..79e26a6c86c 100644
--- a/dlls/user32/win.h
+++ b/dlls/user32/win.h
@@ -63,7 +63,6 @@ extern UINT get_win_monitor_dpi( HWND hwnd ) DECLSPEC_HIDDEN;
extern UINT get_thread_dpi(void) DECLSPEC_HIDDEN;
extern POINT map_dpi_point( POINT pt, UINT dpi_from, UINT dpi_to ) DECLSPEC_HIDDEN;
extern POINT point_win_to_phys_dpi( HWND hwnd, POINT pt ) DECLSPEC_HIDDEN;
-extern POINT point_phys_to_win_dpi( HWND hwnd, POINT pt ) DECLSPEC_HIDDEN;
extern POINT point_win_to_thread_dpi( HWND hwnd, POINT pt ) DECLSPEC_HIDDEN;
extern RECT map_dpi_rect( RECT rect, UINT dpi_from, UINT dpi_to ) DECLSPEC_HIDDEN;
extern RECT rect_win_to_thread_dpi( HWND hwnd, RECT rect ) DECLSPEC_HIDDEN;
diff --git a/dlls/win32u/message.c b/dlls/win32u/message.c
index f5315ec5dd4..94a1bc71520 100644
--- a/dlls/win32u/message.c
+++ b/dlls/win32u/message.c
@@ -1602,7 +1602,7 @@ static BOOL process_hardware_message( MSG *msg, UINT hw_id, const struct hardwar
context = SetThreadDpiAwarenessContext( DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE );
if (msg->message == WM_INPUT || msg->message == WM_INPUT_DEVICE_CHANGE)
- ret = user_callbacks && user_callbacks->process_rawinput_message( msg, hw_id, msg_data );
+ ret = process_rawinput_message( msg, hw_id, msg_data );
else if (is_keyboard_message( msg->message ))
ret = process_keyboard_message( msg, hw_id, hwnd_filter, first, last, remove );
else if (is_mouse_message( msg->message ))
diff --git a/dlls/win32u/ntuser_private.h b/dlls/win32u/ntuser_private.h
index e8051ac39d3..fd644484e48 100644
--- a/dlls/win32u/ntuser_private.h
+++ b/dlls/win32u/ntuser_private.h
@@ -41,7 +41,7 @@ struct user_callbacks
void (CDECL *notify_ime)( HWND hwnd, UINT param );
BOOL (CDECL *post_dde_message)( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, DWORD dest_tid,
DWORD type );
- BOOL (CDECL *process_rawinput_message)( MSG *msg, UINT hw_id, const struct hardware_msg_data *msg_data );
+ void (CDECL *rawinput_update_device_list)(void);
BOOL (CDECL *rawinput_device_get_usages)(HANDLE handle, USHORT *usage_page, USHORT *usage);
void (WINAPI *set_standard_scroll_painted)( HWND hwnd, INT bar, BOOL visible );
BOOL (CDECL *unpack_dde_message)( HWND hwnd, UINT message, WPARAM *wparam, LPARAM *lparam,
diff --git a/dlls/win32u/rawinput.c b/dlls/win32u/rawinput.c
index d6f38382b4b..046e25ecf6a 100644
--- a/dlls/win32u/rawinput.c
+++ b/dlls/win32u/rawinput.c
@@ -334,3 +334,26 @@ UINT WINAPI NtUserGetRawInputData( HRAWINPUT rawinput, UINT command, void *data,
memcpy( data, thread_data->buffer, size );
return size;
}
+
+BOOL process_rawinput_message( MSG *msg, UINT hw_id, const struct hardware_msg_data *msg_data )
+{
+ struct rawinput_thread_data *thread_data;
+
+ if (!user_callbacks || !(thread_data = user_callbacks->get_rawinput_thread_data()))
+ return FALSE;
+
+ if (msg->message == WM_INPUT_DEVICE_CHANGE)
+ {
+ if (user_callbacks) user_callbacks->rawinput_update_device_list();
+ }
+ else
+ {
+ thread_data->buffer->header.dwSize = RAWINPUT_BUFFER_SIZE;
+ if (!rawinput_from_hardware_message( thread_data->buffer, msg_data )) return FALSE;
+ thread_data->hw_id = hw_id;
+ msg->lParam = (LPARAM)hw_id;
+ }
+
+ msg->pt = point_phys_to_win_dpi( msg->hwnd, msg->pt );
+ return TRUE;
+}
diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h
index b2d16b07d8e..406d71ab06d 100644
--- a/dlls/win32u/win32u_private.h
+++ b/dlls/win32u/win32u_private.h
@@ -30,6 +30,7 @@
#include "wine/gdi_driver.h"
#include "wine/unixlib.h"
#include "wine/debug.h"
+#include "wine/server.h"
extern const struct user_callbacks *user_callbacks DECLSPEC_HIDDEN;
@@ -437,6 +438,9 @@ extern LRESULT send_message( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
extern LRESULT send_message_timeout( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam,
UINT flags, UINT timeout, PDWORD_PTR res_ptr, BOOL ansi );
+/* rawinput.c */
+extern BOOL process_rawinput_message( MSG *msg, UINT hw_id, const struct hardware_msg_data *msg_data ) DECLSPEC_HIDDEN;
+
/* sysparams.c */
extern BOOL enable_thunk_lock DECLSPEC_HIDDEN;
extern DWORD process_layout DECLSPEC_HIDDEN;
--
GitLab
https://gitlab.winehq.org/wine/wine/-/merge_requests/271
June 18, 2022
[PATCH 0/4] MR271: win32u: Move rawinput APIs.
by Zebediah Figura (@zfigura)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/271
June 18, 2022
Re: HLSL offsetting
by Francisco Casas
Hello,
I attach a second version of the previous patch, now rebased into the
master branch.
I will start working on including the suggestions that Zebediah's made
in the other e-mails.
Besides those, I will also check if we can remove the "type" argument
from hlsl_new_load(), I think it can be deducted from the path and the
variable.
Best regards,
Francisco.
On 14-06-22 23:05, Francisco Casas wrote:
> Hello,
>
> On 13-06-22 11:59, Francisco Casas wrote:
>> Okay, I stopped working on multiple register offsets and now I am
>> working on this approach.
>>
>> I still think that adding a pass to translate these "route"s to the
>> original register "offset"s, so that we can implement this change
>> gradually, is good. We can move the pass forward as we change more
>> passes to work with component offsets. And we can debug more easily
>> the things that we don't translate correctly.
>>
>> I am aiming to implement the new approach until right after
>> split_matrix_copies, and put the translation afterwards. So far it
>> seems to be going nicely.
>>
>
> I attach a patch that achieves this, in case there are any opinions.
>
> The "paths"[1] of component indexes seem like the best way to solve the
> problem after all. I think that keeping them as an arrays of nodes in
> the hlsl_deref allows to write more uniform code than using a more
> complex data structure, as Giovanni mentioned.
>
> IMO, I think this patch manages matrices nicely too, but there is the
> problem that it is based on top of
> ---
> bb49bdba gmascellani vkd3d-shader/hlsl: Allow majority modifiers on
> function declarations.
> ---
> which is a little behind of master.
>
> So I still have to rebase it on top of current master, and in particular
> on top of the recent patches pertaining matrices. So I will probably
> have to make some design decisions while solving the conflicts.
>
> I guess that the main objective is that we don't want to deal with
> matrices at all after splitting matrix copies.
>
>
> Best regards,
> Francisco.
>
>
> ---
>
> [1] I hope that this is a better name than "route".
June 17, 2022