winex11: Make the client rect relative to the parent window for consistency with the server side.

This commit is contained in:
Alexandre Julliard 2008-01-22 20:08:56 +01:00
parent 5df4e62312
commit f1a0348b4e
3 changed files with 10 additions and 11 deletions

View File

@ -965,7 +965,6 @@ void X11DRV_sync_window_position( Display *display, struct x11drv_win_data *data
old_client_rect = data->client_rect;
data->client_rect = *new_client_rect;
OffsetRect( &data->client_rect, -data->whole_rect.left, -data->whole_rect.top );
if (data->gl_drawable)
update_gl_drawable(display, data, &old_client_rect);

View File

@ -96,8 +96,8 @@ void X11DRV_Expose( HWND hwnd, XEvent *xev )
if (!(data = X11DRV_get_win_data( hwnd ))) return;
rect.left = event->x;
rect.top = event->y;
rect.left = data->whole_rect.left + event->x;
rect.top = data->whole_rect.top + event->y;
rect.right = rect.left + event->width;
rect.bottom = rect.top + event->height;
@ -112,15 +112,15 @@ void X11DRV_Expose( HWND hwnd, XEvent *xev )
SERVER_START_REQ( update_window_zorder )
{
req->window = hwnd;
req->rect.left = rect.left + data->whole_rect.left;
req->rect.top = rect.top + data->whole_rect.top;
req->rect.right = rect.right + data->whole_rect.left;
req->rect.bottom = rect.bottom + data->whole_rect.top;
req->rect.left = rect.left;
req->rect.top = rect.top;
req->rect.right = rect.right;
req->rect.bottom = rect.bottom;
wine_server_call( req );
}
SERVER_END_REQ;
/* make position relative to client area instead of window */
/* make position relative to client area instead of parent */
OffsetRect( &rect, -data->client_rect.left, -data->client_rect.top );
RedrawWindow( hwnd, &rect, 0, flags );
}
@ -191,8 +191,8 @@ static void update_wm_states( Display *display, struct x11drv_win_data *data, BO
if (!data->managed) return;
if (data->client_rect.left <= 0 && data->client_rect.right >= screen_width &&
data->client_rect.top <= 0 && data->client_rect.bottom >= screen_height)
if (data->whole_rect.left <= 0 && data->whole_rect.right >= screen_width &&
data->whole_rect.top <= 0 && data->whole_rect.bottom >= screen_height)
new_state |= (1 << WM_STATE_FULLSCREEN);
ex_style = GetWindowLongW( data->hwnd, GWL_EXSTYLE );

View File

@ -669,7 +669,7 @@ struct x11drv_win_data
Pixmap pixmap; /* Base pixmap for if gl_drawable is a GLXPixmap */
RECT window_rect; /* USER window rectangle relative to parent */
RECT whole_rect; /* X window rectangle for the whole window relative to parent */
RECT client_rect; /* client area relative to whole window */
RECT client_rect; /* client area relative to parent */
XIC xic; /* X input context */
XWMHints *wm_hints; /* window manager hints */
BOOL managed; /* is window managed? */