Browse Source

qt: do not use HAVE_QT_WAYLAND

pull/162/head
Fatih Uzunoglu 2 years ago
committed by Steve Lhomme
parent
commit
9f6afa3645
  1. 11
      modules/gui/qt/Makefile.am
  2. 2
      modules/gui/qt/maininterface/mainctx.cpp
  3. 2
      modules/gui/qt/maininterface/mainctx.hpp
  4. 8
      modules/gui/qt/maininterface/video_window_handler.cpp
  5. 2
      modules/gui/qt/maininterface/video_window_handler.hpp

11
modules/gui/qt/Makefile.am

@ -55,15 +55,6 @@ vlc_qt_check_CXXFLAGS += $(XCB_CFLAGS) -DQT_HAS_X11
endif
endif
if HAVE_QT_WAYLAND
libqt_plugin_la_CPPFLAGS += $(QT_WAYLAND_CFLAGS)
libqt_plugin_la_LIBADD += $(QT_WAYLAND_LIBS)
libqt_plugin_la_LDFLAGS += $(QT_WAYLAND_LDFLAGS)
vlc_qt_check_CPPFLAGS += $(QT_WAYLAND_CFLAGS) -DQT_HAS_WAYLAND
vlc_qt_check_LDADD += $(QT_WAYLAND_LIBS)
vlc_qt_check_LDFLAGS += $(QT_WAYLAND_LDFLAGS)
endif
if HAVE_WIN32
libqt_plugin_la_CXXFLAGS += $(LIBCOMCXXFLAGS)
libqt_plugin_la_LIBADD += $(LIBCOM) -lcomctl32 -luuid -ldwmapi
@ -576,7 +567,6 @@ endif
# wayland compositor
if HAVE_WAYLAND
if HAVE_QT_WAYLAND
if HAVE_QT_GUI_PRIVATE
libqt_plugin_la_CPPFLAGS += -DQT_HAS_WAYLAND_COMPOSITOR
@ -599,7 +589,6 @@ if ENABLE_QT
gui_LTLIBRARIES += libqt_wayland_plugin.la
endif
endif
endif
endif

2
modules/gui/qt/maininterface/mainctx.cpp

@ -164,9 +164,7 @@ MainCtx::MainCtx(qt_intf_t *_p_intf)
QString platformName = QGuiApplication::platformName();
#ifdef QT_HAS_WAYLAND
b_hasWayland = platformName.startsWith(QLatin1String("wayland"), Qt::CaseInsensitive);
#endif
/*********************************
* Create the Systray Management *

2
modules/gui/qt/maininterface/mainctx.hpp

@ -303,9 +303,7 @@ protected:
bool b_playlistDocked = false;
QWindow::Visibility m_windowVisibility = QWindow::Windowed;
bool b_interfaceOnTop = false; ///keep UI on top
#ifdef QT_HAS_WAYLAND
bool b_hasWayland = false;
#endif
bool b_hasMedialibrary = false;
MediaLib* m_medialib = nullptr;
bool m_gridView = false;

8
modules/gui/qt/maininterface/video_window_handler.cpp

@ -128,11 +128,8 @@ void VideoWindowHandler::setVideoFullScreen( bool fs )
{
QRect screenres = screenList[numscreen]->geometry();
m_lastWinScreen = m_window->screen();
#ifdef QT_HAS_WAYLAND
if( !m_hasWayland )
m_window->setScreen(screenList[numscreen]);
#endif
m_window->setScreen(screenList[numscreen]);
/* To be sure window is on proper-screen in xinerama */
if( !screenres.contains( m_window->position() ) )
@ -146,13 +143,8 @@ void VideoWindowHandler::setVideoFullScreen( bool fs )
{
bool hold = WindowStateHolder::holdFullscreen(m_window, WindowStateHolder::VIDEO, false);
#ifdef QT_HAS_WAYLAND
if( m_lastWinScreen != NULL && !m_hasWayland )
m_window->setScreen(m_lastWinScreen);
#else
if( m_lastWinScreen != NULL )
m_window->setScreen(m_lastWinScreen);
#endif
if( !hold && m_lastWinGeometry.isNull() == false )
{
m_window->setGeometry( m_lastWinGeometry );

2
modules/gui/qt/maininterface/video_window_handler.hpp

@ -68,9 +68,7 @@ private:
QRect m_lastWinGeometry;
QScreen* m_lastWinScreen = nullptr;
#ifdef QT_HAS_WAYLAND
bool m_hasWayland = false;
#endif
};
#endif // VIDEOWINDOWHANDLER_HPP

Loading…
Cancel
Save