mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 04:20:56 +00:00
Use a timeout when sending broadcast messages.
This commit is contained in:
parent
736d96b5b3
commit
6d9350fa1f
|
@ -182,7 +182,8 @@ HCONV WINAPI DdeConnect(DWORD idInst, HSZ hszService, HSZ hszTopic,
|
|||
LeaveCriticalSection(&WDML_CritSect);
|
||||
|
||||
/* note: sent messages shall not use packing */
|
||||
SendMessageA(HWND_BROADCAST, WM_DDE_INITIATE, (WPARAM)hwndClient, MAKELPARAM(aSrv, aTpc));
|
||||
SendMessageTimeoutW( HWND_BROADCAST, WM_DDE_INITIATE, (WPARAM)hwndClient, MAKELPARAM(aSrv, aTpc),
|
||||
SMTO_ABORTIFHUNG, 2000, NULL );
|
||||
|
||||
EnterCriticalSection(&WDML_CritSect);
|
||||
|
||||
|
|
|
@ -110,7 +110,8 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus )
|
|||
{
|
||||
/* send palette messages */
|
||||
if (SendMessageW( hwnd, WM_QUERYNEWPALETTE, 0, 0 ))
|
||||
SendMessageW( HWND_BROADCAST, WM_PALETTEISCHANGING, (WPARAM)hwnd, 0 );
|
||||
SendMessageTimeoutW( HWND_BROADCAST, WM_PALETTEISCHANGING, (WPARAM)hwnd, 0,
|
||||
SMTO_ABORTIFHUNG, 2000, NULL );
|
||||
|
||||
if (!(GetWindowLongW( hwnd, GWL_EXSTYLE ) & WS_EX_MANAGED))
|
||||
SetWindowPos( hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE );
|
||||
|
|
|
@ -1467,7 +1467,8 @@ UINT WINAPI UserRealizePalette( HDC hDC )
|
|||
{
|
||||
/* send palette change notification */
|
||||
HWND hWnd = WindowFromDC( hDC );
|
||||
if (hWnd) SendMessageA( HWND_BROADCAST, WM_PALETTECHANGED, (WPARAM)hWnd, 0L);
|
||||
if (hWnd) SendMessageTimeoutW( HWND_BROADCAST, WM_PALETTECHANGED, (WPARAM)hWnd, 0,
|
||||
SMTO_ABORTIFHUNG, 2000, NULL );
|
||||
}
|
||||
return realized;
|
||||
}
|
||||
|
|
|
@ -252,7 +252,8 @@ VOID WINAPI SetSysColors16( INT16 nChanges, const INT16 *lpSysColor,
|
|||
|
||||
/* Send WM_SYSCOLORCHANGE message to all windows */
|
||||
|
||||
SendMessageA( HWND_BROADCAST, WM_SYSCOLORCHANGE, 0, 0 );
|
||||
SendMessageTimeoutW( HWND_BROADCAST, WM_SYSCOLORCHANGE, 0, 0,
|
||||
SMTO_ABORTIFHUNG, 2000, NULL );
|
||||
|
||||
/* Repaint affected portions of all visible windows */
|
||||
|
||||
|
@ -276,7 +277,8 @@ BOOL WINAPI SetSysColors( INT nChanges, const INT *lpSysColor,
|
|||
|
||||
/* Send WM_SYSCOLORCHANGE message to all windows */
|
||||
|
||||
SendMessageA( HWND_BROADCAST, WM_SYSCOLORCHANGE, 0, 0 );
|
||||
SendMessageTimeoutW( HWND_BROADCAST, WM_SYSCOLORCHANGE, 0, 0,
|
||||
SMTO_ABORTIFHUNG, 2000, NULL );
|
||||
|
||||
/* Repaint affected portions of all visible windows */
|
||||
|
||||
|
|
|
@ -354,13 +354,16 @@ static HKEY get_volatile_regkey(void)
|
|||
*/
|
||||
void SYSPARAMS_NotifyChange( UINT uiAction, UINT fWinIni )
|
||||
{
|
||||
static const WCHAR emptyW[1];
|
||||
|
||||
if (notify_change)
|
||||
{
|
||||
if (fWinIni & SPIF_UPDATEINIFILE)
|
||||
{
|
||||
if (fWinIni & (SPIF_SENDWININICHANGE | SPIF_SENDCHANGE))
|
||||
SendMessageA(HWND_BROADCAST, WM_SETTINGCHANGE,
|
||||
uiAction, (LPARAM) "");
|
||||
SendMessageTimeoutW(HWND_BROADCAST, WM_SETTINGCHANGE,
|
||||
uiAction, (LPARAM) emptyW,
|
||||
SMTO_ABORTIFHUNG, 2000, NULL );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue