[PATCH 2/14] winex11.drv: Make X11DRV_X_to_window_rect use hwnd
instead
of win_data (for consistency purpose with X11DRV_window_to_X_rect)
Pierre d'Herbemont
pdherbemont at free.fr
Sun Jan 21 17:34:55 CST 2007
---
dlls/winex11.drv/window.c | 8 ++++----
dlls/winex11.drv/winpos.c | 4 ++--
dlls/winex11.drv/x11drv.h | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
-------------- next part --------------
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index ff83be5..4e6f979 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -660,13 +660,13 @@ void X11DRV_window_to_X_rect( HWND hwnd,
*
* Opposite of X11DRV_window_to_X_rect
*/
-void X11DRV_X_to_window_rect( struct x11drv_win_data *data, RECT *rect )
+void X11DRV_X_to_window_rect( HWND hwnd, RECT *rect )
{
- if (!data->managed) return;
+ if (!is_window_managed(hwnd)) return;
if (IsRectEmpty( rect )) return;
- AdjustWindowRectEx( rect, GetWindowLongW( data->hwnd, GWL_STYLE ) & ~(WS_HSCROLL|WS_VSCROLL),
- FALSE, GetWindowLongW( data->hwnd, GWL_EXSTYLE ));
+ AdjustWindowRectEx( rect, GetWindowLongW( hwnd, GWL_STYLE ) & ~(WS_HSCROLL|WS_VSCROLL),
+ FALSE, GetWindowLongW( hwnd, GWL_EXSTYLE ));
if (rect->top >= rect->bottom) rect->bottom = rect->top + 1;
if (rect->left >= rect->right) rect->right = rect->left + 1;
diff --git a/dlls/winex11.drv/winpos.c b/dlls/winex11.drv/winpos.c
index 2c28d36..0708b54 100644
--- a/dlls/winex11.drv/winpos.c
+++ b/dlls/winex11.drv/winpos.c
@@ -754,7 +754,7 @@ void X11DRV_MapNotify( HWND hwnd, XEvent
rect.right = x + width;
rect.bottom = y + height;
OffsetRect( &rect, virtual_screen_rect.left, virtual_screen_rect.top );
- X11DRV_X_to_window_rect( data, &rect );
+ X11DRV_X_to_window_rect( hwnd, &rect );
invalidate_dce( hwnd, &data->window_rect );
@@ -908,7 +908,7 @@ void X11DRV_ConfigureNotify( HWND hwnd,
TRACE( "win %p new X rect %d,%d,%dx%d (event %d,%d,%dx%d)\n",
hwnd, rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top,
event->x, event->y, event->width, event->height );
- X11DRV_X_to_window_rect( data, &rect );
+ X11DRV_X_to_window_rect( hwnd, &rect );
x = rect.left;
y = rect.top;
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
index 3aca542..9ed3491 100644
--- a/dlls/winex11.drv/x11drv.h
+++ b/dlls/winex11.drv/x11drv.h
@@ -680,7 +680,7 @@ extern void X11DRV_expect_error( Display
extern int X11DRV_check_error(void);
extern void X11DRV_set_iconic_state( HWND hwnd );
extern void X11DRV_window_to_X_rect( HWND hwnd, RECT *rect );
-extern void X11DRV_X_to_window_rect( struct x11drv_win_data *data, RECT *rect );
+extern void X11DRV_X_to_window_rect( HWND hwnd, RECT *rect );
extern void X11DRV_sync_window_style( Display *display, struct x11drv_win_data *data );
extern void X11DRV_sync_window_position( Display *display, struct x11drv_win_data *data,
UINT swp_flags, const RECT *new_client_rect,
More information about the wine-patches
mailing list