Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c
- index 69dd8caba5d..24a9b266130 100644
- --- a/dlls/win32u/window.c
- +++ b/dlls/win32u/window.c
- @@ -1775,6 +1775,7 @@ done:
- static BOOL apply_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags,
- const RECT *window_rect, const RECT *client_rect, const RECT *valid_rects )
- {
- + printf("apply_window_pos %d %d\n",window_rect->left,window_rect->top);
- WND *win;
- HWND surface_win = 0, parent = NtUserGetAncestor( hwnd, GA_PARENT );
- BOOL ret, needs_update = FALSE;
- @@ -1795,6 +1796,7 @@ static BOOL apply_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags,
- {
- visible_rect = get_virtual_screen_rect( get_thread_dpi() );
- intersect_rect( &visible_rect, &visible_rect, window_rect );
- + printf("something aaa\n");
- }
- }
- @@ -1803,6 +1805,7 @@ static BOOL apply_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags,
- if (!(win = get_win_ptr( hwnd )) || win == WND_DESKTOP || win == WND_OTHER_PROCESS)
- {
- + printf("window_surface_release\n");
- if (new_surface) window_surface_release( new_surface );
- return FALSE;
- }
- @@ -1812,6 +1815,7 @@ static BOOL apply_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags,
- (!(get_window_long( hwnd, GWL_EXSTYLE ) & WS_EX_LAYERED) ||
- NtUserGetLayeredWindowAttributes( hwnd, NULL, NULL, NULL )))
- {
- + printf("test\n");
- window_surface_release( new_surface );
- if ((new_surface = win->surface)) window_surface_add_ref( new_surface );
- create_offscreen_window_surface( &visible_rect, &new_surface );
- @@ -1827,7 +1831,12 @@ static BOOL apply_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags,
- swp_flags |= SWP_NOCOPYBITS;
- valid_rects = NULL;
- }
- -
- + /*if (EqualRect( window_rect, &visible_rect ) ) {
- + printf("equal rect");
- + } else {
- + printf("not equal rect");
- + }
- + printf("\n");*/
- SERVER_START_REQ( set_window_pos )
- {
- req->handle = wine_server_user_handle( hwnd );
- @@ -1875,20 +1884,20 @@ static BOOL apply_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags,
- mirror_rect( &client, &win->client_rect );
- mirror_rect( &client, &win->visible_rect );
- }
- - /* if an RTL window is resized the children have moved */
- + // if an RTL window is resized the children have moved
- if (win->dwExStyle & WS_EX_LAYOUTRTL &&
- client_rect->right - client_rect->left != old_client_rect.right - old_client_rect.left)
- win->flags |= WIN_CHILDREN_MOVED;
- }
- }
- SERVER_END_REQ;
- -
- if (ret)
- {
- if (needs_update) update_surface_region( surface_win );
- if (((swp_flags & SWP_AGG_NOPOSCHANGE) != SWP_AGG_NOPOSCHANGE) ||
- - (swp_flags & (SWP_HIDEWINDOW | SWP_SHOWWINDOW | SWP_STATECHANGED | SWP_FRAMECHANGED)))
- + (swp_flags & (SWP_HIDEWINDOW | SWP_SHOWWINDOW | SWP_STATECHANGED | SWP_FRAMECHANGED))) {
- invalidate_dce( win, &old_window_rect );
- + }
- }
- release_win_ptr( win );
- @@ -1939,6 +1948,7 @@ static BOOL apply_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags,
- }
- else if (new_surface) window_surface_release( new_surface );
- + //printf("end %d %d\n",ret,needs_update);
- return ret;
- }
- @@ -2544,6 +2554,7 @@ static void make_point_onscreen( POINT *pt )
- static BOOL set_window_placement( HWND hwnd, const WINDOWPLACEMENT *wndpl, UINT flags )
- {
- + printf("set window placement\n");
- RECT work_rect = get_maximized_work_rect( hwnd );
- WND *win = get_win_ptr( hwnd );
- WINDOWPLACEMENT wp = *wndpl;
- @@ -3444,7 +3455,11 @@ BOOL set_window_pos( WINDOWPOS *winpos, int parent_x, int parent_y )
- calc_ncsize( winpos, &old_window_rect, &old_client_rect,
- &new_window_rect, &new_client_rect, valid_rects, parent_x, parent_y );
- -
- + /*int addition = -100;
- + new_window_rect.top += addition;
- + new_client_rect.top += addition;
- + new_window_rect.bottom += addition;
- + new_client_rect.bottom += addition;*/
- if (!apply_window_pos( winpos->hwnd, winpos->hwndInsertAfter, winpos->flags,
- &new_window_rect, &new_client_rect, valid_rects ))
- goto done;
- @@ -4243,6 +4258,7 @@ void update_window_state( HWND hwnd )
- */
- static BOOL show_window( HWND hwnd, INT cmd )
- {
- + printf("SSSSSSSSSSSHOWING WINDOW!!!\n");
- WND *win;
- HWND parent;
- DPI_AWARENESS_CONTEXT context;
- diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
- index 51125065958..5bc79ac9ab7 100644
- --- a/dlls/winex11.drv/window.c
- +++ b/dlls/winex11.drv/window.c
- @@ -1904,6 +1904,7 @@ static BOOL create_desktop_win_data( Window win, HWND hwnd )
- */
- void X11DRV_SetDesktopWindow( HWND hwnd )
- {
- + printf("set desktop window\n");
- unsigned int width, height;
- /* retrieve the real size of the desktop */
- @@ -2514,8 +2515,7 @@ done:
- static inline BOOL get_surface_rect( const RECT *visible_rect, RECT *surface_rect )
- {
- *surface_rect = NtUserGetVirtualScreenRect();
- -
- - if (!intersect_rect( surface_rect, surface_rect, visible_rect )) return FALSE;
- + //if (!intersect_rect( surface_rect, surface_rect, visible_rect )) return FALSE;
- OffsetRect( surface_rect, -visible_rect->left, -visible_rect->top );
- surface_rect->left &= ~31;
- surface_rect->top &= ~31;
- @@ -2545,6 +2545,7 @@ BOOL X11DRV_WindowPosChanging( HWND hwnd, HWND insert_after, UINT swp_flags,
- {
- TRACE( "making win %p/%lx managed\n", hwnd, data->whole_window );
- release_win_data( data );
- + printf("X11DRV_WindowPosChanging: unmap the frickin window\n");
- unmap_window( hwnd );
- if (!(data = get_win_data( hwnd ))) return TRUE;
- data->managed = TRUE;
- @@ -2554,7 +2555,6 @@ BOOL X11DRV_WindowPosChanging( HWND hwnd, HWND insert_after, UINT swp_flags,
- X11DRV_window_to_X_rect( data, visible_rect, window_rect, client_rect );
- /* create the window surface if necessary */
- -
- if (!data->whole_window && !data->embedded) goto done;
- if (swp_flags & SWP_HIDEWINDOW) goto done;
- if (data->use_alpha) goto done;
- @@ -2570,6 +2570,7 @@ BOOL X11DRV_WindowPosChanging( HWND hwnd, HWND insert_after, UINT swp_flags,
- if (data->surface)
- {
- + //printf("surface_rect %d %d %d %d\n",surface_rect.left,surface_rect.top,surface_rect.right,surface_rect.bottom);
- if (EqualRect( &data->surface->rect, &surface_rect ))
- {
- /* existing surface is good enough */
- @@ -2631,7 +2632,7 @@ void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags,
- int x_offset = old_whole_rect.left - data->whole_rect.left;
- int y_offset = old_whole_rect.top - data->whole_rect.top;
- - /* if all that happened is that the whole window moved, copy everything */
- + // if all that happened is that the whole window moved, copy everything
- if (!(swp_flags & SWP_FRAMECHANGED) &&
- old_whole_rect.right - data->whole_rect.right == x_offset &&
- old_whole_rect.bottom - data->whole_rect.bottom == y_offset &&
- @@ -2641,7 +2642,7 @@ void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags,
- old_client_rect.bottom - data->client_rect.bottom == y_offset &&
- EqualRect( &valid_rects[0], &data->client_rect ))
- {
- - /* if we have an X window the bits will be moved by the X server */
- + // if we have an X window the bits will be moved by the X server
- if (!window && (x_offset != 0 || y_offset != 0))
- {
- release_win_data( data );
- @@ -2660,7 +2661,6 @@ void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags,
- }
- XFlush( gdi_display ); /* make sure painting is done before we move the window */
- -
- sync_client_position( data, &old_client_rect, &old_whole_rect );
- if (!data->whole_window)
- @@ -2694,6 +2694,7 @@ void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags,
- !is_window_rect_mapped( rectWindow ) && is_window_rect_mapped( &old_window_rect )))
- {
- release_win_data( data );
- + printf("X11DRV_WindowPosChanged: unmap the frickin window\n");
- unmap_window( hwnd );
- if (NtUserIsWindowRectFullScreen( &old_window_rect )) NtUserClipCursor( NULL );
- if (!(data = get_win_data( hwnd ))) return;
- diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
- index c80e4b3d3c9..d5b2b243117 100644
- --- a/dlls/winex11.drv/x11drv.h
- +++ b/dlls/winex11.drv/x11drv.h
- @@ -830,6 +830,7 @@ extern void xim_set_focus( HWND hwnd, BOOL focus );
- static inline BOOL is_window_rect_mapped( const RECT *rect )
- {
- + return TRUE;
- RECT virtual_rect = NtUserGetVirtualScreenRect();
- return (rect->left < virtual_rect.right &&
- rect->top < virtual_rect.bottom &&
- diff --git a/server/window.c b/server/window.c
- index 242e93f303a..468aa1d5f27 100644
- --- a/server/window.c
- +++ b/server/window.c
- @@ -1789,6 +1789,32 @@ static void set_window_pos( struct window *win, struct window *previous,
- const rectangle_t *client_rect, const rectangle_t *visible_rect,
- const rectangle_t *surface_rect, const rectangle_t *valid_rect )
- {
- + /*fprintf(stderr, "swp_flags %d",swp_flags);
- + if (swp_flags & SWP_NOACTIVATE) {
- + fprintf(stderr," noactivate");
- + }
- + if (swp_flags & SWP_FRAMECHANGED) {
- + fprintf(stderr," framechanged");
- + }
- + if (swp_flags & SWP_NOSIZE) {
- + fprintf(stderr," no_size");
- + }
- + if (swp_flags & SWP_NOMOVE) {
- + fprintf(stderr," no_move");
- + }
- + if (swp_flags & SWP_NOREDRAW) {
- + fprintf(stderr," no_redraw");
- + }
- + if (swp_flags & SWP_SHOWWINDOW) {
- + fprintf(stderr," show_window");
- + }
- + if (swp_flags & SWP_HIDEWINDOW) {
- + fprintf(stderr," hide_window");
- + }
- + if (swp_flags & SWP_DEFERERASE) {
- + fprintf(stderr," SWP_DEFERERASE");
- + }
- + fprintf(stderr, "\n");*/
- struct region *old_vis_rgn = NULL, *exposed_rgn = NULL;
- const rectangle_t old_window_rect = win->window_rect;
- const rectangle_t old_visible_rect = win->visible_rect;
- @@ -1797,9 +1823,7 @@ static void set_window_pos( struct window *win, struct window *previous,
- int client_changed, frame_changed;
- int visible = (win->style & WS_VISIBLE) || (swp_flags & SWP_SHOWWINDOW);
- int zorder_changed = 0;
- -
- if (win->parent && !is_visible( win->parent )) visible = 0;
- -
- if (visible && !(old_vis_rgn = get_visible_region( win, DCX_WINDOW ))) return;
- /* set the new window info before invalidating anything */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement