qt: fix build when QT5_HAS_XCB but !QT5_HAS_X11
authorTristan Matthews <tmatth@videolan.org>
Mon, 29 May 2017 19:27:17 +0000 (15:27 -0400)
committerHugo Beauzée-Luyssen <hugo@beauzee.fr>
Tue, 30 May 2017 07:33:53 +0000 (09:33 +0200)
Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
modules/gui/qt/components/interface_widgets.cpp

index 0f3dd29..7ca12a1 100644 (file)
@@ -262,7 +262,8 @@ void VideoWidget::setSize( unsigned int w, unsigned int h )
 
 bool VideoWidget::nativeEvent( const QByteArray& eventType, void* message, long* )
 {
-#if defined(QT5_HAS_XCB)
+#if defined(QT5_HAS_X11)
+# if defined(QT5_HAS_XCB)
     if ( eventType == "xcb_generic_event_t" )
     {
         const xcb_generic_event_t* xev = static_cast<const xcb_generic_event_t*>( message );
@@ -270,6 +271,7 @@ bool VideoWidget::nativeEvent( const QByteArray& eventType, void* message, long*
         if ( xev->response_type == XCB_CONFIGURE_NOTIFY )
             reportSize();
     }
+# endif
 #endif
 #ifdef _WIN32
     if ( eventType == "windows_generic_MSG" )