mirror of
git://source.winehq.org/git/wine.git
synced 2024-07-22 22:14:11 +00:00
winex11: Move create_desktop implementation to dllmain.c.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
fce3f9c323
commit
0062917fdf
|
@ -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");
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue