Commit 140f9e82 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

win32u: Use user message packing for WM_DEVICECHANGE.

parent c1a5b42c
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment