winemac: Implement CreateDesktopWindow().
This commit is contained in:
parent
00ef7a5285
commit
bbb8c60c7e
@ -5,7 +5,8 @@ EXTRALIBS = -framework AppKit
|
|||||||
C_SRCS = \
|
C_SRCS = \
|
||||||
display.c \
|
display.c \
|
||||||
gdi.c \
|
gdi.c \
|
||||||
macdrv_main.c
|
macdrv_main.c \
|
||||||
|
window.c
|
||||||
|
|
||||||
OBJC_SRCS = \
|
OBJC_SRCS = \
|
||||||
cocoa_display.m
|
cocoa_display.m
|
||||||
|
@ -99,7 +99,7 @@ static DWORD get_dpi(void)
|
|||||||
*
|
*
|
||||||
* Returns the rectangle encompassing all the screens.
|
* Returns the rectangle encompassing all the screens.
|
||||||
*/
|
*/
|
||||||
static CGRect macdrv_get_desktop_rect(void)
|
CGRect macdrv_get_desktop_rect(void)
|
||||||
{
|
{
|
||||||
CGRect ret;
|
CGRect ret;
|
||||||
CGDirectDisplayID displayIDs[32];
|
CGDirectDisplayID displayIDs[32];
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright 1996 Alexandre Julliard
|
* Copyright 1996 Alexandre Julliard
|
||||||
* Copyright 1999 Patrik Stridvall
|
* Copyright 1999 Patrik Stridvall
|
||||||
* Copyright 2011, 2012 Ken Thomases for CodeWeavers Inc.
|
* Copyright 2011, 2012, 2013 Ken Thomases for CodeWeavers Inc.
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
@ -63,4 +63,11 @@ static inline const char *wine_dbgstr_cgrect(CGRect cgrect)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* Mac GDI driver
|
||||||
|
*/
|
||||||
|
|
||||||
|
extern CGRect macdrv_get_desktop_rect(void) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
|
|
||||||
#endif /* __WINE_MACDRV_H */
|
#endif /* __WINE_MACDRV_H */
|
||||||
|
73
dlls/winemac.drv/window.c
Normal file
73
dlls/winemac.drv/window.c
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
/*
|
||||||
|
* MACDRV windowing driver
|
||||||
|
*
|
||||||
|
* Copyright 1993, 1994, 1995, 1996, 2001 Alexandre Julliard
|
||||||
|
* Copyright 1993 David Metcalfe
|
||||||
|
* Copyright 1995, 1996 Alex Korobka
|
||||||
|
* Copyright 2011, 2012, 2013 Ken Thomases for CodeWeavers Inc.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
#include "macdrv.h"
|
||||||
|
#include "winuser.h"
|
||||||
|
#include "wine/server.h"
|
||||||
|
|
||||||
|
WINE_DEFAULT_DEBUG_CHANNEL(macdrv);
|
||||||
|
|
||||||
|
|
||||||
|
/**********************************************************************
|
||||||
|
* CreateDesktopWindow (MACDRV.@)
|
||||||
|
*/
|
||||||
|
BOOL CDECL macdrv_CreateDesktopWindow(HWND hwnd)
|
||||||
|
{
|
||||||
|
unsigned int width, height;
|
||||||
|
|
||||||
|
TRACE("%p\n", hwnd);
|
||||||
|
|
||||||
|
/* retrieve the real size of the desktop */
|
||||||
|
SERVER_START_REQ(get_window_rectangles)
|
||||||
|
{
|
||||||
|
req->handle = wine_server_user_handle(hwnd);
|
||||||
|
req->relative = COORDS_CLIENT;
|
||||||
|
wine_server_call(req);
|
||||||
|
width = reply->window.right;
|
||||||
|
height = reply->window.bottom;
|
||||||
|
}
|
||||||
|
SERVER_END_REQ;
|
||||||
|
|
||||||
|
if (!width && !height) /* not initialized yet */
|
||||||
|
{
|
||||||
|
CGRect rect = macdrv_get_desktop_rect();
|
||||||
|
|
||||||
|
SERVER_START_REQ(set_window_pos)
|
||||||
|
{
|
||||||
|
req->handle = wine_server_user_handle(hwnd);
|
||||||
|
req->previous = 0;
|
||||||
|
req->swp_flags = SWP_NOZORDER;
|
||||||
|
req->window.left = CGRectGetMinX(rect);
|
||||||
|
req->window.top = CGRectGetMinY(rect);
|
||||||
|
req->window.right = CGRectGetMaxX(rect);
|
||||||
|
req->window.bottom = CGRectGetMaxY(rect);
|
||||||
|
req->client = req->window;
|
||||||
|
wine_server_call(req);
|
||||||
|
}
|
||||||
|
SERVER_END_REQ;
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
@ -4,5 +4,6 @@
|
|||||||
|
|
||||||
# USER driver
|
# USER driver
|
||||||
|
|
||||||
|
@ cdecl CreateDesktopWindow(long) macdrv_CreateDesktopWindow
|
||||||
@ cdecl EnumDisplayMonitors(long ptr ptr long) macdrv_EnumDisplayMonitors
|
@ cdecl EnumDisplayMonitors(long ptr ptr long) macdrv_EnumDisplayMonitors
|
||||||
@ cdecl GetMonitorInfo(long ptr) macdrv_GetMonitorInfo
|
@ cdecl GetMonitorInfo(long ptr) macdrv_GetMonitorInfo
|
||||||
|
Loading…
x
Reference in New Issue
Block a user