Commit 32972786 authored by Rafał Malinowski's avatar Rafał Malinowski

qt5: better X11 support

Signed-off-by: Rafał Malinowski's avatarRafał Malinowski <rafal.przemyslaw.malinowski@gmail.com>
parent 59b5005f
......@@ -25,6 +25,7 @@ endif ()
find_package (Qt5Core 5.1)
if (Qt5Core_FOUND)
find_package (Qt5LinguistTools REQUIRED)
find_package (Qt5X11Extras REQUIRED)
else ()
set (QT_USE_IMPORTED_TARGETS TRUE)
find_package (Qt4 4.8 REQUIRED)
......
......@@ -85,7 +85,7 @@ else ()
)
endif ()
if (UNIX AND NOT APPLE AND NOT Qt5Core_FOUND)
if (UNIX AND NOT APPLE)
list (APPEND kadu_SRCS
os/x11tools.cpp
)
......@@ -167,7 +167,7 @@ endif ()
include_directories (${LibArchive_INCLUDE_DIRS})
list (APPEND ADDITIONAL_LIBRARIES ${LibArchive_LIBRARIES})
if (UNIX AND NOT APPLE AND NOT Qt5Core_FOUND)
if (UNIX AND NOT APPLE)
find_package (X11 REQUIRED COMPONENTS X11 Xutil Xfixes)
if (X11_FOUND AND X11_Xutil_FOUND AND X11_Xfixes_FOUND)
message (STATUS "Found required X11 libraries: ${X11_X11_LIB};${X11_Xfixes_LIB}")
......@@ -234,7 +234,7 @@ endif ()
if (Qt5Core_FOUND)
qt5_use_modules (libkadu LINK_PRIVATE Core Gui Widgets Xml Network WebKit WebKitWidgets Declarative)
if (UNIX AND NOT APPLE)
qt5_use_modules (libkadu LINK_PRIVATE DBus)
qt5_use_modules (libkadu LINK_PRIVATE DBus X11Extras)
endif ()
else ()
qt4_use_modules (libkadu LINK_PRIVATE Core Gui Xml Network WebKit Declarative)
......
......@@ -2,9 +2,9 @@
#include "activate.h"
#ifdef Q_WS_X11
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
#include <QtGui/QX11Info>
#include <QtX11Extras/QX11Info>
#include "configuration/configuration-file.h"
#include "os/x11tools.h"
......@@ -103,7 +103,7 @@
bool _isWindowActiveOrFullyVisible( QWidget *window )
{
#ifdef Q_WS_X11
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
if( _isActiveWindow( window ) )
return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment