mirror of
git://source.winehq.org/git/wine.git
synced 2024-07-18 18:33:19 +00:00
win32u: Use user message packing for WM_DEVICECHANGE.
This commit is contained in:
parent
c1a5b42cdc
commit
140f9e82f9
|
@ -851,10 +851,7 @@ BOOL unpack_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM *lparam,
|
|||
case WM_MOVING:
|
||||
case CB_GETCOMBOBOXINFO:
|
||||
case WM_MDIGETACTIVE:
|
||||
break;
|
||||
case WM_DEVICECHANGE:
|
||||
if (!(*wparam & 0x8000)) return TRUE;
|
||||
minsize = sizeof(DEV_BROADCAST_HDR);
|
||||
break;
|
||||
case WM_NOTIFY:
|
||||
/* WM_NOTIFY cannot be sent across processes (MSDN) */
|
||||
|
|
|
@ -876,6 +876,10 @@ static BOOL unpack_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM *lpa
|
|||
if (!*lparam) return TRUE;
|
||||
if (!get_buffer_space( buffer, sizeof(BOOL), size )) return FALSE;
|
||||
break;
|
||||
case WM_DEVICECHANGE:
|
||||
if (!(*wparam & 0x8000)) return TRUE;
|
||||
minsize = sizeof(DEV_BROADCAST_HDR);
|
||||
break;
|
||||
default:
|
||||
return TRUE; /* message doesn't need any unpacking */
|
||||
}
|
||||
|
@ -1704,6 +1708,13 @@ size_t user_message_size( HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam,
|
|||
case WM_MDIGETACTIVE:
|
||||
if (lparam) size = sizeof(BOOL);
|
||||
break;
|
||||
case WM_DEVICECHANGE:
|
||||
if ((wparam & 0x8000) && lparam)
|
||||
{
|
||||
const DEV_BROADCAST_HDR *header = lparam_ptr;
|
||||
size = header->dbch_size;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return size;
|
||||
|
|
Loading…
Reference in a new issue