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
January 2022
- 86 participants
- 2418 messages
[PATCH 2/6] mfmediaengine: Handle shutdown state in Play().
by Nikolay Sivov
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/mfmediaengine/main.c | 32 ++++++++++++++----------
dlls/mfmediaengine/tests/mfmediaengine.c | 1 -
2 files changed, 19 insertions(+), 14 deletions(-)
diff --git a/dlls/mfmediaengine/main.c b/dlls/mfmediaengine/main.c
index 99beb17e429..87851cee9c4 100644
--- a/dlls/mfmediaengine/main.c
+++ b/dlls/mfmediaengine/main.c
@@ -1784,31 +1784,37 @@ static HRESULT WINAPI media_engine_SetLoop(IMFMediaEngineEx *iface, BOOL loop)
static HRESULT WINAPI media_engine_Play(IMFMediaEngineEx *iface)
{
struct media_engine *engine = impl_from_IMFMediaEngineEx(iface);
+ HRESULT hr = S_OK;
TRACE("%p.\n", iface);
EnterCriticalSection(&engine->cs);
- IMFMediaEngineNotify_EventNotify(engine->callback, MF_MEDIA_ENGINE_EVENT_PURGEQUEUEDEVENTS, 0, 0);
-
- if (!(engine->flags & FLAGS_ENGINE_WAITING))
+ if (engine->flags & FLAGS_ENGINE_SHUT_DOWN)
+ hr = MF_E_SHUTDOWN;
+ else
{
- media_engine_set_flag(engine, FLAGS_ENGINE_PAUSED | FLAGS_ENGINE_IS_ENDED, FALSE);
- IMFMediaEngineNotify_EventNotify(engine->callback, MF_MEDIA_ENGINE_EVENT_PLAY, 0, 0);
+ IMFMediaEngineNotify_EventNotify(engine->callback, MF_MEDIA_ENGINE_EVENT_PURGEQUEUEDEVENTS, 0, 0);
- if (!(engine->flags & FLAGS_ENGINE_SOURCE_PENDING))
- media_engine_start_playback(engine);
- else
- media_engine_set_flag(engine, FLAGS_ENGINE_PLAY_PENDING, TRUE);
+ if (!(engine->flags & FLAGS_ENGINE_WAITING))
+ {
+ media_engine_set_flag(engine, FLAGS_ENGINE_PAUSED | FLAGS_ENGINE_IS_ENDED, FALSE);
+ IMFMediaEngineNotify_EventNotify(engine->callback, MF_MEDIA_ENGINE_EVENT_PLAY, 0, 0);
- media_engine_set_flag(engine, FLAGS_ENGINE_WAITING, TRUE);
- }
+ if (!(engine->flags & FLAGS_ENGINE_SOURCE_PENDING))
+ media_engine_start_playback(engine);
+ else
+ media_engine_set_flag(engine, FLAGS_ENGINE_PLAY_PENDING, TRUE);
- IMFMediaEngineNotify_EventNotify(engine->callback, MF_MEDIA_ENGINE_EVENT_WAITING, 0, 0);
+ media_engine_set_flag(engine, FLAGS_ENGINE_WAITING, TRUE);
+ }
+
+ IMFMediaEngineNotify_EventNotify(engine->callback, MF_MEDIA_ENGINE_EVENT_WAITING, 0, 0);
+ }
LeaveCriticalSection(&engine->cs);
- return S_OK;
+ return hr;
}
static HRESULT WINAPI media_engine_Pause(IMFMediaEngineEx *iface)
diff --git a/dlls/mfmediaengine/tests/mfmediaengine.c b/dlls/mfmediaengine/tests/mfmediaengine.c
index 6448e7f2169..ac34bd7c4cd 100644
--- a/dlls/mfmediaengine/tests/mfmediaengine.c
+++ b/dlls/mfmediaengine/tests/mfmediaengine.c
@@ -414,7 +414,6 @@ todo_wine
ok(!!state, "Unexpected state.\n");
hr = IMFMediaEngine_Play(media_engine);
-todo_wine
ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
hr = IMFMediaEngine_Pause(media_engine);
--
2.34.1
Jan. 28, 2022
[PATCH 1/6] mfmediaengine: Handle shutdown state in GetCurrentSource().
by Nikolay Sivov
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/mfmediaengine/main.c | 4 ++++
dlls/mfmediaengine/tests/mfmediaengine.c | 1 -
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/mfmediaengine/main.c b/dlls/mfmediaengine/main.c
index 5c00c10f718..99beb17e429 100644
--- a/dlls/mfmediaengine/main.c
+++ b/dlls/mfmediaengine/main.c
@@ -1464,11 +1464,15 @@ static HRESULT WINAPI media_engine_GetCurrentSource(IMFMediaEngineEx *iface, BST
*url = NULL;
EnterCriticalSection(&engine->cs);
+
+ if (engine->flags & FLAGS_ENGINE_SHUT_DOWN)
+ hr = MF_E_SHUTDOWN;
if (engine->current_source)
{
if (!(*url = SysAllocString(engine->current_source)))
hr = E_OUTOFMEMORY;
}
+
LeaveCriticalSection(&engine->cs);
return hr;
diff --git a/dlls/mfmediaengine/tests/mfmediaengine.c b/dlls/mfmediaengine/tests/mfmediaengine.c
index 8584554a2b6..6448e7f2169 100644
--- a/dlls/mfmediaengine/tests/mfmediaengine.c
+++ b/dlls/mfmediaengine/tests/mfmediaengine.c
@@ -319,7 +319,6 @@ static void test_Shutdown(void)
ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
hr = IMFMediaEngine_GetCurrentSource(media_engine, &str);
-todo_wine
ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
state = IMFMediaEngine_GetNetworkState(media_engine);
--
2.34.1
Jan. 28, 2022
[PATCH resend] user32: Send EVENT_OBJECT_FOCUS when the focus changes
by Alex Henrie
The NVDA screen reader needs this.
Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com>
---
dlls/user32/focus.c | 3 ++
dlls/user32/tests/msg.c | 104 ++++++++++++++++++++--------------------
2 files changed, 55 insertions(+), 52 deletions(-)
diff --git a/dlls/user32/focus.c b/dlls/user32/focus.c
index 34cc3880cc9..a20151ad5df 100644
--- a/dlls/user32/focus.c
+++ b/dlls/user32/focus.c
@@ -73,6 +73,9 @@ static HWND set_focus_window( HWND hwnd )
if (ime_default)
SendMessageW( ime_default, WM_IME_INTERNAL, IME_INTERNAL_ACTIVATE, (LPARAM)hwnd );
+ if (previous)
+ NotifyWinEvent( EVENT_OBJECT_FOCUS, hwnd, OBJID_CLIENT, 0 );
+
SendMessageW( hwnd, WM_SETFOCUS, (WPARAM)previous, 0 );
}
return previous;
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
index 870c38b106c..90816a9df52 100644
--- a/dlls/user32/tests/msg.c
+++ b/dlls/user32/tests/msg.c
@@ -389,13 +389,13 @@ static const struct message WmSwitchNotMaximizedChild[] = {
{ WM_KILLFOCUS, sent|defwinproc }, /* in the 1st MDI child */
{ WM_IME_SETCONTEXT, sent|defwinproc|optional }, /* in the 1st MDI child */
{ WM_IME_SETCONTEXT, sent|optional }, /* in the MDI client */
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent, 0 }, /* in the MDI client */
{ HCBT_SETFOCUS, hook },
{ WM_KILLFOCUS, sent }, /* in the MDI client */
{ WM_IME_SETCONTEXT, sent|optional }, /* in the MDI client */
{ WM_IME_SETCONTEXT, sent|defwinproc|optional }, /* in the 1st MDI child */
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|defwinproc }, /* in the 2nd MDI child */
{ WM_MDIACTIVATE, sent|defwinproc }, /* in the 2nd MDI child */
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE}, /* in the 2nd MDI child */
@@ -917,7 +917,7 @@ static const struct message WmShowRestoreMinimizedOverlappedSeq[] =
{ WM_GETTEXT, sent|defwinproc|optional },
{ WM_ACTIVATE, sent|wparam, WA_ACTIVE },
{ HCBT_SETFOCUS, hook },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|defwinproc },
{ WM_NCPAINT, sent },
{ WM_GETTEXT, sent|defwinproc|optional },
@@ -1012,7 +1012,7 @@ static const struct message WmShowRestoreActiveMinimizedOverlappedSeq[] =
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, /* Win7 seems to send this twice. */
{ EVENT_SYSTEM_MINIMIZEEND, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 },
{ HCBT_SETFOCUS, hook },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent },
/* Note this WM_ACTIVATE message even if the window is already active */
{ WM_ACTIVATE, sent|wparam|lparam, WA_ACTIVE, 0 },
@@ -1111,7 +1111,7 @@ static const struct message WmShowVisiblePopupSeq_3[] = {
{ WM_IME_SETCONTEXT, sent|parent|wparam|optional, 0 },
{ WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 },
{ WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|defwinproc },
{ WM_GETTEXT, sent|optional },
{ WM_WINDOWPOSCHANGED, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE, 0, SWP_SHOWWINDOW },
@@ -1615,7 +1615,7 @@ static const struct message WmDestroyChildSeq[] = {
{ WM_KILLFOCUS, sent },
{ WM_IME_SETCONTEXT, sent|wparam|optional, 0 },
{ WM_IME_SETCONTEXT, sent|wparam|parent|optional, 1 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|parent },
{ EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 },
{ WM_DESTROY, sent },
@@ -1691,7 +1691,7 @@ static const struct message WmCreateCustomDialogSeq[] = {
{ WM_IME_SETCONTEXT, sent|parent|wparam|optional, 0 },
{ WM_IME_SETCONTEXT, sent|wparam|optional, 1 },
{ WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent },
{ WM_GETDLGCODE, sent|defwinproc|wparam, 0 },
{ WM_NCPAINT, sent|wparam, 1 },
@@ -1734,7 +1734,7 @@ static const struct message WmEndCustomDialogSeq[] = {
{ WM_IME_SETCONTEXT, sent|wparam|optional, 0 },
{ WM_IME_SETCONTEXT, sent|parent|wparam|defwinproc|optional, 1 },
{ WM_IME_NOTIFY, sent|wparam|optional, 1 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|parent|defwinproc },
{ 0 }
};
@@ -1758,7 +1758,7 @@ static const struct message WmShowCustomDialogSeq[] = {
{ WM_IME_SETCONTEXT, sent|parent|wparam|optional, 0 },
{ WM_IME_SETCONTEXT, sent|wparam|optional, 1 },
{ WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent },
{ WM_GETDLGCODE, sent|defwinproc|wparam, 0 },
{ WM_NCPAINT, sent|wparam, 1 },
@@ -1771,7 +1771,7 @@ static const struct message WmShowCustomDialogSeq[] = {
static const struct message WmModalDialogSeq[] = {
{ WM_CANCELMODE, sent|parent },
{ HCBT_SETFOCUS, hook },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_KILLFOCUS, sent|parent },
{ WM_IME_SETCONTEXT, sent|parent|wparam|optional, 0 },
{ EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 },
@@ -1844,7 +1844,7 @@ static const struct message WmModalDialogSeq[] = {
{ WM_WINDOWPOSCHANGED, sent|optional },
{ HCBT_SETFOCUS, hook },
{ WM_IME_SETCONTEXT, sent|parent|wparam|defwinproc|optional, 1 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|parent|defwinproc },
{ EVENT_SYSTEM_DIALOGEND, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 },
{ HCBT_DESTROYWND, hook },
@@ -1857,7 +1857,7 @@ static const struct message WmModalDialogSeq[] = {
static const struct message WmModalDialogSeq_2[] = {
{ WM_CANCELMODE, sent },
{ HCBT_SETFOCUS, hook },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_KILLFOCUS, sent },
{ WM_IME_SETCONTEXT, sent|parent|wparam|optional, 0 },
{ EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 },
@@ -2151,7 +2151,7 @@ static const struct message WmTrackPopupMenuMinimizeWindow[] = {
{ WM_ENTERIDLE, sent|wparam, 2 },
{ HCBT_MINMAX, hook },
{ HCBT_SETFOCUS, hook },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_KILLFOCUS, sent|wparam, 0 },
{ WM_GETTEXT, sent|optional },
{ WM_WINDOWPOSCHANGING, sent },
@@ -3056,7 +3056,7 @@ static const struct message WmCreateMDIchildVisibleSeq[] = {
{ WM_KILLFOCUS, sent }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|defwinproc },
{ WM_MDIACTIVATE, sent|defwinproc },
{ 0 }
@@ -3077,11 +3077,11 @@ static const struct message WmChildActivateWindowSeq[] = {
{ WM_NCACTIVATE, sent|wparam|defwinproc, 1 },
{ HCBT_SETFOCUS, hook },
{ WM_KILLFOCUS, sent|defwinproc },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent },
{ HCBT_SETFOCUS, hook },
{ WM_KILLFOCUS, sent },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|defwinproc },
{ WM_MDIACTIVATE, sent|defwinproc },
{ 0 }
@@ -3116,7 +3116,7 @@ static const struct message WmCreateMDIchildInvisibleParentSeq[] = {
{ WM_KILLFOCUS, sent }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|defwinproc },
{ WM_MDIACTIVATE, sent|defwinproc },
{ 0 }
@@ -3145,14 +3145,14 @@ static const struct message WmDestroyMDIchildVisibleSeq[] = {
{ WM_KILLFOCUS, sent },
{ WM_IME_SETCONTEXT, sent|wparam|optional, 0 },
{ WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent }, /* in MDI client */
{ HCBT_SETFOCUS, hook }, /* MDI client sets focus back to MDI child */
{ WM_KILLFOCUS, sent }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|optional, 1 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent }, /* in MDI client */
{ EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 },
@@ -3161,14 +3161,14 @@ static const struct message WmDestroyMDIchildVisibleSeq[] = {
{ WM_KILLFOCUS, sent },
{ WM_IME_SETCONTEXT, sent|wparam|optional, 0 },
{ WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent }, /* in MDI client */
{ HCBT_SETFOCUS, hook }, /* MDI client sets focus back to MDI child */
{ WM_KILLFOCUS, sent }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|optional, 1 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent }, /* in MDI client */
{ WM_DESTROY, sent },
@@ -3177,14 +3177,14 @@ static const struct message WmDestroyMDIchildVisibleSeq[] = {
{ WM_KILLFOCUS, sent },
{ WM_IME_SETCONTEXT, sent|wparam|optional, 0 },
{ WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent }, /* in MDI client */
{ HCBT_SETFOCUS, hook }, /* MDI client sets focus back to MDI child */
{ WM_KILLFOCUS, sent }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|optional, 1 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent }, /* in MDI client */
{ WM_NCDESTROY, sent },
@@ -3266,13 +3266,13 @@ static const struct message WmCreateMDIchildVisibleMaxSeq1[] = {
{ HCBT_SETFOCUS, hook|optional }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */
{ WM_IME_NOTIFY, sent|wparam|optional, 2 }, /* in MDI client */
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|optional }, /* in MDI client */
{ HCBT_SETFOCUS, hook|optional },
{ WM_KILLFOCUS, sent|optional }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|defwinproc|optional },
{ WM_MDIACTIVATE, sent|defwinproc|optional },
/* in MDI frame */
@@ -3346,13 +3346,13 @@ static const struct message WmCreateMDIchildVisibleMaxSeq2[] = {
{ WM_KILLFOCUS, sent|defwinproc|optional }, /* in the 1st MDI child */
{ WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 0 }, /* in the 1st MDI child */
{ WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent }, /* in MDI client */
{ HCBT_SETFOCUS, hook },
{ WM_KILLFOCUS, sent }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|defwinproc },
{ WM_MDIACTIVATE, sent|defwinproc },
@@ -3418,7 +3418,7 @@ static const struct message WmCreateMDIchildVisibleMaxSeq3[] = {
{ WM_KILLFOCUS, sent }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|defwinproc },
{ WM_MDIACTIVATE, sent|defwinproc },
@@ -3557,13 +3557,13 @@ static const struct message WmDestroyMDIchildVisibleMaxSeq2[] = {
{ WM_KILLFOCUS, sent|defwinproc },
{ WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 0 },
{ WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent }, /* in MDI client */
{ HCBT_SETFOCUS, hook },
{ WM_KILLFOCUS, sent }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|defwinproc },
{ WM_MDIACTIVATE, sent|defwinproc },
{ WM_WINDOWPOSCHANGED, sent|wparam|defwinproc, SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
@@ -3607,13 +3607,13 @@ static const struct message WmDestroyMDIchildVisibleMaxSeq1[] = {
{ WM_KILLFOCUS, sent },
{ WM_IME_SETCONTEXT, sent|wparam|optional, 0 },
{ WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent }, /* in MDI client */
{ HCBT_SETFOCUS, hook },
{ WM_KILLFOCUS, sent }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|optional, 1 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent },
/* in MDI child */
@@ -3739,7 +3739,7 @@ static const struct message WmDestroyMDIchildVisibleMaxSeq1[] = {
{ WM_KILLFOCUS, sent },
{ WM_IME_SETCONTEXT, sent|wparam|optional, 0 },
{ WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent }, /* in MDI client */
{ WM_MDIREFRESHMENU, sent }, /* in MDI client */
@@ -3783,7 +3783,7 @@ static const struct message WmMaximizeMDIchildInvisibleSeq[] = {
{ WM_KILLFOCUS, sent|optional }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|optional|defwinproc },
{ WM_MDIACTIVATE, sent|optional|defwinproc },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOMOVE|SWP_NOCLIENTMOVE|SWP_STATECHANGED },
@@ -3816,7 +3816,7 @@ static const struct message WmMaximizeMDIchildInvisibleSeq2[] = {
{ WM_KILLFOCUS, sent|optional }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|defwinproc|optional },
{ WM_MDIACTIVATE, sent|defwinproc|optional },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE, 0, SWP_STATECHANGED /* w1064v1809 */ },
@@ -5323,7 +5323,7 @@ static const struct message WmZOrder[] = {
{ HCBT_SETFOCUS, hook },
{ WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 },
{ WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|wparam|defwinproc, 0 },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ WM_GETTEXT, sent|optional },
@@ -7283,7 +7283,7 @@ static const struct message auto_radio_button_VK_DOWN_dialog[] =
{ WM_KILLFOCUS, sent, 0, 0 },
{ WM_CTLCOLORSTATIC, sent|parent },
{ WM_COMMAND, sent|wparam|parent, MAKEWPARAM(ID_RADIO3, BN_KILLFOCUS) },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent, 0, 0 },
{ WM_CTLCOLORSTATIC, sent|parent },
{ WM_COMMAND, sent|wparam|parent, MAKEWPARAM(ID_RADIO1, BN_SETFOCUS) },
@@ -11928,7 +11928,7 @@ static const struct message sl_edit_invisible[] =
{ WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 },
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 }, /* Sent for IME. */
{ WM_KILLFOCUS, sent|parent },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent },
{ EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CARET, 0 },
{ EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CARET, 0 },
@@ -14284,7 +14284,7 @@ static const struct message WmCreateDialogParamSeq_4[] = {
{ WM_NCACTIVATE, sent|parent },
{ WM_ACTIVATE, sent|parent|wparam, 1 },
{ HCBT_SETFOCUS, hook },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|parent },
{ WM_KILLFOCUS, sent|parent },
{ WM_SETFOCUS, sent },
@@ -14483,7 +14483,7 @@ static void test_enddialog_seq(HWND dialog, HWND owner)
{ WM_ACTIVATE, sent|wparam|lparam, WA_ACTIVE, (LPARAM)dialog },
{ HCBT_SETFOCUS, hook|wparam, (WPARAM)owner },
{ WM_KILLFOCUS, sent|wparam, (WPARAM)owner },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|defwinproc|wparam, (WPARAM)dialog },
{ 0 }
};
@@ -14507,7 +14507,7 @@ static void test_enddialog_seq2(HWND dialog, HWND owner)
{ WM_WINDOWPOSCHANGING, sent|optional|wparam, SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE },
{ HCBT_SETFOCUS, hook|wparam, (WPARAM)owner },
{ WM_KILLFOCUS, sent|wparam, (WPARAM)owner },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|parent|defwinproc|wparam, (WPARAM)dialog },
{ 0 }
};
@@ -14704,7 +14704,7 @@ static const struct message SetActiveWindowSeq2[] =
{ WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 },
{ WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 1 },
{ WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|defwinproc },
{ WM_GETTEXT, sent|optional },
{ 0 }
@@ -14727,7 +14727,7 @@ static const struct message SetActiveWindowSeq3[] =
{ HCBT_SETFOCUS, hook },
{ WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 },
{ WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|defwinproc },
{ 0 }
};
@@ -14753,7 +14753,7 @@ static const struct message SetActiveWindowSeq4[] =
{ WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 },
{ WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 1 },
{ WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|defwinproc },
{ 0 }
};
@@ -15313,7 +15313,7 @@ static const struct message wm_lb_click_0[] =
{ WM_KILLFOCUS, sent|parent },
{ WM_IME_SETCONTEXT, sent|wparam|optional|parent, 0 },
{ WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|defwinproc },
{ WM_DRAWITEM, sent|wparam|lparam|parent, ID_LISTBOX, 0x001142f2 },
@@ -16086,7 +16086,7 @@ static const struct message WmRestoreMinimizedOverlappedSeq[] =
{ WM_GETTEXT, sent|defwinproc|optional },
{ WM_ACTIVATE, sent|wparam, TRUE },
{ HCBT_SETFOCUS, hook },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|defwinproc },
{ WM_NCPAINT, sent },
{ WM_GETTEXT, sent|defwinproc|optional },
@@ -16139,7 +16139,7 @@ static const struct message WmRestoreActiveMinimizedOverlappedSeq[] =
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, /* Win7 seems to send this twice. */
{ EVENT_SYSTEM_MINIMIZEEND, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 },
{ HCBT_SETFOCUS, hook },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent },
/* Note this WM_ACTIVATE messages even if the window is already active */
{ WM_ACTIVATE, sent|wparam|lparam, WA_ACTIVE, 0 },
@@ -17097,7 +17097,7 @@ static const struct message WmSetParentSeq_2[] = {
{ WM_NCACTIVATE, sent|wparam|optional, 0 },
{ WM_ACTIVATE, sent|wparam|optional, 0 },
{ WM_ACTIVATEAPP, sent|wparam|optional, 0 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_KILLFOCUS, sent|wparam, 0 },
{ EVENT_OBJECT_PARENTCHANGE, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 },
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOSIZE },
@@ -17764,17 +17764,17 @@ static const struct message WmSetFocus_1[] = {
{ WM_GETTEXT, sent|defwinproc|parent|optional },
{ WM_ACTIVATE, sent|wparam|parent, 1 },
{ HCBT_SETFOCUS, hook }, /* parent */
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|defwinproc|parent },
{ WM_KILLFOCUS, sent|parent },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent },
{ 0 }
};
static const struct message WmSetFocus_2[] = {
{ HCBT_SETFOCUS, hook }, /* parent */
{ WM_KILLFOCUS, sent },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|parent },
{ 0 }
};
@@ -18625,7 +18625,7 @@ static const struct message WmRestoreMinimizedSeq[] =
{ WM_NCPAINT, sent|wparam|defwinproc|optional, 1 },
{ WM_ERASEBKGND, sent|defwinproc|optional },
{ HCBT_SETFOCUS, hook },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|defwinproc },
{ WM_ACTIVATE, sent|wparam|defwinproc, 1 },
{ WM_PAINT, sent| optional },
--
2.35.0
Jan. 28, 2022
Re: [RFC PATCH v3 4/5] ntdll: Don't call try_recv before server call in sock_recv.
by Marvin
Hi,
While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=106284
Your paranoid android.
=== debian11 (64 bit WoW report) ===
ws2_32:
sock.c:5267: Test failed: expected timeout
Jan. 28, 2022
Re: [PATCH] Increased winsock2 maximum sockets
by Andrew Miskell
I’ve also submitted a similar patch today to increase the value to 256 from 128 (https://www.winehq.org/pipermail/wine-devel/2022-January/205853.html)
My specific reason is documented in bug 50352 (https://bugs.winehq.org/show_bug.cgi?id=50352)
TWGS (TradeWars Game Server) supports a maximum of 100 concurrent users. Each user takes 2 sockets along with a dedicated admin user. This mean a minimum of 202 sockets need to be opened in order to support all 100 users + 1 admin.
I’d be in favor of applying this patch over mine to increase the value to 32767 which should resolve this for just about any application. ReactOS already does something similar with it’s socket.c as well (https://github.com/reactos/reactos/search?q=iMaxSockets)
Jan. 28, 2022
[RFC PATCH v3 5/5] server: Replace redundant recv_socket status fields with force_async boolean field.
by Jinoh Kang
The 'status' field of recv_socket_request is always either
STATUS_PENDING or STATUS_DEVICE_NOT_READY, and the 'total' field is
always zero.
Replace the 'status' field with 'force_async' boolean field, and get rid
of the 'total' field entirely.
Also, clean up the recv_socket handler code a bit.
Signed-off-by: Jinoh Kang <jinoh.kang.kr(a)gmail.com>
---
dlls/ntdll/unix/socket.c | 7 ++-----
server/protocol.def | 3 +--
server/sock.c | 23 +++++++++--------------
3 files changed, 12 insertions(+), 21 deletions(-)
diff --git a/dlls/ntdll/unix/socket.c b/dlls/ntdll/unix/socket.c
index a46e84616ec..c6ab6c7646b 100644
--- a/dlls/ntdll/unix/socket.c
+++ b/dlls/ntdll/unix/socket.c
@@ -737,13 +737,9 @@ static NTSTATUS sock_recv( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, voi
}
}
- status = force_async ? STATUS_PENDING : STATUS_DEVICE_NOT_READY;
- information = 0;
-
SERVER_START_REQ( recv_socket )
{
- req->status = status;
- req->total = information;
+ req->force_async = force_async;
req->async = server_async( handle, &async->io, event, apc, apc_user, iosb_client_ptr(io) );
req->oob = !!(unix_flags & MSG_OOB);
status = wine_server_call( req );
@@ -753,6 +749,7 @@ static NTSTATUS sock_recv( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, voi
}
SERVER_END_REQ;
+ information = 0;
alerted = status == STATUS_ALERTED;
if (alerted)
{
diff --git a/server/protocol.def b/server/protocol.def
index 72a7f4a85b5..2de8bcd0a50 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -1451,8 +1451,7 @@ enum server_fd_type
@REQ(recv_socket)
int oob; /* are we receiving OOB data? */
async_data_t async; /* async I/O parameters */
- unsigned int status; /* status of initial call */
- unsigned int total; /* number of bytes already read */
+ int force_async; /* Force asynchronous mode? */
@REPLY
obj_handle_t wait; /* handle to wait on for blocking recv */
unsigned int options; /* device open options */
diff --git a/server/sock.c b/server/sock.c
index 14d95451420..fbf76870a51 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -3396,8 +3396,8 @@ struct object *create_socket_device( struct object *root, const struct unicode_s
DECL_HANDLER(recv_socket)
{
struct sock *sock = (struct sock *)get_handle_obj( current->process, req->async.handle, 0, &sock_ops );
- unsigned int status = req->status;
- int pending = 0;
+ unsigned int status = STATUS_PENDING;
+ int pending = req->force_async;
timeout_t timeout = 0;
struct async *async;
struct fd *fd;
@@ -3405,8 +3405,8 @@ DECL_HANDLER(recv_socket)
if (!sock) return;
fd = sock->fd;
- /* recv() returned EWOULDBLOCK, i.e. no data available yet */
- if (status == STATUS_DEVICE_NOT_READY && !sock->nonblocking)
+ /* Synchronous, *blocking* I/O requested? */
+ if (!req->force_async && !sock->nonblocking)
{
/* Set a timeout on the async if necessary.
*
@@ -3417,16 +3417,16 @@ DECL_HANDLER(recv_socket)
if (is_fd_overlapped( fd ))
timeout = (timeout_t)sock->rcvtimeo * -10000;
- status = STATUS_PENDING;
+ pending = 1;
}
- if ((status == STATUS_PENDING || status == STATUS_DEVICE_NOT_READY) && sock->rd_shutdown)
+ if (status == STATUS_PENDING && sock->rd_shutdown)
status = STATUS_PIPE_DISCONNECTED;
/* NOTE: If read_q is not empty, we cannot really tell if the already queued asyncs
* NOTE: will not consume all available data; if there's no data available,
* NOTE: the current request won't be immediately satiable. */
- if ((status == STATUS_PENDING || status == STATUS_DEVICE_NOT_READY) && !async_queued( &sock->read_q ))
+ if (status == STATUS_PENDING && !async_queued( &sock->read_q ))
{
struct pollfd pollfd;
pollfd.fd = get_unix_fd( sock->fd );
@@ -3437,22 +3437,17 @@ DECL_HANDLER(recv_socket)
/* Give the client opportunity to complete synchronously.
* If it turns out that the I/O request is not actually immediately satiable,
* the client may then choose to re-queue the async (with STATUS_PENDING). */
- pending = status == STATUS_PENDING;
status = STATUS_ALERTED;
}
}
+ if (!pending && status == STATUS_PENDING) status = STATUS_DEVICE_NOT_READY;
+
sock->pending_events &= ~(req->oob ? AFD_POLL_OOB : AFD_POLL_READ);
sock->reported_events &= ~(req->oob ? AFD_POLL_OOB : AFD_POLL_READ);
if ((async = create_request_async( fd, get_fd_comp_flags( fd ), &req->async )))
{
- if (status == STATUS_SUCCESS)
- {
- struct iosb *iosb = async_get_iosb( async );
- iosb->result = req->total;
- release_object( iosb );
- }
set_error( status );
if (timeout)
--
2.34.1
Jan. 28, 2022
[RFC PATCH v3 4/5] ntdll: Don't call try_recv before server call in sock_recv.
by Jinoh Kang
Otherwise, try_recv() call from sock_recv() may race against try_recv()
call from async_recv_proc(), shuffling the packet order.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52401
Signed-off-by: Jinoh Kang <jinoh.kang.kr(a)gmail.com>
---
dlls/ntdll/unix/socket.c | 12 ++----------
dlls/ws2_32/tests/sock.c | 8 ++++----
2 files changed, 6 insertions(+), 14 deletions(-)
diff --git a/dlls/ntdll/unix/socket.c b/dlls/ntdll/unix/socket.c
index 336f655e19e..a46e84616ec 100644
--- a/dlls/ntdll/unix/socket.c
+++ b/dlls/ntdll/unix/socket.c
@@ -737,16 +737,8 @@ static NTSTATUS sock_recv( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, voi
}
}
- status = try_recv( fd, async, &information );
-
- if (status != STATUS_SUCCESS && status != STATUS_BUFFER_OVERFLOW && status != STATUS_DEVICE_NOT_READY)
- {
- release_fileio( &async->io );
- return status;
- }
-
- if (status == STATUS_DEVICE_NOT_READY && force_async)
- status = STATUS_PENDING;
+ status = force_async ? STATUS_PENDING : STATUS_DEVICE_NOT_READY;
+ information = 0;
SERVER_START_REQ( recv_socket )
{
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index 054e597b719..4199676f460 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -7750,8 +7750,8 @@ static void test_shutdown(void)
WSASetLastError(0xdeadbeef);
ret = recv(server, buffer, sizeof(buffer), 0);
- todo_wine ok(ret == -1, "got %d\n", ret);
- todo_wine ok(WSAGetLastError() == WSAESHUTDOWN, "got error %u\n", WSAGetLastError());
+ ok(ret == -1, "got %d\n", ret);
+ ok(WSAGetLastError() == WSAESHUTDOWN, "got error %u\n", WSAGetLastError());
ret = send(server, "test", 5, 0);
ok(ret == 5, "got %d\n", ret);
@@ -7845,8 +7845,8 @@ static void test_shutdown(void)
WSASetLastError(0xdeadbeef);
ret = recv(server, buffer, sizeof(buffer), 0);
- todo_wine ok(ret == -1, "got %d\n", ret);
- todo_wine ok(WSAGetLastError() == WSAESHUTDOWN, "got error %u\n", WSAGetLastError());
+ ok(ret == -1, "got %d\n", ret);
+ ok(WSAGetLastError() == WSAESHUTDOWN, "got error %u\n", WSAGetLastError());
WSASetLastError(0xdeadbeef);
ret = send(server, "test", 5, 0);
--
2.34.1
Jan. 28, 2022
[RFC PATCH v3 3/5] server: Attempt to complete I/O request immediately in recv_socket.
by Jinoh Kang
Make recv_socket alert the async immediately if poll() call detects that
there are incoming data in the socket, bypassing the wineserver's main
polling loop.
Signed-off-by: Jinoh Kang <jinoh.kang.kr(a)gmail.com>
---
dlls/ntdll/unix/socket.c | 22 ++++++++++++++++++----
dlls/ntdll/unix/sync.c | 22 ++++++++++++++++++++++
dlls/ntdll/unix/unix_private.h | 1 +
server/protocol.def | 1 +
server/sock.c | 23 ++++++++++++++++++++++-
5 files changed, 64 insertions(+), 5 deletions(-)
diff --git a/dlls/ntdll/unix/socket.c b/dlls/ntdll/unix/socket.c
index 71dfcdd1114..336f655e19e 100644
--- a/dlls/ntdll/unix/socket.c
+++ b/dlls/ntdll/unix/socket.c
@@ -686,6 +686,7 @@ static NTSTATUS sock_recv( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, voi
NTSTATUS status;
unsigned int i;
ULONG options;
+ BOOL may_restart, alerted;
if (unix_flags & MSG_OOB)
{
@@ -756,16 +757,29 @@ static NTSTATUS sock_recv( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, voi
status = wine_server_call( req );
wait_handle = wine_server_ptr_handle( reply->wait );
options = reply->options;
- if ((!NT_ERROR(status) || wait_handle) && status != STATUS_PENDING)
+ may_restart = reply->may_restart;
+ }
+ SERVER_END_REQ;
+
+ alerted = status == STATUS_ALERTED;
+ if (alerted)
+ {
+ status = try_recv( fd, async, &information );
+ if (status == STATUS_DEVICE_NOT_READY && may_restart)
+ status = STATUS_PENDING;
+ }
+
+ if (status != STATUS_PENDING)
+ {
+ if (!NT_ERROR(status) || wait_handle)
{
io->Status = status;
io->Information = information;
}
+ release_fileio( &async->io );
}
- SERVER_END_REQ;
-
- if (status != STATUS_PENDING) release_fileio( &async->io );
+ if (alerted) status = notify_async( &wait_handle, status, information );
if (wait_handle) status = wait_async( wait_handle, options & FILE_SYNCHRONOUS_IO_ALERT );
return status;
}
diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c
index 442243d8bcf..4cb30479322 100644
--- a/dlls/ntdll/unix/sync.c
+++ b/dlls/ntdll/unix/sync.c
@@ -2510,3 +2510,25 @@ NTSTATUS WINAPI NtWaitForAlertByThreadId( const void *address, const LARGE_INTEG
}
#endif
+
+/* Notify direct completion of async and close the wait handle if it is no longer needed.
+ * This function is a no-op (returns status as-is) if the supplied handle is NULL.
+ */
+NTSTATUS notify_async( HANDLE *optional_handle, NTSTATUS status, ULONG_PTR information )
+{
+ NTSTATUS ret;
+
+ if (!*optional_handle) return status;
+
+ SERVER_START_REQ( notify_async_direct_result )
+ {
+ req->handle = wine_server_obj_handle( *optional_handle );
+ req->status = status;
+ req->information = information;
+ ret = wine_server_call( req );
+ *optional_handle = wine_server_ptr_handle( reply->handle );
+ }
+ SERVER_END_REQ;
+
+ return ret;
+}
diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
index a79edabc37c..e8e158b5591 100644
--- a/dlls/ntdll/unix/unix_private.h
+++ b/dlls/ntdll/unix/unix_private.h
@@ -274,6 +274,7 @@ extern NTSTATUS get_device_info( int fd, struct _FILE_FS_DEVICE_INFORMATION *inf
extern void init_files(void) DECLSPEC_HIDDEN;
extern void init_cpu_info(void) DECLSPEC_HIDDEN;
extern void add_completion( HANDLE handle, ULONG_PTR value, NTSTATUS status, ULONG info, BOOL async ) DECLSPEC_HIDDEN;
+extern NTSTATUS notify_async( HANDLE *optional_handle, NTSTATUS status, ULONG_PTR information );
extern void dbg_init(void) DECLSPEC_HIDDEN;
diff --git a/server/protocol.def b/server/protocol.def
index 2c3b8dbc619..72a7f4a85b5 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -1456,6 +1456,7 @@ enum server_fd_type
@REPLY
obj_handle_t wait; /* handle to wait on for blocking recv */
unsigned int options; /* device open options */
+ int may_restart; /* May restart async? */
@END
diff --git a/server/sock.c b/server/sock.c
index 40fb0cac535..14d95451420 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -3397,6 +3397,7 @@ DECL_HANDLER(recv_socket)
{
struct sock *sock = (struct sock *)get_handle_obj( current->process, req->async.handle, 0, &sock_ops );
unsigned int status = req->status;
+ int pending = 0;
timeout_t timeout = 0;
struct async *async;
struct fd *fd;
@@ -3422,6 +3423,25 @@ DECL_HANDLER(recv_socket)
if ((status == STATUS_PENDING || status == STATUS_DEVICE_NOT_READY) && sock->rd_shutdown)
status = STATUS_PIPE_DISCONNECTED;
+ /* NOTE: If read_q is not empty, we cannot really tell if the already queued asyncs
+ * NOTE: will not consume all available data; if there's no data available,
+ * NOTE: the current request won't be immediately satiable. */
+ if ((status == STATUS_PENDING || status == STATUS_DEVICE_NOT_READY) && !async_queued( &sock->read_q ))
+ {
+ struct pollfd pollfd;
+ pollfd.fd = get_unix_fd( sock->fd );
+ pollfd.events = req->oob ? POLLPRI : POLLIN;
+ pollfd.revents = 0;
+ if (poll(&pollfd, 1, 0) >= 0 && pollfd.revents)
+ {
+ /* Give the client opportunity to complete synchronously.
+ * If it turns out that the I/O request is not actually immediately satiable,
+ * the client may then choose to re-queue the async (with STATUS_PENDING). */
+ pending = status == STATUS_PENDING;
+ status = STATUS_ALERTED;
+ }
+ }
+
sock->pending_events &= ~(req->oob ? AFD_POLL_OOB : AFD_POLL_READ);
sock->reported_events &= ~(req->oob ? AFD_POLL_OOB : AFD_POLL_READ);
@@ -3438,7 +3458,7 @@ DECL_HANDLER(recv_socket)
if (timeout)
async_set_timeout( async, timeout, STATUS_IO_TIMEOUT );
- if (status == STATUS_PENDING)
+ if (status == STATUS_PENDING || status == STATUS_ALERTED)
queue_async( &sock->read_q, async );
/* always reselect; we changed reported_events above */
@@ -3446,6 +3466,7 @@ DECL_HANDLER(recv_socket)
reply->wait = async_handoff( async, NULL, 0 );
reply->options = get_fd_options( fd );
+ reply->may_restart = pending && status == STATUS_ALERTED;
release_object( async );
}
release_object( sock );
--
2.34.1
Jan. 28, 2022
[RFC PATCH v3 2/5] server: Add a new server request "notify_async_direct_result."
by Jinoh Kang
Some I/O operations need a way to "queue" the async to the target object
first, even if the operation itself is to be completed synchronously.
After synchronous completion, it needs a way to notify the
IO_STATUS_BLOCK values back to the server.
Add a new wineserver request, "notify_async_direct_result", which
notifies direct (i.e. synchronous) completion of async from the same
thread.
Signed-off-by: Jinoh Kang <jinoh.kang.kr(a)gmail.com>
---
Notes:
v1 -> v2: dequeue async after failed completion
v2 -> v3: rewrite handling of pending/failed asyncs.
server/async.c | 61 +++++++++++++++++++++++++++++++++++++++++++++
server/protocol.def | 10 ++++++++
2 files changed, 71 insertions(+)
diff --git a/server/async.c b/server/async.c
index e169bb23225..9f063283b8c 100644
--- a/server/async.c
+++ b/server/async.c
@@ -752,3 +752,64 @@ DECL_HANDLER(get_async_result)
}
set_error( iosb->status );
}
+
+/* Notify direct completion of async and close the wait handle */
+DECL_HANDLER(notify_async_direct_result)
+{
+ struct async *async = (struct async *)get_handle_obj( current->process, req->handle, 0, &async_ops );
+
+ if (!async) return;
+
+ if (async->iosb && async->unknown_status && !async->pending &&
+ async->terminated && async->alerted)
+ {
+ /* async->terminated is 1, so async_terminate() won't do anything.
+ * We need to set the status and result for ourselves.
+ */
+ async->iosb->status = req->status;
+ async->iosb->result = req->information;
+
+ /* Set status for async_handoff(). */
+ set_error( async->iosb->status );
+
+ /* The async_handoff() call prior to the current server request was
+ * effectively a no-op since async->unknown_status is 1. Calling it
+ * again with async->unknown_status = 0 will do the remaining steps.
+ *
+ * NOTE: async_handoff() is being called with async->terminated = 1.
+ */
+ async->unknown_status = 0;
+ async_handoff( async, NULL, 0 );
+
+ /* If the I/O has completed successfully, the client would have already
+ * set the IOSB. Therefore, we can skip waiting on wait_handle and do
+ * async_set_result() directly.
+ */
+ async_set_result( &async->obj, async->iosb->status, async->iosb->result );
+
+ /* Close wait handle here to avoid extra server round trip if the I/O
+ * has completed successfully.
+ *
+ * - If STATUS_PENDING, async_handoff() decides whether to close
+ * the wait handle for us.
+ * - If failed (NT_ERROR), async_handoff() always closes
+ * the wait_handle, which means async->wait_handle == 0.
+ */
+ if (async->wait_handle && async->iosb->status != STATUS_PENDING)
+ {
+ close_handle( async->thread->process, async->wait_handle );
+ async->wait_handle = 0;
+ }
+
+ /* The wait handle is preserved only when the status is STATUS_PENDING
+ * and async->blocking is set (i.e. we're going to block on it).
+ */
+ reply->handle = async->wait_handle;
+
+ /* async_set_result() may have overriden the status value. Reset it. */
+ set_error( async->iosb->status );
+ }
+ else set_error( STATUS_ACCESS_DENIED );
+
+ release_object( &async->obj );
+}
diff --git a/server/protocol.def b/server/protocol.def
index 02e73047f9b..2c3b8dbc619 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -2163,6 +2163,16 @@ enum message_type
@END
+/* Notify direct completion of async and close the wait handle */
+(a)REQ(notify_async_direct_result)
+ obj_handle_t handle; /* wait handle */
+ unsigned int status; /* completion status */
+ apc_param_t information; /* IO_STATUS_BLOCK Information */
+(a)REPLY
+ obj_handle_t handle; /* wait handle, or NULL if closed */
+(a)END
+
+
/* Perform a read on a file object */
@REQ(read)
async_data_t async; /* async I/O parameters */
--
2.34.1
Jan. 28, 2022
[RFC PATCH v3 1/5] server: Allow calling async_handoff() with status code STATUS_ALERTED.
by Jinoh Kang
If the server detects that an I/O request could be completed immediately
(e.g. the socket to read from already has incoming data), it can now
return STATUS_ALERTED to allow opportunistic synchronous I/O.
The Unix side will then attempt to perform I/O in nonblocking mode and
report back the I/O status to the server with signal_wait_async().
If the operation returns e.g. EAGAIN or EWOULDBLOCK, the client can opt
to either abandon the request (by specifying an error status) or poll
for it in the server as usual (by waiting on the wait handle).
Without such mechanism in place, the client cannot safely perform
immediately satiable I/O operations synchronously, since it can
potentially conflict with other pending I/O operations that have already
been queued.
Signed-off-by: Jinoh Kang <jinoh.kang.kr(a)gmail.com>
---
Notes:
v2 -> v3: set async->alerted = 1
server/async.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/server/async.c b/server/async.c
index 7aef28355f0..e169bb23225 100644
--- a/server/async.c
+++ b/server/async.c
@@ -338,6 +338,30 @@ obj_handle_t async_handoff( struct async *async, data_size_t *result, int force_
return async->wait_handle;
}
+ if (!async->pending && get_error() == STATUS_ALERTED)
+ {
+ /* Give the client opportunity to complete synchronously.
+ * If it turns out that the I/O request is not actually immediately satiable,
+ * the client may then choose to re-queue the async (with STATUS_PENDING).
+ */
+ async->unknown_status = 1;
+
+ /* Deactivate async so that it can be safely queued.
+ * Otherwise, the async will be erroneously alerted the next time
+ * someone calls async_wake_up() on the queue.
+ *
+ * Don't use async_terminate() here since we'd like to leave the IOSB
+ * status as STATUS_PENDING. Also we certainly don't want APC_ASYNC_IO
+ * to fire in any circumstances.
+ */
+ async->terminated = 1;
+ async->alerted = 1;
+
+ async_reselect( async );
+
+ return async->wait_handle;
+ }
+
async->initial_status = get_error();
if (!async->pending && NT_ERROR( get_error() ))
--
2.34.1
Jan. 28, 2022