Commit d246c1a1 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

winex11: Use __wine_unix_call.

parent a53330b9
...@@ -23,8 +23,7 @@ ...@@ -23,8 +23,7 @@
HMODULE x11drv_module = 0; HMODULE x11drv_module = 0;
static unixlib_handle_t x11drv_handle; unixlib_handle_t x11drv_handle;
NTSTATUS (CDECL *x11drv_unix_call)( enum x11drv_funcs code, void *params );
typedef NTSTATUS (*callback_func)( UINT arg ); typedef NTSTATUS (*callback_func)( UINT arg );
...@@ -78,13 +77,12 @@ BOOL WINAPI DllMain( HINSTANCE instance, DWORD reason, void *reserved ) ...@@ -78,13 +77,12 @@ BOOL WINAPI DllMain( HINSTANCE instance, DWORD reason, void *reserved )
&x11drv_handle, sizeof(x11drv_handle), NULL )) &x11drv_handle, sizeof(x11drv_handle), NULL ))
return FALSE; return FALSE;
if (__wine_unix_call( x11drv_handle, unix_init, &params )) return FALSE; if (X11DRV_CALL( init, &params )) return FALSE;
callback_table = NtCurrentTeb()->Peb->KernelCallbackTable; callback_table = NtCurrentTeb()->Peb->KernelCallbackTable;
memcpy( callback_table + NtUserDriverCallbackFirst, kernel_callbacks, sizeof(kernel_callbacks) ); memcpy( callback_table + NtUserDriverCallbackFirst, kernel_callbacks, sizeof(kernel_callbacks) );
show_systray = params.show_systray; show_systray = params.show_systray;
x11drv_unix_call = params.unix_call;
return TRUE; return TRUE;
} }
......
...@@ -36,9 +36,8 @@ enum x11drv_funcs ...@@ -36,9 +36,8 @@ enum x11drv_funcs
unix_funcs_count, unix_funcs_count,
}; };
/* FIXME: Use __wine_unix_call when the rest of the stack is ready */ extern unixlib_handle_t x11drv_handle DECLSPEC_HIDDEN;
extern NTSTATUS (CDECL *x11drv_unix_call)( enum x11drv_funcs code, void *params ) DECLSPEC_HIDDEN; #define X11DRV_CALL(func, params) __wine_unix_call( x11drv_handle, unix_ ## func, params )
#define X11DRV_CALL(func, params) x11drv_unix_call( unix_ ## func, params )
/* x11drv_create_desktop params */ /* x11drv_create_desktop params */
struct create_desktop_params struct create_desktop_params
...@@ -52,7 +51,6 @@ struct init_params ...@@ -52,7 +51,6 @@ struct init_params
{ {
WNDPROC foreign_window_proc; WNDPROC foreign_window_proc;
BOOL show_systray; BOOL show_systray;
NTSTATUS (CDECL *unix_call)( enum x11drv_funcs code, void *params );
}; };
struct systray_dock_params struct systray_dock_params
......
...@@ -220,8 +220,6 @@ static const char * const atom_names[NB_XATOMS - FIRST_XATOM] = ...@@ -220,8 +220,6 @@ static const char * const atom_names[NB_XATOMS - FIRST_XATOM] =
"text/uri-list" "text/uri-list"
}; };
static NTSTATUS CDECL unix_call( enum x11drv_funcs code, void *params );
/*********************************************************************** /***********************************************************************
* ignore_error * ignore_error
* *
...@@ -717,7 +715,6 @@ static NTSTATUS x11drv_init( void *arg ) ...@@ -717,7 +715,6 @@ static NTSTATUS x11drv_init( void *arg )
init_user_driver(); init_user_driver();
X11DRV_DisplayDevices_Init(FALSE); X11DRV_DisplayDevices_Init(FALSE);
params->show_systray = show_systray; params->show_systray = show_systray;
params->unix_call = unix_call;
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
...@@ -1340,10 +1337,3 @@ const unixlib_entry_t __wine_unix_call_funcs[] = ...@@ -1340,10 +1337,3 @@ const unixlib_entry_t __wine_unix_call_funcs[] =
C_ASSERT( ARRAYSIZE(__wine_unix_call_funcs) == unix_funcs_count ); C_ASSERT( ARRAYSIZE(__wine_unix_call_funcs) == unix_funcs_count );
/* FIXME: Use __wine_unix_call instead */
static NTSTATUS CDECL unix_call( enum x11drv_funcs code, void *params )
{
return __wine_unix_call_funcs[code]( params );
}
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