From cbdff6d00d5638992698e273cce9209e0bd9a000 Mon Sep 17 00:00:00 2001 From: imn Date: Tue, 15 Dec 2015 12:24:37 +0300 Subject: [PATCH] Minor correction to prev. commit --- src/SVTK/SVTK_SpaceMouse.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/SVTK/SVTK_SpaceMouse.cxx b/src/SVTK/SVTK_SpaceMouse.cxx index a199829fd..0c9af8ca6 100644 --- a/src/SVTK/SVTK_SpaceMouse.cxx +++ b/src/SVTK/SVTK_SpaceMouse.cxx @@ -39,7 +39,6 @@ #include #else #include -#include #endif #endif @@ -333,9 +332,13 @@ int SVTK_SpaceMouseXCB::setWindow( xcb_connection_t *connection, xcb_window_t wi cookie = xcb_send_event( connection, 0, win, 0x0000, (const char *)&xcbEvent ); + if (( error = xcb_request_check( connection, cookie ))) { - fprintf ( stderr, "SpaceMouse reported error = %s. Exit ... \n", xcb_event_get_label( error->response_type ) ); + if ( error->error_code != BadWindow ) + { + fprintf ( stderr, "SpaceMouse reported error = %s. Exit ... \n", "BadWindow"); + } return 0; } -- 2.39.2