"Roderick Colenbrander" <thunderbird2k(a)gmx.net> writes:
> + {
> + escape.drawable = X11DRV_get_client_window( top );
> + if(!escape.drawable)
> + escape.drawable = X11DRV_get_whole_window( top );
You shouldn't need that test, all windows should have a client window;
otherwise you have to tell the server about it too.
> +static Window create_client_window( Display *display, struct x11drv_win_data *data)
> +{
> + RECT rect = data->whole_rect;
> + XSetWindowAttributes attr;
> +
> + OffsetRect( &rect, -data->whole_rect.left, -data->whole_rect.top );
> + data->client_rect = rect;
> +
> + attr.event_mask = ExposureMask;
> + attr.bit_gravity = ForgetGravity;
ForgetGravity is wasteful, you should use NorthWestGravity and compute
the proper valid rects in SetWindowPos. ForgetGravity may be appropriate
for the non-client area though.
> @@ -1582,6 +1646,7 @@ void X11DRV_SetParent( HWND hwnd, HWND parent, HWND old_parent )
> {
> /* FIXME: we ignore errors since we can't really recover anyway */
> create_whole_window( display, data, GetWindowLongW( hwnd, GWL_STYLE ) );
> + create_client_window( display, data );
You need to destroy the client window in SetParent too.
--
Alexandre Julliard
julliard(a)winehq.org