user32: Always store the window rectangles unmirrored after SetWindowPos.

This commit is contained in:
Alexandre Julliard 2010-09-23 15:48:02 +02:00
parent bc20ff50b6
commit 024521190a
3 changed files with 15 additions and 8 deletions

View File

@ -44,14 +44,6 @@ static DWORD process_layout;
/**********************************************************************/
static inline void mirror_rect( const RECT *window_rect, RECT *rect )
{
int width = window_rect->right - window_rect->left;
int tmp = rect->left;
rect->left = width - rect->right;
rect->right = width - tmp;
}
/* helper for Get/SetWindowLong */
static inline LONG_PTR get_win_data( const void *ptr, UINT size )
{

View File

@ -120,4 +120,12 @@ extern BOOL set_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags,
const RECT *window_rect, const RECT *client_rect,
const RECT *valid_rects ) DECLSPEC_HIDDEN;
static inline void mirror_rect( const RECT *window_rect, RECT *rect )
{
int width = window_rect->right - window_rect->left;
int tmp = rect->left;
rect->left = width - rect->right;
rect->right = width - tmp;
}
#endif /* __WINE_WIN_H */

View File

@ -1931,6 +1931,13 @@ BOOL set_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags,
win->dwExStyle = reply->new_ex_style;
win->rectWindow = *window_rect;
win->rectClient = *client_rect;
if (GetWindowLongW( win->parent, GWL_EXSTYLE ) & WS_EX_LAYOUTRTL)
{
RECT client;
GetClientRect( win->parent, &client );
mirror_rect( &client, &win->rectWindow );
mirror_rect( &client, &win->rectClient );
}
}
}
SERVER_END_REQ;