From: Jacek Caban jacek@codeweavers.com
Signed-off-by: Jacek Caban jacek@codeweavers.com --- dlls/winex11.drv/desktop.c | 13 +++++++------ dlls/winex11.drv/dllmain.c | 10 ++++++++++ dlls/winex11.drv/unixlib.h | 7 +++++++ dlls/winex11.drv/winex11.drv.spec | 2 +- dlls/winex11.drv/x11drv.h | 1 + 5 files changed, 26 insertions(+), 7 deletions(-)
diff --git a/dlls/winex11.drv/desktop.c b/dlls/winex11.drv/desktop.c index f8c44549fc1..61fe5578e8b 100644 --- a/dlls/winex11.drv/desktop.c +++ b/dlls/winex11.drv/desktop.c @@ -321,13 +321,14 @@ void X11DRV_init_desktop( Window win, unsigned int width, unsigned int height )
/*********************************************************************** - * X11DRV_create_desktop + * x11drv_create_desktop * * Create the X11 desktop window for the desktop mode. */ -BOOL CDECL X11DRV_create_desktop( UINT width, UINT height ) +NTSTATUS x11drv_create_desktop( void *arg ) { static const WCHAR rootW[] = {'r','o','o','t',0}; + const struct create_desktop_params *params = arg; XSetWindowAttributes win_attr; Window win; Display *display = thread_init_display(); @@ -337,7 +338,7 @@ BOOL CDECL X11DRV_create_desktop( UINT width, UINT height ) UOI_NAME, name, sizeof(name), NULL )) name[0] = 0;
- TRACE( "%s %ux%u\n", debugstr_w(name), width, height ); + TRACE( "%s %ux%u\n", debugstr_w(name), params->width, params->height );
/* magic: desktop "root" means use the root window */ if (!lstrcmpiW( name, rootW )) return FALSE; @@ -354,12 +355,12 @@ BOOL CDECL X11DRV_create_desktop( UINT width, UINT height ) win_attr.colormap = None;
win = XCreateWindow( display, DefaultRootWindow(display), - 0, 0, width, height, 0, default_visual.depth, InputOutput, default_visual.visual, - CWEventMask | CWCursor | CWColormap, &win_attr ); + 0, 0, params->width, params->height, 0, default_visual.depth, InputOutput, + default_visual.visual, CWEventMask | CWCursor | CWColormap, &win_attr ); if (!win) return FALSE; if (!create_desktop_win_data( win )) return FALSE;
- X11DRV_init_desktop( win, width, height ); + X11DRV_init_desktop( win, params->width, params->height ); if (is_desktop_fullscreen()) { TRACE("setting desktop to fullscreen\n"); diff --git a/dlls/winex11.drv/dllmain.c b/dlls/winex11.drv/dllmain.c index 49db5e3d2a5..f5e829d73af 100644 --- a/dlls/winex11.drv/dllmain.c +++ b/dlls/winex11.drv/dllmain.c @@ -134,3 +134,13 @@ BOOL WINAPI DllMain( HINSTANCE instance, DWORD reason, void *reserved ) x11drv_module = instance; return !x11drv_init( NULL ); } + + +/*********************************************************************** + * wine_create_desktop (winex11.@) + */ +BOOL CDECL wine_create_desktop( UINT width, UINT height ) +{ + struct create_desktop_params params = { .width = width, .height = height }; + return x11drv_create_desktop( ¶ms ); +} diff --git a/dlls/winex11.drv/unixlib.h b/dlls/winex11.drv/unixlib.h index 3865ecab7a0..43a00b619c1 100644 --- a/dlls/winex11.drv/unixlib.h +++ b/dlls/winex11.drv/unixlib.h @@ -28,6 +28,13 @@ struct clipboard_message_params LPARAM lparam; };
+/* x11drv_create_desktop params */ +struct create_desktop_params +{ + UINT width; + UINT height; +}; + /* DnD support */
struct format_entry diff --git a/dlls/winex11.drv/winex11.drv.spec b/dlls/winex11.drv/winex11.drv.spec index 6e0ccfab4b0..77e4a6285de 100644 --- a/dlls/winex11.drv/winex11.drv.spec +++ b/dlls/winex11.drv/winex11.drv.spec @@ -5,7 +5,7 @@ @ cdecl WTInfoW(long long ptr) X11DRV_WTInfoW
# Desktop -@ cdecl wine_create_desktop(long long) X11DRV_create_desktop +@ cdecl wine_create_desktop(long long)
# System tray @ cdecl wine_notify_icon(long ptr) diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 4dc251b9ac2..bda4322d26b 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -845,6 +845,7 @@ static inline BOOL is_window_rect_mapped( const RECT *rect )
extern NTSTATUS x11drv_init( void *arg ) DECLSPEC_HIDDEN; extern NTSTATUS x11drv_clipboard_message( void *arg ) DECLSPEC_HIDDEN; +extern NTSTATUS x11drv_create_desktop( void *arg ) DECLSPEC_HIDDEN;
extern NTSTATUS WINAPI x11drv_post_drop( void *data, ULONG size ) DECLSPEC_HIDDEN;