server: Add flags in the set_window_pos request to inform the server about the window surface.
This commit is contained in:
parent
0c989fb078
commit
20768173ba
|
@ -1978,7 +1978,7 @@ BOOL set_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags,
|
|||
{
|
||||
req->handle = wine_server_user_handle( hwnd );
|
||||
req->previous = wine_server_user_handle( insert_after );
|
||||
req->flags = swp_flags;
|
||||
req->swp_flags = swp_flags;
|
||||
req->window.left = window_rect->left;
|
||||
req->window.top = window_rect->top;
|
||||
req->window.right = window_rect->right;
|
||||
|
@ -1993,6 +1993,9 @@ BOOL set_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags,
|
|||
if (!IsRectEmpty( &valid_rects[0] ))
|
||||
wine_server_add_data( req, valid_rects, 2 * sizeof(*valid_rects) );
|
||||
}
|
||||
if (new_surface) req->paint_flags |= SET_WINPOS_PAINT_SURFACE;
|
||||
if (win->pixel_format) req->paint_flags |= SET_WINPOS_PIXEL_FORMAT;
|
||||
|
||||
if ((ret = !wine_server_call( req )))
|
||||
{
|
||||
win->dwStyle = reply->new_style;
|
||||
|
|
|
@ -1608,7 +1608,7 @@ BOOL CDECL X11DRV_CreateDesktopWindow( HWND hwnd )
|
|||
{
|
||||
req->handle = wine_server_user_handle( hwnd );
|
||||
req->previous = 0;
|
||||
req->flags = SWP_NOZORDER;
|
||||
req->swp_flags = SWP_NOZORDER;
|
||||
req->window.left = virtual_screen_rect.left;
|
||||
req->window.top = virtual_screen_rect.top;
|
||||
req->window.right = virtual_screen_rect.right;
|
||||
|
|
|
@ -3312,7 +3312,8 @@ struct get_window_tree_reply
|
|||
struct set_window_pos_request
|
||||
{
|
||||
struct request_header __header;
|
||||
unsigned int flags;
|
||||
unsigned short swp_flags;
|
||||
unsigned short paint_flags;
|
||||
user_handle_t handle;
|
||||
user_handle_t previous;
|
||||
rectangle_t window;
|
||||
|
@ -3325,7 +3326,8 @@ struct set_window_pos_reply
|
|||
unsigned int new_style;
|
||||
unsigned int new_ex_style;
|
||||
};
|
||||
|
||||
#define SET_WINPOS_PAINT_SURFACE 0x01
|
||||
#define SET_WINPOS_PIXEL_FORMAT 0x02
|
||||
|
||||
|
||||
struct get_window_rectangles_request
|
||||
|
@ -5690,6 +5692,6 @@ union generic_reply
|
|||
struct set_suspend_context_reply set_suspend_context_reply;
|
||||
};
|
||||
|
||||
#define SERVER_PROTOCOL_VERSION 435
|
||||
#define SERVER_PROTOCOL_VERSION 436
|
||||
|
||||
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */
|
||||
|
|
|
@ -2391,7 +2391,8 @@ enum message_type
|
|||
|
||||
/* Set the position and Z order of a window */
|
||||
@REQ(set_window_pos)
|
||||
unsigned int flags; /* SWP_* flags */
|
||||
unsigned short swp_flags; /* SWP_* flags */
|
||||
unsigned short paint_flags; /* paint flags (see below) */
|
||||
user_handle_t handle; /* handle to the window */
|
||||
user_handle_t previous; /* previous window in Z order */
|
||||
rectangle_t window; /* window rectangle (in parent coords) */
|
||||
|
@ -2401,7 +2402,8 @@ enum message_type
|
|||
unsigned int new_style; /* new window style */
|
||||
unsigned int new_ex_style; /* new window extended style */
|
||||
@END
|
||||
|
||||
#define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
|
||||
#define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
|
||||
|
||||
/* Get the window and client rectangles of a window */
|
||||
@REQ(get_window_rectangles)
|
||||
|
|
|
@ -1588,7 +1588,8 @@ C_ASSERT( FIELD_OFFSET(struct get_window_tree_reply, last_sibling) == 28 );
|
|||
C_ASSERT( FIELD_OFFSET(struct get_window_tree_reply, first_child) == 32 );
|
||||
C_ASSERT( FIELD_OFFSET(struct get_window_tree_reply, last_child) == 36 );
|
||||
C_ASSERT( sizeof(struct get_window_tree_reply) == 40 );
|
||||
C_ASSERT( FIELD_OFFSET(struct set_window_pos_request, flags) == 12 );
|
||||
C_ASSERT( FIELD_OFFSET(struct set_window_pos_request, swp_flags) == 12 );
|
||||
C_ASSERT( FIELD_OFFSET(struct set_window_pos_request, paint_flags) == 14 );
|
||||
C_ASSERT( FIELD_OFFSET(struct set_window_pos_request, handle) == 16 );
|
||||
C_ASSERT( FIELD_OFFSET(struct set_window_pos_request, previous) == 20 );
|
||||
C_ASSERT( FIELD_OFFSET(struct set_window_pos_request, window) == 24 );
|
||||
|
|
|
@ -2815,7 +2815,8 @@ static void dump_get_window_tree_reply( const struct get_window_tree_reply *req
|
|||
|
||||
static void dump_set_window_pos_request( const struct set_window_pos_request *req )
|
||||
{
|
||||
fprintf( stderr, " flags=%08x", req->flags );
|
||||
fprintf( stderr, " swp_flags=%04x", req->swp_flags );
|
||||
fprintf( stderr, ", paint_flags=%04x", req->paint_flags );
|
||||
fprintf( stderr, ", handle=%08x", req->handle );
|
||||
fprintf( stderr, ", previous=%08x", req->previous );
|
||||
dump_rectangle( ", window=", &req->window );
|
||||
|
|
|
@ -93,10 +93,15 @@ struct window
|
|||
char extra_bytes[1]; /* extra bytes storage */
|
||||
};
|
||||
|
||||
#define PAINT_INTERNAL 0x01 /* internal WM_PAINT pending */
|
||||
#define PAINT_ERASE 0x02 /* needs WM_ERASEBKGND */
|
||||
#define PAINT_NONCLIENT 0x04 /* needs WM_NCPAINT */
|
||||
#define PAINT_DELAYED_ERASE 0x08 /* still needs erase after WM_ERASEBKGND */
|
||||
/* flags that can be set by the client */
|
||||
#define PAINT_HAS_SURFACE SET_WINPOS_PAINT_SURFACE
|
||||
#define PAINT_HAS_PIXEL_FORMAT SET_WINPOS_PIXEL_FORMAT
|
||||
#define PAINT_CLIENT_FLAGS (PAINT_HAS_SURFACE | PAINT_HAS_PIXEL_FORMAT)
|
||||
/* flags only manipulated by the server */
|
||||
#define PAINT_INTERNAL 0x0010 /* internal WM_PAINT pending */
|
||||
#define PAINT_ERASE 0x0020 /* needs WM_ERASEBKGND */
|
||||
#define PAINT_NONCLIENT 0x0040 /* needs WM_NCPAINT */
|
||||
#define PAINT_DELAYED_ERASE 0x0080 /* still needs erase after WM_ERASEBKGND */
|
||||
|
||||
/* growable array of user handles */
|
||||
struct user_handle_array
|
||||
|
@ -920,7 +925,8 @@ static void set_region_client_rect( struct region *region, struct window *win )
|
|||
/* get the top-level window to clip against for a given window */
|
||||
static inline struct window *get_top_clipping_window( struct window *win )
|
||||
{
|
||||
while (win->parent && !is_desktop_window(win->parent)) win = win->parent;
|
||||
while (!(win->paint_flags & PAINT_HAS_SURFACE) && win->parent && !is_desktop_window(win->parent))
|
||||
win = win->parent;
|
||||
return win;
|
||||
}
|
||||
|
||||
|
@ -2102,7 +2108,7 @@ DECL_HANDLER(set_window_pos)
|
|||
rectangle_t window_rect, client_rect, visible_rect;
|
||||
struct window *previous = NULL;
|
||||
struct window *win = get_window( req->handle );
|
||||
unsigned int flags = req->flags;
|
||||
unsigned int flags = req->swp_flags;
|
||||
|
||||
if (!win) return;
|
||||
if (!win->parent) flags |= SWP_NOZORDER; /* no Z order for the desktop */
|
||||
|
@ -2157,6 +2163,8 @@ DECL_HANDLER(set_window_pos)
|
|||
mirror_rect( &win->parent->client_rect, &client_rect );
|
||||
}
|
||||
|
||||
win->paint_flags = (win->paint_flags & ~PAINT_CLIENT_FLAGS) | (req->paint_flags & PAINT_CLIENT_FLAGS);
|
||||
|
||||
if (get_req_data_size() >= 3 * sizeof(rectangle_t))
|
||||
{
|
||||
rectangle_t valid_rects[2];
|
||||
|
|
Loading…
Reference in New Issue