From f6e1dd51fa5a653144f7aa595f45b979adb10820 Mon Sep 17 00:00:00 2001 From: Andrew Nelless Date: Mon, 8 Aug 2016 11:23:59 +0100 Subject: [PATCH] #4768 Workaround locking issue in X11 getCurrentTime() --- src/lib/platform/XWindowsUtil.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/platform/XWindowsUtil.cpp b/src/lib/platform/XWindowsUtil.cpp index 205e4e18..6b016d21 100644 --- a/src/lib/platform/XWindowsUtil.cpp +++ b/src/lib/platform/XWindowsUtil.cpp @@ -1432,6 +1432,7 @@ XWindowsUtil::getCurrentTime(Display* display, Window window) // select property events on window XWindowAttributes attr; XGetWindowAttributes(display, window, &attr); + XLockDisplay(display); XSelectInput(display, window, attr.your_event_mask | PropertyChangeMask); // make a property name to receive dummy change @@ -1459,6 +1460,7 @@ XWindowsUtil::getCurrentTime(Display* display, Window window) // restore event mask XSelectInput(display, window, attr.your_event_mask); + XUnlockDisplay(display); return xevent.xproperty.time; }