user32: Leave critical section before calling callbacks in EnumDisplayMonitors().
Previously, callbacks were called with a critical section held. It was intended that monitor handles passed to callbacks should always be valid. But it created a deadlock condition when callbacks call other functions which try to grab the critical section using a different thread. Tests also show that a monitor handle can be invalid after a display change. So do not hold the critical section when calling callbacks. Monitor handles will be checked when passed to GetMonitorInfo(), which is the sole function that consumes HMONITORs. Signed-off-by:Zhiyi Zhang <zzhang@codeweavers.com> Signed-off-by:
Alexandre Julliard <julliard@winehq.org>
Loading
Please register or sign in to comment