From 794c81c1eab54cb58f2143ab3efc90e9c4bf9092 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Thu, 25 Aug 2011 13:39:07 +0200 Subject: Move XCB event reading to a separate thread. Work-around for bug in XCB which causes a xcb_wait_for_reply to block if xcb_poll_for_events() is called simultaneously from a different thread. If the XCB version is too old this work-around causes even more problems, so we kill two birds with one stone by only using the work-around if the XCB version has the recent xcb_poll_for_queue_event() function, which we also need to read events from a separate thread with reasonable efficiency. Change-Id: I8a899dad6ded381ce42cba0112e77da3c8aa6887 Reviewed-on: http://codereview.qt.nokia.com/3612 Reviewed-by: Lars Knoll --- configure | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'configure') diff --git a/configure b/configure index 987242e537..7f8491ed70 100755 --- a/configure +++ b/configure @@ -750,6 +750,7 @@ CFG_DECORATION_PLUGIN= CFG_XINPUT=runtime CFG_XKB=auto CFG_XCB=auto +CFG_XCB_LIMITED=yes CFG_NIS=auto CFG_CUPS=auto CFG_ICONV=auto @@ -6248,6 +6249,11 @@ if [ "$PLATFORM_QPA" = "yes" ]; then QT_CONFIG="$QT_CONFIG xcb-render" fi + if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb-poll-for-queued-event "xcb-poll-for-queued-event" $L_FLAGS $I_FLAGS $l_FLAGS; then + CFG_XCB_LIMITED=no + QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event" + fi + if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb-xlib "xcb-xlib" $L_FLAGS $I_FLAGS $l_FLAGS; then QT_CONFIG="$QT_CONFIG xcb-xlib" fi @@ -8760,7 +8766,11 @@ if [ "$PLATFORM_MAC" = "yes" ]; then fi echo "ICD support ............ $CFG_ICD" echo "libICU support ......... $CFG_ICU" -echo "Xcb support ............ $CFG_XCB" +if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then + echo "Xcb support ............ limited (old version)" +else + echo "Xcb support ............ $CFG_XCB" +fi echo [ "$CFG_PTMALLOC" != "no" ] && echo "Use ptmalloc ........... $CFG_PTMALLOC" -- cgit v1.2.3