From: Esme Povirk esme@codeweavers.com
--- dlls/user32/tests/msg.c | 8 ++++---- dlls/win32u/window.c | 9 ++++++++- 2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index f7990270418..3fdf120c358 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -2009,7 +2009,7 @@ static const struct message WmSetRedrawTrueSeq[] = static const struct message WmEnableWindowSeq_1[] = { { WM_CANCELMODE, sent|wparam|lparam, 0, 0 }, - { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam|msg_todo, 0, 0 }, + { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, 0, 0 }, { HCBT_SETFOCUS, hook|optional }, { WM_KILLFOCUS, sent|optional }, { WM_ENABLE, sent|wparam|lparam, FALSE, 0 }, @@ -2025,7 +2025,7 @@ static const struct message WmEnableWindowSeq_2[] =
static const struct message WmEnableWindowSeq_3[] = { - { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam|msg_todo, 0, 0 }, + { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, 0, 0 }, { WM_ENABLE, sent|wparam|lparam, TRUE, 0 }, { 0 } }; @@ -15991,7 +15991,7 @@ static void test_dialog_messages(void) static void test_enddialog_seq(HWND dialog, HWND owner) { const struct message seq[] = { - { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam|msg_todo, 0, 0 }, + { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, 0, 0 }, { WM_ENABLE, sent }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, { HCBT_ACTIVATE, hook|wparam, (WPARAM)owner }, @@ -16019,7 +16019,7 @@ static void test_enddialog_seq(HWND dialog, HWND owner) static void test_enddialog_seq2(HWND dialog, HWND owner) { const struct message seq[] = { - { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam|msg_todo, 0, 0 }, + { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, 0, 0 }, { WM_ENABLE, parent|sent }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, { HCBT_ACTIVATE, hook|wparam, (WPARAM)owner }, diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index e5da6be30e0..4499e226a7b 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -825,7 +825,12 @@ BOOL enable_window( HWND hwnd, BOOL enable ) if (enable) { ret = (set_window_style( hwnd, 0, WS_DISABLED ) & WS_DISABLED) != 0; - if (ret) send_message( hwnd, WM_ENABLE, TRUE, 0 ); + if (ret) + { + NtUserNotifyWinEvent( EVENT_OBJECT_STATECHANGE, hwnd, OBJID_WINDOW, 0 ); + + send_message( hwnd, WM_ENABLE, TRUE, 0 ); + } } else { @@ -834,6 +839,8 @@ BOOL enable_window( HWND hwnd, BOOL enable ) ret = (set_window_style( hwnd, WS_DISABLED, 0 ) & WS_DISABLED) != 0; if (!ret) { + NtUserNotifyWinEvent( EVENT_OBJECT_STATECHANGE, hwnd, OBJID_WINDOW, 0 ); + if (hwnd == get_focus()) NtUserSetFocus( 0 ); /* A disabled window can't have the focus */
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=147178
Your paranoid android.
=== debian11 (32 bit ar:MA report) ===
user32: msg.c:6935: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got hook 0x0005 instead msg.c:6935: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got winevent_hook 0x0003 instead msg.c:6935: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got msg 0x030f instead msg.c:6935: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got msg 0x001c instead msg.c:6935: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got msg 0x0086 instead msg.c:6935: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got msg 0x0006 instead msg.c:6935: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got hook 0x0009 instead msg.c:6935: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got hook 0x0005 instead msg.c:6935: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got winevent_hook 0x0003 instead msg.c:6935: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got msg 0x030f instead msg.c:6935: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got msg 0x001c instead msg.c:6935: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got msg 0x0086 instead msg.c:6935: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got msg 0x0006 instead msg.c:6935: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got hook 0x0009 instead