Commit dc26f278 authored by Alexandre Julliard's avatar Alexandre Julliard

winex11: Moved support for window moving/resizing back to user32.

parent b9dee8ef
......@@ -400,8 +400,9 @@ static void nulldrv_SetWindowText( HWND hwnd, LPCWSTR text )
{
}
static void nulldrv_SysCommandSizeMove( HWND hwnd, WPARAM wparam )
static BOOL nulldrv_SysCommandSizeMove( HWND hwnd, WPARAM wparam )
{
return FALSE;
}
static LRESULT nulldrv_WindowMessage( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
......@@ -725,9 +726,9 @@ static void loaderdrv_SetWindowText( HWND hwnd, LPCWSTR text )
load_driver()->pSetWindowText( hwnd, text );
}
static void loaderdrv_SysCommandSizeMove( HWND hwnd, WPARAM wparam )
static BOOL loaderdrv_SysCommandSizeMove( HWND hwnd, WPARAM wparam )
{
load_driver()->pSysCommandSizeMove( hwnd, wparam );
return load_driver()->pSysCommandSizeMove( hwnd, wparam );
}
static LRESULT loaderdrv_WindowMessage( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
......
......@@ -1532,7 +1532,7 @@ LRESULT NC_HandleSysCommand( HWND hwnd, WPARAM wParam, LPARAM lParam )
{
case SC_SIZE:
case SC_MOVE:
USER_Driver->pSysCommandSizeMove( hwnd, wParam );
WINPOS_SysCommandSizeMove( hwnd, wParam );
break;
case SC_MINIMIZE:
......
......@@ -788,6 +788,4 @@
# Wine dll separation hacks, these will go away, don't use them
#
@ cdecl HOOK_CallHooks(long long long long long)
@ cdecl WINPOS_GetMinMaxInfo(long ptr ptr ptr ptr)
@ cdecl WINPOS_ShowIconTitle(long long)
@ cdecl WIN_invalidate_dce(long ptr) invalidate_dce
......@@ -156,7 +156,7 @@ typedef struct tagUSER_DRIVER {
void (*pSetWindowIcon)(HWND,UINT,HICON);
void (*pSetWindowStyle)(HWND,DWORD);
void (*pSetWindowText)(HWND,LPCWSTR);
void (*pSysCommandSizeMove)(HWND,WPARAM);
BOOL (*pSysCommandSizeMove)(HWND,WPARAM);
LRESULT (*pWindowMessage)(HWND,UINT,WPARAM,LPARAM);
} USER_DRIVER;
......
......@@ -112,13 +112,13 @@ static inline void WIN_ReleasePtr( WND *ptr )
extern LRESULT HOOK_CallHooks( INT id, INT code, WPARAM wparam, LPARAM lparam, BOOL unicode ) DECLSPEC_HIDDEN;
extern BOOL WINPOS_RedrawIconTitle( HWND hWnd ) DECLSPEC_HIDDEN;
extern BOOL WINPOS_ShowIconTitle( HWND hwnd, BOOL bShow ) DECLSPEC_HIDDEN;
extern void WINPOS_GetMinMaxInfo( HWND hwnd, POINT *maxSize, POINT *maxPos, POINT *minTrack,
POINT *maxTrack ) DECLSPEC_HIDDEN;
extern LONG WINPOS_HandleWindowPosChanging(HWND hwnd, WINDOWPOS *winpos) DECLSPEC_HIDDEN;
extern HWND WINPOS_WindowFromPoint( HWND hwndScope, POINT pt, INT *hittest ) DECLSPEC_HIDDEN;
extern void WINPOS_ActivateOtherWindow( HWND hwnd ) DECLSPEC_HIDDEN;
extern UINT WINPOS_MinMaximize( HWND hwnd, UINT cmd, LPRECT rect ) DECLSPEC_HIDDEN;
extern void WINPOS_SysCommandSizeMove( HWND hwnd, WPARAM wParam ) DECLSPEC_HIDDEN;
extern BOOL set_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags,
const RECT *window_rect, const RECT *client_rect,
......
......@@ -1567,6 +1567,39 @@ void X11DRV_ReleaseDC( HWND hwnd, HDC hdc )
}
/***********************************************************************
* SetCapture (X11DRV.@)
*/
void X11DRV_SetCapture( HWND hwnd, UINT flags )
{
struct x11drv_thread_data *thread_data = x11drv_thread_data();
if (!(flags & GUI_INMOVESIZE)) return;
if (hwnd)
{
Window grab_win = X11DRV_get_client_window( GetAncestor( hwnd, GA_ROOT ) );
if (!grab_win) return;
wine_tsx11_lock();
XFlush( gdi_display );
XGrabPointer( thread_data->display, grab_win, False,
PointerMotionMask | ButtonPressMask | ButtonReleaseMask,
GrabModeAsync, GrabModeAsync, root_window, None, CurrentTime );
wine_tsx11_unlock();
thread_data->grab_window = grab_win;
}
else /* release capture */
{
wine_tsx11_lock();
XFlush( gdi_display );
XUngrabPointer( thread_data->display, CurrentTime );
wine_tsx11_unlock();
thread_data->grab_window = None;
}
}
/*****************************************************************
* SetParent (X11DRV.@)
*/
......
......@@ -104,6 +104,7 @@
@ cdecl ReleaseDC(long long) X11DRV_ReleaseDC
@ cdecl ScrollDC(long long long ptr ptr long ptr) X11DRV_ScrollDC
@ cdecl SetClipboardData(long long long long) X11DRV_SetClipboardData
@ cdecl SetCapture(long long) X11DRV_SetCapture
@ cdecl SetFocus(long) X11DRV_SetFocus
@ cdecl SetParent(long long long) X11DRV_SetParent
@ cdecl SetWindowIcon(long long long) X11DRV_SetWindowIcon
......
......@@ -753,9 +753,6 @@ extern void X11DRV_DDHAL_SwitchMode(DWORD dwModeIndex, LPVOID fb_addr, LPVIDMEM
/* FIXME: private functions imported from user32 */
extern LRESULT HOOK_CallHooks( INT id, INT code, WPARAM wparam, LPARAM lparam, BOOL unicode );
extern BOOL WINPOS_ShowIconTitle( HWND hwnd, BOOL bShow );
extern void WINPOS_GetMinMaxInfo( HWND hwnd, POINT *maxSize, POINT *maxPos, POINT *minTrack,
POINT *maxTrack );
extern void WIN_invalidate_dce( HWND hwnd, const RECT *rect );
#endif /* __WINE_X11DRV_H */
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