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
---
Note: WineX11 also calls `is_window_managed` with win_data locked, but its win_data mutex is recursive. I haven't found a compelling reason to use a recursive win_data mutex in the Wayland driver yet, hence this fix.
---
A simple way to reproduce the deadlock is: 1. Run winecfg 2. Go to the "Desktop Integration" tab 3. Click on OK