Module: wine Branch: master Commit: 30d84fcd77dc90624352b139bde8671eef8dd9ec URL: http://source.winehq.org/git/wine.git/?a=commit;h=30d84fcd77dc90624352b139bd...
Author: Alexandre Julliard julliard@winehq.org Date: Tue Jan 22 10:15:38 2008 +0100
user32,server: Set the initial window rectangles to 0,0-0,0.
---
dlls/user32/win.c | 2 ++ dlls/winex11.drv/window.c | 19 +++---------------- server/window.c | 2 ++ 3 files changed, 7 insertions(+), 16 deletions(-)
diff --git a/dlls/user32/win.c b/dlls/user32/win.c index b1dec05..9730df2 100644 --- a/dlls/user32/win.c +++ b/dlls/user32/win.c @@ -166,6 +166,8 @@ static WND *create_window_handle( HWND parent, HWND owner, LPCWSTR name, win->dwMagic = WND_MAGIC; win->flags = 0; win->cbWndExtra = extra_bytes; + SetRectEmpty( &win->rectWindow ); + SetRectEmpty( &win->rectClient ); memset( win->wExtra, 0, extra_bytes ); CLASS_AddWindow( class, win, unicode ); return win; diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 109b142..84209b7 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -1203,22 +1203,9 @@ static struct x11drv_win_data *alloc_win_data( Display *display, HWND hwnd ) { struct x11drv_win_data *data;
- if ((data = HeapAlloc(GetProcessHeap(), 0, sizeof(*data)))) - { - data->hwnd = hwnd; - data->whole_window = 0; - data->icon_window = 0; - data->fbconfig_id = 0; - data->gl_drawable = 0; - data->pixmap = 0; - data->xic = 0; - data->managed = FALSE; - data->wm_state = 0; - data->dce = NULL; - data->lock_changes = 0; - data->hWMIconBitmap = 0; - data->hWMIconMask = 0; - + if ((data = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*data)))) + { + data->hwnd = hwnd; wine_tsx11_lock(); if (!winContext) winContext = XUniqueContext(); if (!win_data_context) win_data_context = XUniqueContext(); diff --git a/server/window.c b/server/window.c index 8cf8001..201f804 100644 --- a/server/window.c +++ b/server/window.c @@ -424,6 +424,7 @@ void close_desktop_window( struct desktop *desktop ) static struct window *create_window( struct window *parent, struct window *owner, atom_t atom, void *instance ) { + static const rectangle_t empty_rect; int extra_bytes; struct window *win; struct desktop *desktop; @@ -462,6 +463,7 @@ static struct window *create_window( struct window *parent, struct window *owner win->prop_alloc = 0; win->properties = NULL; win->nb_extra_bytes = extra_bytes; + win->window_rect = win->visible_rect = win->client_rect = empty_rect; memset( win->extra_bytes, 0, extra_bytes ); list_init( &win->children ); list_init( &win->unlinked );