"Roderick Colenbrander" thunderbird2k@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.
On Monday 17 December 2007 03:53:46 am Alexandre Julliard wrote:
"Roderick Colenbrander" thunderbird2k@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.
The desktop/root_window doesn't have a client window. All attempts to give it one were met with limitted success.
@@ -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.
The client window, being a child of the whole window, should be destroyed automagically with the whole window. Though the client_window ID does at least need to be set to 0, I suppose.
Chris Robinson chris.kcat@gmail.com writes:
The desktop/root_window doesn't have a client window. All attempts to give it one were met with limitted success.
You don't have to create a separate client window for the desktop, you can use the same window id for both.
The client window, being a child of the whole window, should be destroyed automagically with the whole window. Though the client_window ID does at least need to be set to 0, I suppose.
Yes, the X window is destroyed automatically, but the data structures need to reflect that fact.