Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Xorg hang in Elder Scrolls Online Installer (306130) #186

Open
wants to merge 1 commit into
base: experimental_7.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 24 additions & 17 deletions dlls/winex11.drv/window.c
Original file line number Diff line number Diff line change
Expand Up @@ -1578,18 +1578,22 @@ static HWND sync_window_position( struct x11drv_win_data *data,
if (changes.width <= 0 || changes.height <= 0) changes.width = changes.height = 1;
if (changes.width > 65535) changes.width = 65535;
if (changes.height > 65535) changes.height = 65535;
mask |= CWWidth | CWHeight;
}

/* only the size is allowed to change for the desktop window */
if (data->whole_window != root_window)
{
POINT pt = virtual_screen_to_root( data->whole_rect.left, data->whole_rect.top );
POINT old_pt = virtual_screen_to_root( old_whole_rect->left, old_whole_rect->top );
changes.x = pt.x;
changes.y = pt.y;
mask |= CWX | CWY;
if (changes.x != old_pt.x) mask |= CWX;
if (changes.y != old_pt.y) mask |= CWY;
}

if (changes.width != old_whole_rect->right - old_whole_rect->left) mask |= CWWidth;
if (changes.height != old_whole_rect->bottom - old_whole_rect->top) mask |= CWHeight;

if (!(swp_flags & SWP_NOZORDER) || (swp_flags & SWP_SHOWWINDOW))
{
/* find window that this one must be after */
Expand All @@ -1606,23 +1610,26 @@ static HWND sync_window_position( struct x11drv_win_data *data,
/* and Above with a sibling doesn't work so well either, so we ignore it */
}

set_size_hints( data, style );
set_mwm_hints( data, style, ex_style );
/* KWin doesn't allow moving a window with _NET_WM_STATE_FULLSCREEN set. So we need to remove
* _NET_WM_STATE_FULLSCREEN before moving the window and restore it later */
if (wm_is_kde( data->display ) && is_window_rect_full_screen( &data->whole_rect ))
{
original_rect = data->whole_rect;
SetRectEmpty( &data->whole_rect );
}
update_net_wm_states( data );
data->configure_serial = NextRequest( data->display );
XReconfigureWMWindow( data->display, data->whole_window, data->vis.screen, mask, &changes );

if (!IsRectEmpty( &original_rect ))
if (mask)
{
data->whole_rect = original_rect;
set_size_hints( data, style );
set_mwm_hints( data, style, ex_style );
/* KWin doesn't allow moving a window with _NET_WM_STATE_FULLSCREEN set. So we need to remove
* _NET_WM_STATE_FULLSCREEN before moving the window and restore it later */
if (wm_is_kde( data->display ) && is_window_rect_full_screen( &data->whole_rect ))
{
original_rect = data->whole_rect;
SetRectEmpty( &data->whole_rect );
}
update_net_wm_states( data );
data->configure_serial = NextRequest( data->display );
XReconfigureWMWindow( data->display, data->whole_window, data->vis.screen, mask, &changes );

if (!IsRectEmpty( &original_rect ))
{
data->whole_rect = original_rect;
update_net_wm_states( data );
}
}
#ifdef HAVE_LIBXSHAPE
if (IsRectEmpty( old_window_rect ) != IsRectEmpty( &data->window_rect ))
Expand Down