[PATCH 2/2] quartzdrv: First glance at Window support.
Pierre d'Herbemont
pdherbemont at free.fr
Mon Oct 30 08:05:25 CST 2006
Here is a first glance at window support. As expected there is a lot of
duplicated code from both winpos.c and window.c in winequartz.drv/window.c.
Most of the removed or not implemented part of the x11drv is in a FIXME,
so we can see better where the differences are.
Pierre.
---
dlls/winequartz.drv/Makefile.in | 5 +-
dlls/winequartz.drv/carbon_imports.h | 52 ++
dlls/winequartz.drv/quartzdrv.h | 39 ++
dlls/winequartz.drv/quartzdrv_carbon.c | 144 +++++
dlls/winequartz.drv/quartzdrv_main.c | 33 ++-
dlls/winequartz.drv/window.c | 865
+++++++++++++++++++++++++++++++
dlls/winequartz.drv/winequartz.drv.spec | 8 +-
7 files changed, 1141 insertions(+), 5 deletions(-)
-------------- next part --------------
diff --git a/dlls/winequartz.drv/Makefile.in b/dlls/winequartz.drv/Makefile.in
index b2214b6..8d6247a 100644
--- a/dlls/winequartz.drv/Makefile.in
+++ b/dlls/winequartz.drv/Makefile.in
@@ -4,9 +4,12 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = winequartz.drv
IMPORTS = user32 gdi32 advapi32 kernel32 ntdll
+EXTRALIBS = -framework Carbon
C_SRCS = \
- quartzdrv_main.c
+ quartzdrv_carbon.c \
+ quartzdrv_main.c \
+ window.c
@MAKE_DLL_RULES@
diff --git a/dlls/winequartz.drv/carbon_imports.h b/dlls/winequartz.drv/carbon_imports.h
new file mode 100644
index 0000000..12e3754
--- /dev/null
+++ b/dlls/winequartz.drv/carbon_imports.h
@@ -0,0 +1,52 @@
+/*
+ * Imported Carbon Functions code whose names may conflict with
+ * Win32 equivalents
+ *
+ * Copyright 2006 Emmanuel Maillard
+ *
+ * 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 Street, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifndef __WINE_CARBON_IMPORTS_H
+#define __WINE_CARBON_IMPORTS_H
+
+#include <dlfcn.h>
+
+#define CARBON_FUNCT(fct) \
+ static typeof(fct) * carbonPtr_##fct;
+CARBON_FUNCT(ShowWindow)
+CARBON_FUNCT(HideWindow)
+#undef CARBON_FUNCT
+
+static inline void * BindCarbonFunctions(void)
+{
+ void * HIToolBoxDLHandle = dlopen("/System/Library/Frameworks/Carbon.framework/Frameworks/HIToolbox.framework/HIToolbox", RTLD_LAZY | RTLD_LOCAL);
+
+ if (!HIToolBoxDLHandle) {
+ fprintf(stderr, "%s impossible d'ouvrir HIToolBoxDLHandle\n", __FUNCTION__);
+ return nil;
+ }
+#define LOAD_FUNCTION(f) \
+ if((carbonPtr_##f = dlsym(HIToolBoxDLHandle, #f)) == NULL) \
+ { \
+ fprintf(stderr, "%s Can't find symbol %s\n", __FUNCTION__, #f); \
+ return nil; \
+ }
+ LOAD_FUNCTION(ShowWindow)
+ LOAD_FUNCTION(HideWindow)
+#undef LOAD_FUNCTION
+ return HIToolBoxDLHandle;
+}
+#endif /* __WINE_CARBON_IMPORTS_H */
diff --git a/dlls/winequartz.drv/quartzdrv.h b/dlls/winequartz.drv/quartzdrv.h
index 8dbd628..3021506 100644
--- a/dlls/winequartz.drv/quartzdrv.h
+++ b/dlls/winequartz.drv/quartzdrv.h
@@ -41,4 +41,43 @@ inline static struct quartzdrv_thread_da
return data;
}
+/* ---------------------------------------------------------------------
+ Window management
+*/
+typedef void * ObjectRef;
+
+struct quartzdrv_win_data
+{
+ HWND hwnd; /* hwnd that this private data belongs to */
+ ObjectRef whole_window; /* window for the complete window */
+ RECT window_rect; /* USER window rectangle relative to parent */
+ RECT whole_rect; /* Carbon window rectangle for the whole window relative to parent */
+ RECT client_rect; /* client area relative to whole window */
+};
+
+/* ---------------------------------------------------------------------
+ quartzdrv_carbon.c
+*/
+extern unsigned int screen_width;
+extern unsigned int screen_height;
+extern ObjectRef root_window;
+
+extern void QDRV_CarbonInitialize(void);
+extern void QDRV_CarbonFinalize(void);
+
+extern void CARBON_ShowWindow(ObjectRef win);
+extern void CARBON_HideWindow(ObjectRef win);
+
+extern ObjectRef QDRV_CarbonCreateNewWindow(int top, int left, int right, int bottom);
+extern void QDRV_CarbonSetWindowData(ObjectRef win, const struct quartzdrv_win_data *data);
+extern void QDRV_CarbonGetWindowData(ObjectRef win, struct quartzdrv_win_data **data);
+extern void QDRV_CarbonSetWindowFrame(ObjectRef win, int left, int top, int right, int bottom);
+
+/* ---------------------------------------------------------------------
+ quartzdrv_main.c
+*/
+extern void wine_quartzdrv_lock(void);
+extern void wine_quartzdrv_unlock(void);
+
+
#endif /* __WINE_QUARTZDRV_H */
diff --git a/dlls/winequartz.drv/quartzdrv_carbon.c b/dlls/winequartz.drv/quartzdrv_carbon.c
new file mode 100644
index 0000000..e41c2b3
--- /dev/null
+++ b/dlls/winequartz.drv/quartzdrv_carbon.c
@@ -0,0 +1,144 @@
+/*
+ * QUARTZDRV Carbon bridge code
+ *
+ * Copyright 2006 Emmanuel Maillard
+ *
+ * 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 Street, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <Carbon/Carbon.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include "carbon_imports.h"
+static void * HIToolBoxDLHandle = NULL;
+
+static const PropertyCreator __wine_quartzdrv_creator = 'WINE';
+static const PropertyTag __wine_quartzdrv_tag = 'HWND';
+
+unsigned int screen_width;
+unsigned int screen_height;
+WindowRef root_window = NULL;
+
+
+/***********************************************************************
+ * CARBON_ShowWindow
+ */
+void CARBON_ShowWindow(WindowRef win)
+{
+ if (carbonPtr_ShowWindow) carbonPtr_ShowWindow(win);
+}
+
+/***********************************************************************
+ * CARBON_HideWindow
+ */
+void CARBON_HideWindow(WindowRef win)
+{
+ if (carbonPtr_ShowWindow) carbonPtr_ShowWindow(win);
+}
+
+/***********************************************************************
+ * QDRV_SetWindowFrame
+ *
+ * Associate the Window bridge data (hwnd mainly) with our
+ * (Carbon) Window
+ */
+void QDRV_CarbonSetWindowFrame(WindowRef win, int left, int top, int right, int bottom)
+{
+ Rect bounds;
+ bounds.left = left;
+ bounds.top = top;
+ bounds.right = right;
+ bounds.bottom = bottom;
+ SetWindowBounds(win, kWindowStructureRgn, &bounds);
+}
+
+/***********************************************************************
+ * QDRV_CarbonSetWindowData
+ *
+ * Associate the Window bridge data (hwnd mainly) with our
+ * (Carbon) Window
+ */
+void QDRV_CarbonSetWindowData(WindowRef win, const void *data)
+{
+ OSStatus err;
+ err = SetWindowProperty(win, __wine_quartzdrv_creator, __wine_quartzdrv_tag, sizeof(void*), &data);
+ if(err != noErr)
+ fprintf(stderr,"Can't SetWindowProperty\n");
+}
+
+/***********************************************************************
+ * QDRV_CarbonGetWindowData
+ *
+ * Return the Window bridge data (hwnd mainly) associated with
+ * our (Carbon) Window
+ */
+void QDRV_CarbonGetWindowData(WindowRef win, void **data)
+{
+ OSStatus err;
+ err = GetWindowProperty(win, __wine_quartzdrv_creator, __wine_quartzdrv_tag, sizeof(void*), NULL, data);
+ if(err != noErr)
+ fprintf(stderr,"Can't SetWindowProperty\n");
+}
+
+/***********************************************************************
+ * QDRV_CarbonCreateNewWindow
+ */
+WindowRef QDRV_CarbonCreateNewWindow(int top, int left, int right, int bottom)
+{
+ OSStatus err;
+ WindowRef window;
+ Rect bounds;
+ WindowAttributes attrs;
+
+ attrs = kWindowStandardHandlerAttribute | kWindowCompositingAttribute | kWindowNoTitleBarAttribute;
+
+ bounds.top = top;
+ bounds.left = left;
+ bounds.right = right;
+ bounds.bottom = bottom;
+
+ err = CreateNewWindow(kDocumentWindowClass, attrs, &bounds, &window);
+ if(err != noErr)
+ return nil;
+ return window;
+}
+
+/***********************************************************************
+ * QDRV_Initialize
+ */
+void QDRV_CarbonInitialize(void)
+{
+ ProcessSerialNumber psn;
+
+ GetProcessForPID(getpid(), &psn);
+ TransformProcessType(&psn, kProcessTransformToForegroundApplication);
+ SetFrontProcess(&psn);
+
+ root_window = (WindowRef)CGMainDisplayID();
+
+ screen_width = CGDisplayPixelsWide(CGMainDisplayID());
+ screen_height = CGDisplayPixelsHigh(CGMainDisplayID());
+
+ HIToolBoxDLHandle = BindCarbonFunctions();
+}
+
+/***********************************************************************
+ * QDRV_Finalize
+ */
+void QDRV_CarbonFinalize(void)
+{
+ dlclose(HIToolBoxDLHandle);
+}
\ No newline at end of file
diff --git a/dlls/winequartz.drv/quartzdrv_main.c b/dlls/winequartz.drv/quartzdrv_main.c
index 4d7a9af..e731e5f 100644
--- a/dlls/winequartz.drv/quartzdrv_main.c
+++ b/dlls/winequartz.drv/quartzdrv_main.c
@@ -34,6 +34,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(quartzdrv);
DWORD thread_data_tls_index = TLS_OUT_OF_INDEXES;
+static CRITICAL_SECTION QDRV_CritSection;
+static CRITICAL_SECTION_DEBUG critsect_debug =
+{
+ 0, 0, &QDRV_CritSection,
+ { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
+ 0, 0, { (DWORD_PTR)(__FILE__ ": QDRV_CritSection") }
+};
+static CRITICAL_SECTION QDRV_CritSection = { &critsect_debug, -1, 0, 0, 0, 0 };
+
/***********************************************************************
* QDRV thread initialisation routine
*/
@@ -55,11 +64,28 @@ struct quartzdrv_thread_data *quartzdrv_
}
/***********************************************************************
+ * wine_quartzdrv_lock (QDRV.@)
+ */
+void wine_quartzdrv_lock(void)
+{
+ EnterCriticalSection( &QDRV_CritSection );
+}
+
+/***********************************************************************
+ * wine_quartzdrv_unlock (QDRV.@)
+ */
+void wine_quartzdrv_unlock(void)
+{
+ LeaveCriticalSection( &QDRV_CritSection );
+}
+
+/***********************************************************************
* process initialisation routine
*/
static BOOL process_attach(void)
{
TRACE("\n");
+ QDRV_CarbonInitialize();
return TRUE;
}
@@ -79,6 +105,7 @@ static void thread_detach(void)
static void process_detach(void)
{
TRACE("\n");
+ QDRV_CarbonFinalize();
}
/***********************************************************************
@@ -91,13 +118,13 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DW
switch(reason)
{
case DLL_PROCESS_ATTACH:
- /* Do attach */
+ ret = process_attach();
break;
case DLL_THREAD_DETACH:
- /* do thread detach */
+ thread_detach();
break;
case DLL_PROCESS_DETACH:
- /* do detach */
+ process_detach();
break;
}
return ret;
diff --git a/dlls/winequartz.drv/window.c b/dlls/winequartz.drv/window.c
new file mode 100644
index 0000000..c9be5d2
--- /dev/null
+++ b/dlls/winequartz.drv/window.c
@@ -0,0 +1,865 @@
+/*
+ * Window related functions
+ *
+ * Copyright 1993, 1994, 1995, 1996, 2001 Alexandre Julliard
+ * Copyright 1993 David Metcalfe
+ * Copyright 1995, 1996 Alex Korobka
+ *
+ * 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 <stdarg.h>
+#include <stdlib.h>
+#include <stdio.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#include "windef.h"
+#include "winbase.h"
+#include "wingdi.h"
+#include "winreg.h"
+#include "winuser.h"
+#include "wine/unicode.h"
+
+#include "wine/debug.h"
+#include "wine/server.h"
+#include "win.h"
+
+#include "quartzdrv.h"
+
+#define SWP_AGG_NOPOSCHANGE \
+(SWP_NOSIZE | SWP_NOMOVE | SWP_NOCLIENTSIZE | SWP_NOCLIENTMOVE | SWP_NOZORDER)
+#define SWP_AGG_STATUSFLAGS \
+(SWP_AGG_NOPOSCHANGE | SWP_FRAMECHANGED | SWP_HIDEWINDOW | SWP_SHOWWINDOW)
+
+#define SWP_EX_NOCOPY 0x0001
+#define SWP_EX_PAINTSELF 0x0002
+#define SWP_EX_NONCLIENT 0x0004
+
+#define HAS_THICKFRAME(style) \
+(((style) & WS_THICKFRAME) && \
+ !(((style) & (WS_DLGFRAME|WS_BORDER)) == WS_DLGFRAME))
+
+#define ON_LEFT_BORDER(hit) \
+(((hit) == HTLEFT) || ((hit) == HTTOPLEFT) || ((hit) == HTBOTTOMLEFT))
+#define ON_RIGHT_BORDER(hit) \
+(((hit) == HTRIGHT) || ((hit) == HTTOPRIGHT) || ((hit) == HTBOTTOMRIGHT))
+#define ON_TOP_BORDER(hit) \
+(((hit) == HTTOP) || ((hit) == HTTOPLEFT) || ((hit) == HTTOPRIGHT))
+#define ON_BOTTOM_BORDER(hit) \
+(((hit) == HTBOTTOM) || ((hit) == HTBOTTOMLEFT) || ((hit) == HTBOTTOMRIGHT))
+
+WINE_DEFAULT_DEBUG_CHANNEL(quartzdrv);
+
+static const char whole_window_prop[] = "__wine_quartzdrv_whole_window";
+static const char win_data_prop[] = "__wine_quartzdrv_data";
+
+/* That belongs elsewhere */
+int managed_mode = 0;
+
+/***********************************************************************
+ * is_window_managed
+ *
+ * Check if a given window should be managed
+ */
+inline static BOOL is_window_managed( HWND hwnd )
+{
+ DWORD style, ex_style;
+
+ if (!managed_mode) return FALSE;
+ /* tray window is always managed */
+ ex_style = GetWindowLongW( hwnd, GWL_EXSTYLE );
+ if (ex_style & WS_EX_TRAYWINDOW) return TRUE;
+ /* child windows are not managed */
+ style = GetWindowLongW( hwnd, GWL_STYLE );
+ if (style & WS_CHILD) return FALSE;
+ /* windows with caption are managed */
+ if ((style & WS_CAPTION) == WS_CAPTION) return TRUE;
+ /* tool windows are not managed */
+ if (ex_style & WS_EX_TOOLWINDOW) return FALSE;
+ /* windows with thick frame are managed */
+ if (style & WS_THICKFRAME) return TRUE;
+ /* application windows are managed */
+ if (ex_style & WS_EX_APPWINDOW) return TRUE;
+ /* full-screen popup windows are managed */
+ if (style & WS_POPUP)
+ {
+ RECT rect;
+ GetWindowRect( hwnd, &rect );
+ if ((rect.right - rect.left) == screen_width && (rect.bottom - rect.top) == screen_height)
+ return TRUE;
+ }
+ /* default: not managed */
+ return FALSE;
+}
+
+/***********************************************************************
+ * get_process_name
+ *
+ * get the name of the current process for setting class hints
+ */
+static char *get_process_name(void)
+{
+ static char *name;
+
+ if (!name)
+ {
+ WCHAR module[MAX_PATH];
+ DWORD len = GetModuleFileNameW( 0, module, MAX_PATH );
+ if (len && len < MAX_PATH)
+ {
+ char *ptr;
+ WCHAR *p, *appname = module;
+
+ if ((p = strrchrW( appname, '/' ))) appname = p + 1;
+ if ((p = strrchrW( appname, '\\' ))) appname = p + 1;
+ len = WideCharToMultiByte( CP_UNIXCP, 0, appname, -1, NULL, 0, NULL, NULL );
+ if ((ptr = HeapAlloc( GetProcessHeap(), 0, len )))
+ {
+ WideCharToMultiByte( CP_UNIXCP, 0, appname, -1, ptr, len, NULL, NULL );
+ name = ptr;
+ }
+ }
+ }
+ return name;
+}
+
+/***********************************************************************
+ * QDRV_get_win_data
+ *
+ * Return the data structure associated with a (Win32) window.
+ */
+struct quartzdrv_win_data *QDRV_get_win_data( HWND hwnd )
+{
+ return (struct quartzdrv_win_data *)GetPropA( hwnd, win_data_prop );
+}
+
+/***********************************************************************
+ * QDRV_is_window_rect_mapped
+ *
+ * Check if the X whole window should be mapped based on its rectangle
+ */
+BOOL QDRV_is_window_rect_mapped( const RECT *rect )
+{
+ /* don't map if rect is empty */
+ if (IsRectEmpty( rect )) return FALSE;
+
+ /* don't map if rect is off-screen */
+ if (rect->left >= (int)screen_width || rect->top >= (int)screen_height) return FALSE;
+ if (rect->right < 0 || rect->bottom < 0) return FALSE;
+
+ return TRUE;
+}
+
+/***********************************************************************
+ * SetWindowStyle (QDRV.@)
+ *
+ * Update the state of a window to reflect a style change
+ */
+void QDRV_SetWindowStyle( HWND hwnd, DWORD old_style )
+{
+ struct quartzdrv_win_data *data;
+ DWORD new_style, changed;
+
+ if (hwnd == GetDesktopWindow()) return;
+ if (!(data = QDRV_get_win_data( hwnd ))) return;
+
+ TRACE("hwnd=%p old_style=%d\n", hwnd, old_style);
+
+ new_style = GetWindowLongW( hwnd, GWL_STYLE );
+ changed = new_style ^ old_style;
+
+ if (changed & WS_VISIBLE)
+ {
+ if (data->whole_window && QDRV_is_window_rect_mapped( &data->window_rect ))
+ {
+ if (new_style & WS_VISIBLE)
+ {
+ TRACE( "mapping win %p\n", hwnd );
+ CARBON_ShowWindow( data->whole_window );
+ }
+ else
+ {
+ TRACE( "unmapping win %p\n", hwnd );
+ CARBON_HideWindow( data->whole_window );
+ }
+ }
+ FIXME("invalidate_dce( hwnd, &data->window_rect );\n");
+ }
+
+ if (changed & WS_DISABLED)
+ {
+ FIXME("WS_DISABLED\n");
+ }
+}
+
+/***********************************************************************
+ * QDRV_sync_window_position
+ *
+ * Synchronize the X window position with the Windows one
+ */
+void QDRV_sync_window_position( struct quartzdrv_win_data *data,
+ UINT swp_flags, const RECT *new_client_rect,
+ const RECT *new_whole_rect )
+{
+ RECT old_whole_rect;
+
+ old_whole_rect = data->whole_rect;
+ data->whole_rect = *new_whole_rect;
+
+ data->client_rect = *new_client_rect;
+ OffsetRect( &data->client_rect, -data->whole_rect.left, -data->whole_rect.top );
+
+ if (!data->whole_window/* || data->lock_changes*/) return;
+
+ if (!(swp_flags & SWP_NOZORDER))
+ {
+ FIXME("fixing up z-order stuff\n");
+ }
+
+ wine_quartzdrv_lock();
+ QDRV_CarbonSetWindowFrame(data->whole_window, data->whole_rect.left, data->whole_rect.top,
+ data->whole_rect.right, data->whole_rect.bottom);
+ wine_quartzdrv_unlock();
+}
+
+/***********************************************************************
+ * QDRV_set_window_pos
+ *
+ * Set a window position and Z order.
+ */
+BOOL QDRV_set_window_pos( HWND hwnd, HWND insert_after, const RECT *rectWindow,
+ const RECT *rectClient, UINT swp_flags, const RECT *valid_rects )
+{
+ struct quartzdrv_win_data *data;
+ RECT new_whole_rect;
+ WND *win;
+ DWORD old_style, new_style;
+ BOOL ret;
+
+ if (!(data = QDRV_get_win_data( hwnd ))) return FALSE;
+
+ new_whole_rect = *rectWindow;
+ FIXME("X11DRV_window_to_X_rect( data, &new_whole_rect );\n");
+
+ FIXME("here (in x11drv) we fix up the window if its Rect is empty\n");
+
+ if (!(win = WIN_GetPtr( hwnd ))) return FALSE;
+ if (win == WND_OTHER_PROCESS)
+ {
+ if (IsWindow( hwnd )) ERR( "cannot set rectangles of other process window %p\n", hwnd );
+ return FALSE;
+ }
+ SERVER_START_REQ( set_window_pos )
+ {
+ req->handle = hwnd;
+ req->previous = insert_after;
+ req->flags = swp_flags;
+ req->window.left = rectWindow->left;
+ req->window.top = rectWindow->top;
+ req->window.right = rectWindow->right;
+ req->window.bottom = rectWindow->bottom;
+ req->client.left = rectClient->left;
+ req->client.top = rectClient->top;
+ req->client.right = rectClient->right;
+ req->client.bottom = rectClient->bottom;
+ if (memcmp( rectWindow, &new_whole_rect, sizeof(RECT) ) || !IsRectEmpty( &valid_rects[0] ))
+ {
+ wine_server_add_data( req, &new_whole_rect, sizeof(new_whole_rect) );
+ if (!IsRectEmpty( &valid_rects[0] ))
+ wine_server_add_data( req, valid_rects, 2 * sizeof(*valid_rects) );
+ }
+ ret = !wine_server_call( req );
+ new_style = reply->new_style;
+ }
+ SERVER_END_REQ;
+
+ FIXME("here (in x11drv) we fix up the RootWindow\n");
+
+ if (ret)
+ {
+ /* invalidate DCEs */
+
+ FIXME("invalidate DCEs\n");
+
+ win->rectWindow = *rectWindow;
+ win->rectClient = *rectClient;
+ old_style = win->dwStyle;
+ win->dwStyle = new_style;
+ data->window_rect = *rectWindow;
+
+ TRACE( "win %p window %s client %s style %08x\n",
+ hwnd, wine_dbgstr_rect(rectWindow), wine_dbgstr_rect(rectClient), new_style );
+
+ /* FIXME: copy the valid bits */
+
+ if (data->whole_window)
+ {
+ if ((old_style & WS_VISIBLE) && !(new_style & WS_VISIBLE))
+ {
+ /* window got hidden, unmap it */
+ TRACE( "unmapping win %p\n", hwnd );
+ wine_quartzdrv_lock();
+ CARBON_HideWindow( data->whole_window );
+ wine_quartzdrv_unlock();
+ }
+ else if ((new_style & WS_VISIBLE) && !QDRV_is_window_rect_mapped( rectWindow ))
+ {
+ /* resizing to zero size or off screen -> unmap */
+ TRACE( "unmapping zero size or off-screen win %p\n", hwnd );
+ wine_quartzdrv_lock();
+ CARBON_HideWindow( data->whole_window );
+ wine_quartzdrv_unlock();
+ }
+ }
+
+ QDRV_sync_window_position( data, swp_flags, rectClient, &new_whole_rect );
+
+ if (data->whole_window)
+ {
+ if ((new_style & WS_VISIBLE) && !(new_style & WS_MINIMIZE) &&
+ QDRV_is_window_rect_mapped( rectWindow ))
+ {
+ if (!(old_style & WS_VISIBLE))
+ {
+ /* window got shown, map it */
+ TRACE( "mapping win %p\n", hwnd );
+ FIXME( "X11DRV_sync_window_style( display, data );\n");
+ wine_quartzdrv_lock();
+ CARBON_ShowWindow( data->whole_window );
+ wine_quartzdrv_unlock();
+ }
+ else if ((swp_flags & (SWP_NOSIZE | SWP_NOMOVE)) != (SWP_NOSIZE | SWP_NOMOVE))
+ {
+ /* resizing from zero size to non-zero -> map */
+ TRACE( "mapping non zero size or off-screen win %p\n", hwnd );
+ wine_quartzdrv_lock();
+ CARBON_ShowWindow( data->whole_window );
+ wine_quartzdrv_unlock();
+ }
+ FIXME("SetRect( &old_screen_rect, 0, 0, screen_width, screen_height );\n");
+ FIXME("update_fullscreen_state( display, data, &old_client_rect, &old_screen_rect );\n");
+ }
+ }
+ }
+ WIN_ReleasePtr( win );
+ return ret;
+}
+
+
+/**********************************************************************
+ * create_whole_window
+ *
+ * Create the whole window for a given window
+ */
+static ObjectRef create_whole_window( struct quartzdrv_win_data *data, DWORD style )
+{
+ RECT rect;
+
+ rect = data->window_rect;
+
+ wine_quartzdrv_lock();
+
+ data->whole_rect = rect;
+ data->whole_window = QDRV_CarbonCreateNewWindow(rect.top, rect.left, rect.right, rect.bottom);
+
+ if (!data->whole_window)
+ {
+ wine_quartzdrv_unlock();
+ return 0;
+ }
+ /* Associate the Window bridge data with our (Carbon)Window */
+ QDRV_CarbonSetWindowData(data->whole_window, data);
+
+ /* non-maximized child must be at bottom of Z order */
+ if ((style & (WS_CHILD|WS_MAXIMIZE)) == WS_CHILD)
+ FIXME("place at bottom of z-order\n");
+
+ wine_quartzdrv_unlock();
+
+ /* Associate the Window bridge data with our (Win32)Window */
+ SetPropA( data->hwnd, whole_window_prop, (HANDLE)data->whole_window );
+ return data->whole_window;
+}
+
+
+/**********************************************************************
+ * destroy_whole_window
+ *
+ * Destroy the whole X window for a given window.
+ */
+static void destroy_whole_window( struct quartzdrv_win_data *data )
+{
+ if (!data->whole_window) return;
+
+ TRACE( "win %p xwin %p\n", data->hwnd, data->whole_window );
+ FIXME("Destroy the window\n");
+ RemovePropA( data->hwnd, whole_window_prop );
+}
+
+/***********************************************************************
+ * DestroyWindow (QDRV.@)
+ */
+void QDRV_DestroyWindow( HWND hwnd )
+{
+ struct quartzdrv_win_data *data;
+
+ if (!(data = QDRV_get_win_data( hwnd ))) return;
+
+ FIXME("free_window_dce( data );\n");
+ destroy_whole_window( data );
+
+ RemovePropA( data->hwnd, win_data_prop );
+ HeapFree( GetProcessHeap(), 0, data );
+}
+
+
+static struct quartzdrv_win_data *alloc_win_data( HWND hwnd )
+{
+ struct quartzdrv_win_data *data;
+
+ if ((data = HeapAlloc(GetProcessHeap(), 0, sizeof(*data))))
+ {
+ data->hwnd = hwnd;
+ data->whole_window = 0;
+ SetPropA( data->hwnd, win_data_prop, (HANDLE)data );
+ }
+ return data;
+}
+
+/***********************************************************************
+ * ShowWindow (X11DRV.@)
+ */
+BOOL QDRV_ShowWindow( HWND hwnd, INT cmd )
+{
+ WND *wndPtr;
+ HWND parent;
+ LONG style = GetWindowLongW( hwnd, GWL_STYLE );
+ BOOL wasVisible = (style & WS_VISIBLE) != 0;
+ BOOL showFlag = TRUE, state_change = FALSE;
+ RECT newPos = {0, 0, 0, 0};
+ UINT swp = 0;
+
+ TRACE("hwnd=%p, cmd=%d, wasVisible %d\n", hwnd, cmd, wasVisible);
+
+ switch(cmd)
+ {
+ case SW_HIDE:
+ if (!wasVisible) return FALSE;
+ showFlag = FALSE;
+ swp |= SWP_HIDEWINDOW | SWP_NOSIZE | SWP_NOMOVE;
+ if (hwnd != GetActiveWindow())
+ swp |= SWP_NOACTIVATE | SWP_NOZORDER;
+ break;
+
+ case SW_SHOWMINNOACTIVE:
+ swp |= SWP_NOACTIVATE | SWP_NOZORDER;
+ /* fall through */
+ case SW_MINIMIZE:
+ case SW_FORCEMINIMIZE: /* FIXME: Does not work if thread is hung. */
+ if (style & WS_CHILD) swp |= SWP_NOACTIVATE | SWP_NOZORDER;
+ /* fall through */
+ case SW_SHOWMINIMIZED:
+ swp |= SWP_SHOWWINDOW | SWP_FRAMECHANGED;
+ FIXME("swp |= WINPOS_MinMaximize( hwnd, cmd, &newPos );\n");
+ if (style & WS_MINIMIZE) return wasVisible;
+ state_change = TRUE;
+ break;
+
+ case SW_SHOWMAXIMIZED: /* same as SW_MAXIMIZE */
+ swp |= SWP_SHOWWINDOW | SWP_FRAMECHANGED;
+ FIXME("swp |= WINPOS_MinMaximize( hwnd, SW_MAXIMIZE, &newPos );\n");
+ if ((style & WS_MAXIMIZE) && wasVisible) return wasVisible;
+ state_change = TRUE;
+ break;
+
+ case SW_SHOWNA:
+ swp |= SWP_NOACTIVATE | SWP_SHOWWINDOW | SWP_NOSIZE | SWP_NOMOVE;
+ if (style & WS_CHILD) swp |= SWP_NOZORDER;
+ break;
+ case SW_SHOW:
+ if (wasVisible) return TRUE;
+ swp |= SWP_SHOWWINDOW | SWP_NOSIZE | SWP_NOMOVE;
+ if (style & WS_CHILD) swp |= SWP_NOACTIVATE | SWP_NOZORDER;
+ break;
+
+ case SW_RESTORE:
+ swp |= SWP_FRAMECHANGED;
+ state_change = TRUE;
+ /* fall through */
+ case SW_SHOWNOACTIVATE:
+ swp |= SWP_NOACTIVATE | SWP_NOZORDER;
+ /* fall through */
+ case SW_SHOWNORMAL: /* same as SW_NORMAL: */
+ case SW_SHOWDEFAULT: /* FIXME: should have its own handler */
+ swp |= SWP_SHOWWINDOW;
+ if (style & (WS_MINIMIZE | WS_MAXIMIZE))
+ FIXME("swp |= WINPOS_MinMaximize( hwnd, SW_RESTORE, &newPos );\n");
+ else swp |= SWP_NOSIZE | SWP_NOMOVE;
+ if (style & WS_CHILD) swp |= SWP_NOACTIVATE | SWP_NOZORDER;
+ break;
+ }
+
+ if ((showFlag != wasVisible || cmd == SW_SHOWNA) && !state_change)
+ {
+ SendMessageW( hwnd, WM_SHOWWINDOW, showFlag, 0 );
+ if (!IsWindow( hwnd )) return wasVisible;
+ }
+
+ parent = GetAncestor( hwnd, GA_PARENT );
+ if (parent && !IsWindowVisible( parent ) && !state_change)
+ {
+ /* if parent is not visible simply toggle WS_VISIBLE and return */
+ if (showFlag) WIN_SetStyle( hwnd, WS_VISIBLE, 0 );
+ else WIN_SetStyle( hwnd, 0, WS_VISIBLE );
+ }
+ else
+ {
+ if (style & WS_CHILD)
+ {
+ if (state_change)
+ {
+ /* it appears that Windows always adds an undocumented 0x8000
+ * flag if the state of a window changes.
+ */
+ swp |= SWP_STATECHANGED;
+ }
+ }
+
+ SetWindowPos( hwnd, HWND_TOP, newPos.left, newPos.top,
+ newPos.right, newPos.bottom, LOWORD(swp) );
+ }
+
+ if (cmd == SW_HIDE)
+ {
+ HWND hFocus;
+
+ /* FIXME: This will cause the window to be activated irrespective
+ * of whether it is owned by the same thread. Has to be done
+ * asynchronously.
+ */
+
+ if (hwnd == GetActiveWindow())
+ WINPOS_ActivateOtherWindow(hwnd);
+
+ /* Revert focus to parent */
+ hFocus = GetFocus();
+ if (hwnd == hFocus || IsChild(hwnd, hFocus))
+ {
+ HWND parent = GetAncestor(hwnd, GA_PARENT);
+ if (parent == GetDesktopWindow()) parent = 0;
+ SetFocus(parent);
+ }
+ }
+
+ if (IsIconic(hwnd)) WINPOS_ShowIconTitle( hwnd, TRUE );
+
+ if (!(wndPtr = WIN_GetPtr( hwnd )) || wndPtr == WND_OTHER_PROCESS) return wasVisible;
+
+ if (wndPtr->flags & WIN_NEED_SIZE)
+ {
+ /* should happen only in CreateWindowEx() */
+ int wParam = SIZE_RESTORED;
+ RECT client = wndPtr->rectClient;
+
+ wndPtr->flags &= ~WIN_NEED_SIZE;
+ if (wndPtr->dwStyle & WS_MAXIMIZE) wParam = SIZE_MAXIMIZED;
+ else if (wndPtr->dwStyle & WS_MINIMIZE) wParam = SIZE_MINIMIZED;
+ WIN_ReleasePtr( wndPtr );
+
+ SendMessageW( hwnd, WM_SIZE, wParam,
+ MAKELONG( client.right - client.left, client.bottom - client.top ));
+ SendMessageW( hwnd, WM_MOVE, 0, MAKELONG( client.left, client.top ));
+ }
+ else WIN_ReleasePtr( wndPtr );
+
+ return wasVisible;
+}
+
+/***********************************************************************
+ * SetWindowPos (QDRV.@)
+ */
+BOOL QDRV_SetWindowPos( WINDOWPOS *winpos )
+{
+ RECT newWindowRect, newClientRect, valid_rects[2];
+ UINT orig_flags;
+
+ TRACE( "hwnd %p, after %p, swp %d,%d %dx%d flags %08x\n",
+ winpos->hwnd, winpos->hwndInsertAfter, winpos->x, winpos->y,
+ winpos->cx, winpos->cy, winpos->flags);
+
+ orig_flags = winpos->flags;
+
+ /* Check window handle */
+ if (winpos->hwnd == GetDesktopWindow()) return FALSE;
+
+ /* First make sure that coordinates are valid for WM_WINDOWPOSCHANGING */
+ if (!(winpos->flags & SWP_NOMOVE))
+ {
+ if (winpos->x < -32768) winpos->x = -32768;
+ else if (winpos->x > 32767) winpos->x = 32767;
+ if (winpos->y < -32768) winpos->y = -32768;
+ else if (winpos->y > 32767) winpos->y = 32767;
+ }
+ if (!(winpos->flags & SWP_NOSIZE))
+ {
+ if (winpos->cx < 0) winpos->cx = 0;
+ else if (winpos->cx > 32767) winpos->cx = 32767;
+ if (winpos->cy < 0) winpos->cy = 0;
+ else if (winpos->cy > 32767) winpos->cy = 32767;
+ }
+
+ FIXME("if (!SWP_DoWinPosChanging( winpos, &newWindowRect, &newClientRect )) return FALSE;\n");
+
+ /* Fix redundant flags */
+ FIXME("if (!fixup_flags( winpos )) return FALSE;\n");
+
+ if((winpos->flags & (SWP_NOZORDER | SWP_HIDEWINDOW | SWP_SHOWWINDOW)) != SWP_NOZORDER)
+ {
+ if (GetAncestor( winpos->hwnd, GA_PARENT ) == GetDesktopWindow())
+ FIXME("winpos->hwndInsertAfter = SWP_DoOwnedPopups( winpos->hwnd, winpos->hwndInsertAfter );\n");
+ }
+
+ /* Common operations */
+
+ FIXME("SWP_DoNCCalcSize( winpos, &newWindowRect, &newClientRect, valid_rects );\n");
+
+ if (!QDRV_set_window_pos( winpos->hwnd, winpos->hwndInsertAfter,
+ &newWindowRect, &newClientRect, orig_flags, valid_rects ))
+ return FALSE;
+
+ if (!(orig_flags & SWP_SHOWWINDOW))
+ {
+ UINT rdw_flags = RDW_FRAME | RDW_ERASE;
+ if ( !(orig_flags & SWP_DEFERERASE) ) rdw_flags |= RDW_ERASENOW;
+ RedrawWindow( winpos->hwnd, NULL, NULL, rdw_flags );
+ }
+
+ if( winpos->flags & SWP_HIDEWINDOW )
+ HideCaret(winpos->hwnd);
+ else if (winpos->flags & SWP_SHOWWINDOW)
+ ShowCaret(winpos->hwnd);
+
+ if (!(winpos->flags & (SWP_NOACTIVATE|SWP_HIDEWINDOW)))
+ {
+ /* child windows get WM_CHILDACTIVATE message */
+ if ((GetWindowLongW( winpos->hwnd, GWL_STYLE ) & (WS_CHILD | WS_POPUP)) == WS_CHILD)
+ SendMessageA( winpos->hwnd, WM_CHILDACTIVATE, 0, 0 );
+ else
+ SetForegroundWindow( winpos->hwnd );
+ }
+
+ /* And last, send the WM_WINDOWPOSCHANGED message */
+
+ TRACE("\tstatus flags = %04x\n", winpos->flags & SWP_AGG_STATUSFLAGS);
+
+ if (((winpos->flags & SWP_AGG_STATUSFLAGS) != SWP_AGG_NOPOSCHANGE))
+ {
+ /* WM_WINDOWPOSCHANGED is sent even if SWP_NOSENDCHANGING is set
+ and always contains final window position.
+ */
+ winpos->x = newWindowRect.left;
+ winpos->y = newWindowRect.top;
+ winpos->cx = newWindowRect.right - newWindowRect.left;
+ winpos->cy = newWindowRect.bottom - newWindowRect.top;
+ SendMessageW( winpos->hwnd, WM_WINDOWPOSCHANGED, 0, (LPARAM)winpos );
+ }
+
+ return TRUE;
+}
+
+/**********************************************************************
+ * CreateWindow (QDRV.@)
+ */
+BOOL QDRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs, BOOL unicode )
+{
+ WND *wndPtr;
+ struct quartzdrv_win_data *data;
+ HWND insert_after;
+ RECT rect;
+ DWORD style;
+ CBT_CREATEWNDA cbtc;
+ CREATESTRUCTA cbcs;
+ BOOL ret = FALSE;
+
+ if (!(data = alloc_win_data( hwnd ))) return FALSE;
+
+ if (cs->cx > 65535)
+ {
+ ERR( "invalid window width %d\n", cs->cx );
+ cs->cx = 65535;
+ }
+ if (cs->cy > 65535)
+ {
+ ERR( "invalid window height %d\n", cs->cy );
+ cs->cy = 65535;
+ }
+ if (cs->cx < 0)
+ {
+ ERR( "invalid window width %d\n", cs->cx );
+ cs->cx = 0;
+ }
+ if (cs->cy < 0)
+ {
+ ERR( "invalid window height %d\n", cs->cy );
+ cs->cy = 0;
+ }
+
+ /* initialize the dimensions before sending WM_GETMINMAXINFO */
+ SetRect( &rect, cs->x, cs->y, cs->x + cs->cx, cs->y + cs->cy );
+ QDRV_set_window_pos( hwnd, 0, &rect, &rect, SWP_NOZORDER, NULL );
+
+ /* create an X window if it's a top level window */
+ if (GetAncestor( hwnd, GA_PARENT ) == GetDesktopWindow())
+ {
+ if (!create_whole_window( data, cs->style )) goto failed;
+ }
+ else if (hwnd == GetDesktopWindow())
+ {
+ FIXME("trying to handle the desktop Window with no desktop win support\n");
+ }
+
+ /* get class or window DC if needed */
+ FIXME("alloc_window_dce( data );\n");
+
+ /* Call the WH_CBT hook */
+
+ /* the window style passed to the hook must be the real window style,
+ * rather than just the window style that the caller to CreateWindowEx
+ * passed in, so we have to copy the original CREATESTRUCT and get the
+ * the real style. */
+ cbcs = *cs;
+ cbcs.style = GetWindowLongW(hwnd, GWL_STYLE);
+
+ cbtc.lpcs = &cbcs;
+ cbtc.hwndInsertAfter = HWND_TOP;
+ if (HOOK_CallHooks( WH_CBT, HCBT_CREATEWND, (WPARAM)hwnd, (LPARAM)&cbtc, unicode ))
+ {
+ TRACE("CBT-hook returned !0\n");
+ goto failed;
+ }
+
+ /* Send the WM_GETMINMAXINFO message and fix the size if needed */
+ if ((cs->style & WS_THICKFRAME) || !(cs->style & (WS_POPUP | WS_CHILD)))
+ {
+ POINT maxSize, maxPos, minTrack, maxTrack;
+
+ WINPOS_GetMinMaxInfo( hwnd, &maxSize, &maxPos, &minTrack, &maxTrack);
+ if (maxSize.x < cs->cx) cs->cx = maxSize.x;
+ if (maxSize.y < cs->cy) cs->cy = maxSize.y;
+ if (cs->cx < 0) cs->cx = 0;
+ if (cs->cy < 0) cs->cy = 0;
+
+ SetRect( &rect, cs->x, cs->y, cs->x + cs->cx, cs->y + cs->cy );
+ if (!QDRV_set_window_pos( hwnd, 0, &rect, &rect, SWP_NOZORDER, NULL )) return FALSE;
+ }
+
+ /* send WM_NCCREATE */
+ TRACE( "hwnd %p cs %d,%d %dx%d\n", hwnd, cs->x, cs->y, cs->cx, cs->cy );
+ if (unicode)
+ ret = SendMessageW( hwnd, WM_NCCREATE, 0, (LPARAM)cs );
+ else
+ ret = SendMessageA( hwnd, WM_NCCREATE, 0, (LPARAM)cs );
+ if (!ret)
+ {
+ WARN("aborted by WM_xxCREATE!\n");
+ return FALSE;
+ }
+
+ /* make sure the window is still valid */
+ if (!(data = QDRV_get_win_data( hwnd ))) return FALSE;
+ FIXME("if (data->whole_window) X11DRV_sync_window_style( display, data );\n");
+
+ /* send WM_NCCALCSIZE */
+ rect = data->window_rect;
+ SendMessageW( hwnd, WM_NCCALCSIZE, FALSE, (LPARAM)&rect );
+
+ if (!(wndPtr = WIN_GetPtr(hwnd))) return FALSE;
+
+ /* yes, even if the CBT hook was called with HWND_TOP */
+ insert_after = ((wndPtr->dwStyle & (WS_CHILD|WS_MAXIMIZE)) == WS_CHILD) ? HWND_BOTTOM : HWND_TOP;
+
+ QDRV_set_window_pos( hwnd, insert_after, &wndPtr->rectWindow, &rect, 0, NULL );
+
+ TRACE( "win %p window %d,%d,%d,%d client %d,%d,%d,%d whole %d,%d,%d,%d X xwin %x\n",
+ hwnd, wndPtr->rectWindow.left, wndPtr->rectWindow.top,
+ wndPtr->rectWindow.right, wndPtr->rectWindow.bottom,
+ wndPtr->rectClient.left, wndPtr->rectClient.top,
+ wndPtr->rectClient.right, wndPtr->rectClient.bottom,
+ data->whole_rect.left, data->whole_rect.top,
+ data->whole_rect.right, data->whole_rect.bottom,
+ (unsigned int)data->whole_window );
+
+ WIN_ReleasePtr( wndPtr );
+
+ if (unicode)
+ ret = (SendMessageW( hwnd, WM_CREATE, 0, (LPARAM)cs ) != -1);
+ else
+ ret = (SendMessageA( hwnd, WM_CREATE, 0, (LPARAM)cs ) != -1);
+
+ if (!ret) return FALSE;
+
+ NotifyWinEvent(EVENT_OBJECT_CREATE, hwnd, OBJID_WINDOW, 0);
+
+ /* Send the size messages */
+
+ if (!(wndPtr = WIN_GetPtr(hwnd)) || wndPtr == WND_OTHER_PROCESS) return FALSE;
+ if (!(wndPtr->flags & WIN_NEED_SIZE))
+ {
+ RECT rect = wndPtr->rectClient;
+ WIN_ReleasePtr( wndPtr );
+ /* send it anyway */
+ if (((rect.right-rect.left) <0) ||((rect.bottom-rect.top)<0))
+ WARN("sending bogus WM_SIZE message 0x%08x\n",
+ MAKELONG(rect.right-rect.left, rect.bottom-rect.top));
+ SendMessageW( hwnd, WM_SIZE, SIZE_RESTORED,
+ MAKELONG(rect.right-rect.left, rect.bottom-rect.top));
+ SendMessageW( hwnd, WM_MOVE, 0, MAKELONG( rect.left, rect.top ) );
+ }
+ else WIN_ReleasePtr( wndPtr );
+
+ /* Show the window, maximizing or minimizing if needed */
+
+ style = GetWindowLongW( hwnd, GWL_STYLE );
+ if (style & (WS_MINIMIZE | WS_MAXIMIZE))
+ {
+ /* extern UINT WINPOS_MinMaximize( HWND hwnd, UINT cmd, LPRECT rect ); FIXME */
+
+ /*RECT newPos;*/
+ UINT swFlag = (style & WS_MINIMIZE) ? SW_MINIMIZE : SW_MAXIMIZE;
+ WIN_SetStyle( hwnd, 0, WS_MAXIMIZE | WS_MINIMIZE );
+ FIXME("WINPOS_MinMaximize( hwnd, swFlag, &newPos );");
+
+ swFlag = SWP_FRAMECHANGED | SWP_NOZORDER; /* Frame always gets changed */
+ if (!(style & WS_VISIBLE) || (style & WS_CHILD) || GetActiveWindow()) swFlag |= SWP_NOACTIVATE;
+
+ FIXME("SetWindowPos( hwnd, 0, newPos.left, newPos.top, newPos.right, newPos.bottom, swFlag );\n");
+ }
+
+ /* FIXME: Dock system tray windows. */
+ /* Dock after the window is created so we don't have problems calling
+ * SetWindowPos. */
+ FIXME("if (GetWindowLongW( hwnd, GWL_EXSTYLE ) & WS_EX_TRAYWINDOW)\n");
+ FIXME(" systray_dock_window( display, data );\n");
+
+ return TRUE;
+
+ failed:
+ QDRV_DestroyWindow( hwnd );
+ return FALSE;
+}
diff --git a/dlls/winequartz.drv/winequartz.drv.spec b/dlls/winequartz.drv/winequartz.drv.spec
index d98d860..84a548f 100644
--- a/dlls/winequartz.drv/winequartz.drv.spec
+++ b/dlls/winequartz.drv/winequartz.drv.spec
@@ -1 +1,7 @@
-# Nothing Yet
+@ cdecl CreateWindow(long ptr long) QDRV_CreateWindow
+@ cdecl SetWindowStyle(ptr long) QDRV_SetWindowStyle
+@ cdecl ShowWindow(long long) QDRV_ShowWindow
+
+# Quartzdrv locks
+@ cdecl -norelay wine_quartzdrv_lock()
+@ cdecl -norelay wine_quartzdrv_unlock()
\ No newline at end of file
More information about the wine-patches
mailing list