mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 04:39:45 +00:00
user32: Always store the window rectangles unmirrored after SetWindowPos.
This commit is contained in:
parent
bc20ff50b6
commit
024521190a
@ -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 )
|
||||
{
|
||||
|
@ -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 */
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user