[PATCH 2/6] user32: Toggle the caret based on the timer ID in DispatchMessage().
Jacek Caban
jacek at codeweavers.com
Fri Apr 15 06:27:49 CDT 2022
Hi Zebediah,
On 4/15/22 03:14, Zebediah Figura wrote:
> diff --git a/dlls/user32/message.c b/dlls/user32/message.c
> index 51f183fdbc0..68f00b325c9 100644
> --- a/dlls/user32/message.c
> +++ b/dlls/user32/message.c
> @@ -895,6 +895,22 @@ BOOL WINAPI TranslateMessage( const MSG *msg )
> }
>
>
> +static BOOL dispatch_systimer_message( const MSG *msg )
> +{
> + if (msg->message != WM_SYSTIMER)
> + return FALSE;
> +
> + switch (msg->wParam)
> + {
> + case SYSTEM_TIMER_CARET:
> + toggle_caret( msg->hwnd );
> + return TRUE;
> + }
> +
> + return FALSE;
> +}
> +
> +
> /***********************************************************************
> * DispatchMessageA (USER32.@)
> *
> @@ -922,6 +938,10 @@ LRESULT WINAPI DECLSPEC_HOTPATCH DispatchMessageA( const MSG* msg )
> return retval;
> }
> }
> +
> + if (dispatch_systimer_message( msg ))
> + return 0;
> +
> return NtUserDispatchMessageA( msg );
> }
>
> @@ -970,6 +990,10 @@ LRESULT WINAPI DECLSPEC_HOTPATCH DispatchMessageW( const MSG* msg )
> return retval;
> }
> }
> +
> + if (dispatch_systimer_message( msg ))
> + return 0;
> +
> return NtUserDispatchMessage( msg );
> }
This makes NtUserDispatchMessage unable to dispatch WM_SYSTIMER. We
already use it directly in winex11 and will need it in win32u anyway, so
this would probably be better with a temporary entry in user_callbacks
called from NtUserDispatchMessage.
Thanks,
Jacek
More information about the wine-devel
mailing list