From: Rémi Bernon <rbernon(a)codeweavers.com> Depending on the window manager, the windows may not be inside what we think is the virtual screen. We should try to map them nonetheless if they are visible. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57472 Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57474 --- dlls/winex11.drv/window.c | 13 ------------- dlls/winex11.drv/x11drv.h | 9 --------- 2 files changed, 22 deletions(-) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 102317d5695..14049525b8d 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -2930,13 +2930,6 @@ void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, HWND owner_hint, UIN if (data->desired_state.wm_state == IconicState) old_style |= WS_MINIMIZE; if (data->desired_state.net_wm_state & (1 << NET_WM_STATE_MAXIMIZED)) old_style |= WS_MAXIMIZE; - /* don't try mapping the window if it is outside of the virtual screen */ - if (!(new_style & WS_MINIMIZE) && !is_window_rect_mapped( &new_rects->window )) - { - swp_flags |= SWP_HIDEWINDOW; - new_style &= ~WS_VISIBLE; - } - old_rects = data->rects; was_fullscreen = data->is_fullscreen; data->rects = *new_rects; @@ -3145,9 +3138,6 @@ void X11DRV_SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWO old_style = new_style & ~(WS_VISIBLE | WS_MINIMIZE | WS_MAXIMIZE); if (data->desired_state.wm_state != WithdrawnState) old_style |= WS_VISIBLE; - /* don't try mapping the window if it is outside of the virtual screen */ - if (!(new_style & WS_MINIMIZE) && !is_window_rect_mapped( &data->rects.window )) new_style &= ~WS_VISIBLE; - release_win_data( data ); /* layered windows are mapped only once their attributes are set */ @@ -3179,9 +3169,6 @@ void X11DRV_UpdateLayeredWindow( HWND hwnd, UINT flags ) old_style = new_style & ~(WS_VISIBLE | WS_MINIMIZE | WS_MAXIMIZE); if (data->desired_state.wm_state != WithdrawnState) old_style |= WS_VISIBLE; - /* don't try mapping the window if it is outside of the virtual screen */ - if (!(new_style & WS_MINIMIZE) && !is_window_rect_mapped( &data->rects.window )) new_style &= ~WS_VISIBLE; - release_win_data( data ); /* layered windows are mapped only once their attributes are set */ diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 860ba22eae4..607892b2f51 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -850,15 +850,6 @@ extern void xim_set_focus( HWND hwnd, BOOL focus ); #define XEMBED_MAPPED (1 << 0) -static inline BOOL is_window_rect_mapped( const RECT *rect ) -{ - RECT virtual_rect = NtUserGetVirtualScreenRect( MDT_RAW_DPI ); - return (rect->left < virtual_rect.right && - rect->top < virtual_rect.bottom && - max( rect->right, rect->left + 1 ) > virtual_rect.left && - max( rect->bottom, rect->top + 1 ) > virtual_rect.top); -} - /* unixlib interface */ extern NTSTATUS x11drv_tablet_attach_queue( void *arg ); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/6926