mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-14 19:35:42 +00:00
winewayland.drv: Avoid deadlock when determining whether a window is managed.
The is_window_managed function may acquire the (non-recursive) win_data lock internally (is_window_managed->has_owned_popups->is_managed), so do not call it with the win_data lock held. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55995
This commit is contained in:
parent
f43246a389
commit
a71ec54df8
|
@ -463,17 +463,23 @@ void WAYLAND_WindowPosChanged(HWND hwnd, HWND insert_after, UINT swp_flags,
|
|||
const RECT *visible_rect, const RECT *valid_rects,
|
||||
struct window_surface *surface)
|
||||
{
|
||||
struct wayland_win_data *data = wayland_win_data_get(hwnd);
|
||||
struct wayland_win_data *data;
|
||||
BOOL managed;
|
||||
|
||||
TRACE("hwnd %p window %s client %s visible %s after %p flags %08x\n",
|
||||
hwnd, wine_dbgstr_rect(window_rect), wine_dbgstr_rect(client_rect),
|
||||
wine_dbgstr_rect(visible_rect), insert_after, swp_flags);
|
||||
|
||||
if (!data) return;
|
||||
/* Get the managed state with win_data unlocked, as is_window_managed
|
||||
* may need to query win_data information about other HWNDs and thus
|
||||
* acquire the lock itself internally. */
|
||||
managed = is_window_managed(hwnd, swp_flags, window_rect);
|
||||
|
||||
if (!(data = wayland_win_data_get(hwnd))) return;
|
||||
|
||||
data->window_rect = *window_rect;
|
||||
data->client_rect = *client_rect;
|
||||
data->managed = is_window_managed(hwnd, swp_flags, window_rect);
|
||||
data->managed = managed;
|
||||
|
||||
if (surface) window_surface_add_ref(surface);
|
||||
if (data->window_surface) window_surface_release(data->window_surface);
|
||||
|
|
Loading…
Reference in a new issue