Commit b9dee8ef authored by Alexandre Julliard's avatar Alexandre Julliard

user32: Add a SetCapture function to the driver interface.

parent 4e129f88
......@@ -112,6 +112,7 @@ static const USER_DRIVER *load_driver(void)
GET_USER_FUNC(MsgWaitForMultipleObjectsEx);
GET_USER_FUNC(ReleaseDC);
GET_USER_FUNC(ScrollDC);
GET_USER_FUNC(SetCapture);
GET_USER_FUNC(SetFocus);
GET_USER_FUNC(SetParent);
GET_USER_FUNC(SetWindowPos);
......@@ -364,6 +365,10 @@ static BOOL nulldrv_ScrollDC( HDC hdc, INT dx, INT dy, const RECT *scroll, const
return FALSE;
}
static void nulldrv_SetCapture( HWND hwnd, UINT flags )
{
}
static void nulldrv_SetFocus( HWND hwnd )
{
}
......@@ -452,6 +457,7 @@ static const USER_DRIVER null_driver =
nulldrv_MsgWaitForMultipleObjectsEx,
nulldrv_ReleaseDC,
nulldrv_ScrollDC,
nulldrv_SetCapture,
nulldrv_SetFocus,
nulldrv_SetParent,
nulldrv_SetWindowPos,
......@@ -676,6 +682,11 @@ static BOOL loaderdrv_ScrollDC( HDC hdc, INT dx, INT dy, const RECT *scroll, con
return load_driver()->pScrollDC( hdc, dx, dy, scroll, clip, hrgn, update );
}
static void loaderdrv_SetCapture( HWND hwnd, UINT flags )
{
load_driver()->pSetCapture( hwnd, flags );
}
static void loaderdrv_SetFocus( HWND hwnd )
{
load_driver()->pSetFocus( hwnd );
......@@ -772,6 +783,7 @@ static const USER_DRIVER lazy_load_driver =
loaderdrv_MsgWaitForMultipleObjectsEx,
loaderdrv_ReleaseDC,
loaderdrv_ScrollDC,
loaderdrv_SetCapture,
loaderdrv_SetFocus,
loaderdrv_SetParent,
loaderdrv_SetWindowPos,
......
......@@ -100,6 +100,8 @@ BOOL set_capture_window( HWND hwnd, UINT gui_flags, HWND *prev_ret )
}
SERVER_END_REQ;
USER_Driver->pSetCapture( hwnd, gui_flags );
if (previous && previous != hwnd)
SendMessageW( previous, WM_CAPTURECHANGED, 0, (LPARAM)hwnd );
......
......@@ -148,6 +148,7 @@ typedef struct tagUSER_DRIVER {
DWORD (*pMsgWaitForMultipleObjectsEx)(DWORD,const HANDLE*,DWORD,DWORD,DWORD);
void (*pReleaseDC)(HWND,HDC);
BOOL (*pScrollDC)(HDC, INT, INT, const RECT *, const RECT *, HRGN, LPRECT);
void (*pSetCapture)(HWND,UINT);
void (*pSetFocus)(HWND);
void (*pSetParent)(HWND,HWND,HWND);
void (*pSetWindowPos)(HWND,HWND,UINT,const RECT *,const RECT *,const RECT *,const RECT *);
......
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