/* * 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; }