2017-09-12 19:14:03 +03:00
|
|
|
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
|
|
|
|
|
2014-03-18 17:39:42 +04:00
|
|
|
project(KWIN)
|
2018-05-18 17:56:08 +03:00
|
|
|
set(PROJECT_VERSION "5.13.80")
|
2014-08-20 17:43:27 +04:00
|
|
|
set(PROJECT_VERSION_MAJOR 5)
|
2014-03-18 17:39:42 +04:00
|
|
|
|
2017-10-16 18:25:21 +03:00
|
|
|
set(QT_MIN_VERSION "5.9.0")
|
2018-01-13 18:17:46 +03:00
|
|
|
set(KF5_MIN_VERSION "5.42.0")
|
2014-03-18 17:39:42 +04:00
|
|
|
|
2014-03-26 20:47:15 +04:00
|
|
|
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH} )
|
2014-03-18 17:39:42 +04:00
|
|
|
|
2017-08-25 19:18:20 +03:00
|
|
|
find_package(ECM 5.38 REQUIRED NO_MODULE)
|
2014-03-18 17:39:42 +04:00
|
|
|
|
|
|
|
include(FeatureSummary)
|
|
|
|
include(WriteBasicConfigVersionFile)
|
2014-04-03 12:15:57 +04:00
|
|
|
include(GenerateExportHeader)
|
2014-03-18 17:39:42 +04:00
|
|
|
|
|
|
|
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
|
|
|
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
|
|
|
|
|
|
|
|
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
|
|
|
|
Concurrent
|
|
|
|
Core
|
|
|
|
DBus
|
|
|
|
Quick
|
2014-10-31 09:53:04 +03:00
|
|
|
QuickWidgets
|
2017-11-06 19:00:15 +03:00
|
|
|
Sensors
|
2014-03-18 17:39:42 +04:00
|
|
|
Script
|
|
|
|
UiTools
|
|
|
|
Widgets
|
|
|
|
X11Extras
|
|
|
|
)
|
2014-04-17 00:26:01 +04:00
|
|
|
|
|
|
|
find_package(Qt5Test ${QT_MIN_VERSION} CONFIG QUIET)
|
|
|
|
set_package_properties(Qt5Test PROPERTIES
|
|
|
|
PURPOSE "Required for tests"
|
|
|
|
TYPE OPTIONAL
|
|
|
|
)
|
|
|
|
add_feature_info("Qt5Test" Qt5Test_FOUND "Required for building tests")
|
|
|
|
if (NOT Qt5Test_FOUND)
|
|
|
|
set(BUILD_TESTING OFF CACHE BOOL "Build the testing tree.")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
include(KDEInstallDirs)
|
|
|
|
include(KDECMakeSettings)
|
2016-01-28 17:08:23 +03:00
|
|
|
include(KDECompilerSettings NO_POLICY_SCOPE)
|
2014-04-17 00:26:01 +04:00
|
|
|
|
|
|
|
include(ECMInstallIcons)
|
2015-02-19 19:12:18 +03:00
|
|
|
include(ECMOptionalAddSubdirectory)
|
2014-04-17 00:26:01 +04:00
|
|
|
|
2015-11-05 17:14:06 +03:00
|
|
|
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0 -DQT_USE_QSTRINGBUILDER)
|
2014-03-18 17:39:42 +04:00
|
|
|
|
Require C++14
Summary:
KWin already used C++14 constructs in a conditional way. This doesn't
make much sense today, it's better to just require C++14.
For KWin only gcc and clang are currently compilers of relevance. Gcc
supports C++14 since version 5 and defaults to C++14 since 6.1 [1].
Clang supports C++14 since version 3.4 [2].
An overview of compiler support in various distributions:
* Debian stable (stretch): gcc 6.3, clang 3.8
* Debian oldstable (jessie): 4.9, clang 3.5
* Ubuntu 17.04: gcc 6.1, clang 3.8
* Ubuntu 16.04: gcc 5.3, clang 3.8
* openSUSE Tumbleweed: gcc 7.1, clang 4.0
* openSUSE Leap 42.3: gcc ?, clang ? [3]
* FreeBSD: clang >= 34 in ports
* Slackware 14.2: gcc 5.3
This overview shows that every distro out there has at least one
supported compiler which can still compile KWin with this change.
[1] https://gcc.gnu.org/projects/cxx-status.html#cxx14
[2] https://clang.llvm.org/cxx_status
[3] Sorry I fail to understand openSUSE's package repository.
It seems that there is gcc 7 available, but gcc package is 4.8
Test Plan: Compiles on my neon system
Reviewers: #plasma
Subscribers: plasma-devel, kwin, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D6634
2017-07-11 21:08:50 +03:00
|
|
|
set(CMAKE_CXX_STANDARD 14)
|
2017-02-07 22:49:22 +03:00
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
2014-05-14 12:13:23 +04:00
|
|
|
|
2017-07-28 08:00:56 +03:00
|
|
|
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-inconsistent-missing-override")
|
|
|
|
endif()
|
|
|
|
|
2014-04-02 14:02:36 +04:00
|
|
|
find_package(Qt5Multimedia QUIET)
|
|
|
|
set_package_properties(Qt5Multimedia PROPERTIES
|
|
|
|
PURPOSE "Runtime-only dependency for effect video playback"
|
|
|
|
TYPE RUNTIME
|
|
|
|
)
|
|
|
|
|
2014-03-18 17:39:42 +04:00
|
|
|
|
|
|
|
# required frameworks by Core
|
2014-09-19 09:44:42 +04:00
|
|
|
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
|
2014-03-18 17:39:42 +04:00
|
|
|
Config
|
|
|
|
ConfigWidgets
|
|
|
|
CoreAddons
|
|
|
|
Crash
|
|
|
|
GlobalAccel
|
|
|
|
I18n
|
2014-04-03 12:15:57 +04:00
|
|
|
Init
|
2014-03-18 17:39:42 +04:00
|
|
|
Notifications
|
2015-07-06 17:50:33 +03:00
|
|
|
Package
|
2014-03-18 17:39:42 +04:00
|
|
|
Plasma
|
|
|
|
WidgetsAddons
|
|
|
|
WindowSystem
|
2015-03-19 03:15:22 +03:00
|
|
|
IconThemes
|
2015-11-06 14:57:24 +03:00
|
|
|
IdleTime
|
2016-07-01 08:54:53 +03:00
|
|
|
Wayland
|
2014-03-18 17:39:42 +04:00
|
|
|
)
|
|
|
|
# required frameworks by config modules
|
2014-09-19 09:44:42 +04:00
|
|
|
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
|
2014-03-18 17:39:42 +04:00
|
|
|
Completion
|
2014-04-02 14:02:36 +04:00
|
|
|
Declarative
|
2014-03-18 17:39:42 +04:00
|
|
|
KCMUtils
|
|
|
|
KIO
|
2016-11-02 00:13:42 +03:00
|
|
|
TextWidgets
|
2014-03-18 17:39:42 +04:00
|
|
|
NewStuff
|
2015-07-07 18:35:57 +03:00
|
|
|
Service
|
2014-03-18 17:39:42 +04:00
|
|
|
XmlGui
|
|
|
|
)
|
|
|
|
|
2015-03-31 10:30:19 +03:00
|
|
|
find_package(Threads)
|
|
|
|
set_package_properties(Threads PROPERTIES
|
|
|
|
PURPOSE "Needed for VirtualTerminal support in KWin Wayland"
|
|
|
|
TYPE REQUIRED
|
|
|
|
)
|
|
|
|
|
2014-03-18 17:39:42 +04:00
|
|
|
# optional frameworks
|
2014-09-19 09:44:42 +04:00
|
|
|
find_package(KF5Activities ${KF5_MIN_VERSION} CONFIG)
|
2014-04-23 22:28:30 +04:00
|
|
|
set_package_properties(KF5Activities PROPERTIES
|
|
|
|
PURPOSE "Enable building of KWin with kactivities support"
|
|
|
|
TYPE OPTIONAL
|
|
|
|
)
|
|
|
|
add_feature_info("KF5Activities" KF5Activities_FOUND "Enable building of KWin with kactivities support")
|
|
|
|
|
2014-09-19 09:44:42 +04:00
|
|
|
find_package(KF5DocTools ${KF5_MIN_VERSION} CONFIG)
|
2014-04-23 22:28:30 +04:00
|
|
|
set_package_properties(KF5DocTools PROPERTIES
|
|
|
|
PURPOSE "Enable building documentation"
|
|
|
|
TYPE OPTIONAL
|
|
|
|
)
|
|
|
|
add_feature_info("KF5DocTools" KF5DocTools_FOUND "Enable building documentation")
|
2014-03-18 17:39:42 +04:00
|
|
|
|
2018-07-24 14:55:22 +03:00
|
|
|
find_package(KDecoration2 5.13.0 CONFIG REQUIRED)
|
2014-09-19 15:59:51 +04:00
|
|
|
|
2015-11-05 16:09:23 +03:00
|
|
|
find_package(KScreenLocker CONFIG REQUIRED)
|
|
|
|
set_package_properties(KScreenLocker PROPERTIES
|
|
|
|
TYPE REQUIRED
|
|
|
|
PURPOSE "For screenlocker integration in kwin_wayland")
|
|
|
|
|
2017-02-17 16:59:20 +03:00
|
|
|
find_package(Breeze 5.9.0 CONFIG)
|
2016-04-07 15:25:42 +03:00
|
|
|
set_package_properties(Breeze PROPERTIES
|
|
|
|
TYPE OPTIONAL
|
|
|
|
PURPOSE "For setting the default window decoration plugin")
|
|
|
|
if(${Breeze_FOUND})
|
|
|
|
if(${BREEZE_WITH_KDECORATION})
|
|
|
|
set(HAVE_BREEZE_DECO true)
|
|
|
|
else()
|
|
|
|
set(HAVE_BREEZE_DECO FALSE)
|
|
|
|
endif()
|
|
|
|
else()
|
|
|
|
set(HAVE_BREEZE_DECO FALSE)
|
|
|
|
endif()
|
|
|
|
add_feature_info("Breeze-Decoration" HAVE_BREEZE_DECO "Default decoration plugin Breeze")
|
|
|
|
|
2014-03-18 17:39:42 +04:00
|
|
|
find_package(EGL)
|
|
|
|
set_package_properties(EGL PROPERTIES
|
2014-02-10 20:34:09 +04:00
|
|
|
TYPE RUNTIME
|
2014-03-18 17:39:42 +04:00
|
|
|
PURPOSE "Required to build KWin with EGL support"
|
|
|
|
)
|
|
|
|
|
2014-02-10 20:34:09 +04:00
|
|
|
find_package(epoxy)
|
|
|
|
set_package_properties(epoxy PROPERTIES DESCRIPTION "libepoxy"
|
|
|
|
URL "http://github.com/anholt/libepoxy"
|
|
|
|
TYPE REQUIRED
|
|
|
|
PURPOSE "OpenGL dispatch library"
|
|
|
|
)
|
|
|
|
|
2016-11-22 10:34:59 +03:00
|
|
|
set(HAVE_DL_LIBRARY FALSE)
|
|
|
|
if(epoxy_HAS_GLX)
|
|
|
|
find_library(DL_LIBRARY dl)
|
|
|
|
if(DL_LIBRARY)
|
|
|
|
set(HAVE_DL_LIBRARY TRUE)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2015-11-30 10:34:52 +03:00
|
|
|
find_package(Wayland 1.2 REQUIRED COMPONENTS Cursor OPTIONAL_COMPONENTS Egl)
|
2014-03-18 17:39:42 +04:00
|
|
|
set_package_properties(Wayland PROPERTIES
|
2015-08-10 15:50:45 +03:00
|
|
|
TYPE REQUIRED
|
2014-03-18 17:39:42 +04:00
|
|
|
PURPOSE "Required for building KWin with Wayland support"
|
|
|
|
)
|
2015-11-30 10:34:52 +03:00
|
|
|
add_feature_info("Wayland::EGL" Wayland_Egl_FOUND "Enable building of Wayland backend and QPA with EGL support.")
|
|
|
|
set(HAVE_WAYLAND_EGL FALSE)
|
|
|
|
if(Wayland_Egl_FOUND)
|
|
|
|
set(HAVE_WAYLAND_EGL TRUE)
|
|
|
|
endif()
|
2014-08-19 11:31:31 +04:00
|
|
|
|
2016-12-26 13:59:10 +03:00
|
|
|
find_package(XKB 0.7.0)
|
2014-03-18 17:39:42 +04:00
|
|
|
set_package_properties(XKB PROPERTIES
|
2015-08-10 15:50:45 +03:00
|
|
|
TYPE REQUIRED
|
2014-03-18 17:39:42 +04:00
|
|
|
PURPOSE "Required for building KWin with Wayland support"
|
|
|
|
)
|
|
|
|
|
2018-01-16 22:54:11 +03:00
|
|
|
find_package(Libinput 1.9)
|
2018-01-23 19:28:18 +03:00
|
|
|
set_package_properties(Libinput PROPERTIES TYPE REQUIRED PURPOSE "Required for input handling on Wayland.")
|
2014-08-14 16:43:57 +04:00
|
|
|
|
|
|
|
find_package(UDev)
|
|
|
|
set_package_properties(UDev PROPERTIES URL "http://www.freedesktop.org/software/systemd/libudev/"
|
|
|
|
DESCRIPTION "Linux device library."
|
2018-01-23 19:28:18 +03:00
|
|
|
TYPE REQUIRED
|
2014-08-14 16:43:57 +04:00
|
|
|
PURPOSE "Required for input handling on Wayland."
|
|
|
|
)
|
|
|
|
|
2016-10-17 17:12:48 +03:00
|
|
|
find_package(Libdrm 2.4.62)
|
2015-04-09 15:49:32 +03:00
|
|
|
set_package_properties(Libdrm PROPERTIES TYPE OPTIONAL PURPOSE "Required for drm output on Wayland.")
|
|
|
|
set(HAVE_DRM FALSE)
|
2018-01-23 19:28:18 +03:00
|
|
|
if(Libdrm_FOUND)
|
2015-04-09 15:49:32 +03:00
|
|
|
set(HAVE_DRM TRUE)
|
|
|
|
endif()
|
|
|
|
|
2015-04-10 11:44:07 +03:00
|
|
|
find_package(gbm)
|
|
|
|
set_package_properties(gbm PROPERTIES TYPE OPTIONAL PURPOSE "Required for egl ouput of drm backend.")
|
|
|
|
set(HAVE_GBM FALSE)
|
|
|
|
if(HAVE_DRM AND gbm_FOUND)
|
|
|
|
set(HAVE_GBM TRUE)
|
|
|
|
endif()
|
|
|
|
|
2015-05-06 18:47:07 +03:00
|
|
|
find_package(libhybris)
|
|
|
|
set_package_properties(libhybris PROPERTIES TYPE OPTIONAL PURPOSE "Required for libhybris backend")
|
2015-05-08 14:19:04 +03:00
|
|
|
set(HAVE_LIBHYBRIS ${libhybris_FOUND})
|
2015-05-06 18:47:07 +03:00
|
|
|
|
2014-03-18 17:39:42 +04:00
|
|
|
find_package(X11)
|
|
|
|
set_package_properties(X11 PROPERTIES DESCRIPTION "X11 libraries"
|
|
|
|
URL "http://www.x.org"
|
|
|
|
TYPE REQUIRED
|
|
|
|
)
|
2016-01-13 17:40:02 +03:00
|
|
|
add_feature_info("XInput" X11_Xinput_FOUND "Required for poll-free mouse cursor updates")
|
|
|
|
set(HAVE_X11_XINPUT ${X11_Xinput_FOUND})
|
2014-03-18 17:39:42 +04:00
|
|
|
|
|
|
|
# All the required XCB components
|
2015-06-04 19:39:04 +03:00
|
|
|
find_package(XCB 1.10
|
2014-06-11 09:51:07 +04:00
|
|
|
REQUIRED COMPONENTS
|
|
|
|
XCB
|
|
|
|
XFIXES
|
|
|
|
DAMAGE
|
|
|
|
COMPOSITE
|
|
|
|
SHAPE
|
|
|
|
SYNC
|
|
|
|
RENDER
|
|
|
|
RANDR
|
|
|
|
KEYSYMS
|
|
|
|
IMAGE
|
|
|
|
SHM
|
2014-09-18 19:09:16 +04:00
|
|
|
GLX
|
2015-06-04 18:50:29 +03:00
|
|
|
CURSOR
|
2014-06-11 09:51:07 +04:00
|
|
|
ICCCM
|
2014-03-18 17:39:42 +04:00
|
|
|
)
|
|
|
|
set_package_properties(XCB PROPERTIES TYPE REQUIRED)
|
|
|
|
|
|
|
|
# and the optional XCB dependencies
|
2014-06-11 09:51:07 +04:00
|
|
|
if (XCB_ICCCM_VERSION VERSION_LESS "0.4")
|
|
|
|
set(XCB_ICCCM_FOUND FALSE)
|
|
|
|
endif()
|
2014-03-18 17:39:42 +04:00
|
|
|
add_feature_info("XCB-ICCCM" XCB_ICCCM_FOUND "Required for building test applications for KWin")
|
|
|
|
|
2015-03-19 13:07:49 +03:00
|
|
|
find_package(X11_XCB)
|
|
|
|
set_package_properties(X11_XCB PROPERTIES
|
2015-08-11 14:50:35 +03:00
|
|
|
PURPOSE "Required for building X11 windowed backend of kwin_wayland"
|
2015-03-19 13:07:49 +03:00
|
|
|
TYPE OPTIONAL)
|
|
|
|
|
2015-08-14 17:52:40 +03:00
|
|
|
# dependencies for QPA plugin
|
2017-10-16 18:25:21 +03:00
|
|
|
find_package(Qt5FontDatabaseSupport REQUIRED)
|
|
|
|
find_package(Qt5ThemeSupport REQUIRED)
|
|
|
|
find_package(Qt5EventDispatcherSupport REQUIRED)
|
2016-10-27 03:43:21 +03:00
|
|
|
|
2015-08-14 17:52:40 +03:00
|
|
|
find_package(Freetype REQUIRED)
|
|
|
|
set_package_properties(Freetype PROPERTIES DESCRIPTION "A font rendering engine"
|
|
|
|
URL "http://www.freetype.org"
|
|
|
|
TYPE REQUIRED
|
|
|
|
PURPOSE "Needed for KWin's QPA plugin."
|
|
|
|
)
|
|
|
|
find_package(Fontconfig REQUIRED)
|
|
|
|
set_package_properties(Fontconfig PROPERTIES DESCRIPTION "Font access configuration library"
|
|
|
|
URL "http://www.freedesktop.org/wiki/Software/fontconfig"
|
|
|
|
TYPE REQUIRED
|
|
|
|
PURPOSE "Needed for KWin's QPA plugin."
|
|
|
|
)
|
|
|
|
|
2016-02-03 17:48:13 +03:00
|
|
|
find_package(Xwayland)
|
|
|
|
set_package_properties(Xwayland PROPERTIES
|
|
|
|
URL "http://x.org"
|
|
|
|
DESCRIPTION "Xwayland X server"
|
|
|
|
TYPE RUNTIME
|
|
|
|
PURPOSE "Needed for running kwin_wayland"
|
|
|
|
)
|
|
|
|
|
2017-09-10 13:05:29 +03:00
|
|
|
find_package(Libcap)
|
|
|
|
set_package_properties(Libcap PROPERTIES
|
|
|
|
TYPE OPTIONAL
|
|
|
|
PURPOSE "Needed for running kwin_wayland with real-time scheduling policy"
|
|
|
|
)
|
|
|
|
set(HAVE_LIBCAP ${Libcap_FOUND})
|
|
|
|
|
2017-08-12 15:01:45 +03:00
|
|
|
include(ECMQMLModules)
|
|
|
|
ecm_find_qmlmodule(QtQuick 2.3)
|
|
|
|
ecm_find_qmlmodule(QtQuick.Controls 1.2)
|
|
|
|
ecm_find_qmlmodule(QtQuick.Layouts 1.3)
|
|
|
|
ecm_find_qmlmodule(QtQuick.VirtualKeyboard 2.1)
|
|
|
|
ecm_find_qmlmodule(QtQuick.Window 2.1)
|
|
|
|
ecm_find_qmlmodule(QtMultimedia 5.0)
|
|
|
|
ecm_find_qmlmodule(org.kde.kquickcontrolsaddons 2.0)
|
|
|
|
ecm_find_qmlmodule(org.kde.plasma.core 2.0)
|
|
|
|
ecm_find_qmlmodule(org.kde.plasma.components 2.0)
|
|
|
|
|
2008-01-03 18:22:19 +03:00
|
|
|
########### configure tests ###############
|
2013-11-15 16:37:47 +04:00
|
|
|
include(CMakeDependentOption)
|
|
|
|
|
|
|
|
option(KWIN_BUILD_DECORATIONS "Enable building of KWin decorations." ON)
|
|
|
|
option(KWIN_BUILD_KCMS "Enable building of KWin configuration modules." ON)
|
|
|
|
option(KWIN_BUILD_TABBOX "Enable building of KWin Tabbox functionality" ON)
|
|
|
|
option(KWIN_BUILD_XRENDER_COMPOSITING "Enable building of KWin with XRender Compositing support" ON)
|
2014-02-13 23:06:33 +04:00
|
|
|
cmake_dependent_option(KWIN_BUILD_ACTIVITIES "Enable building of KWin with kactivities support" ON "KF5Activities_FOUND" OFF)
|
2011-07-06 19:42:24 +04:00
|
|
|
|
2012-03-16 11:37:09 +04:00
|
|
|
# Binary name of KWin
|
|
|
|
set(KWIN_NAME "kwin")
|
2014-06-10 14:05:54 +04:00
|
|
|
set(KWIN_INTERNAL_NAME_X11 "kwin_x11")
|
|
|
|
set(KWIN_INTERNAL_NAME_WAYLAND "kwin_wayland")
|
2014-03-18 15:08:14 +04:00
|
|
|
set(KWIN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
2012-03-16 11:37:09 +04:00
|
|
|
|
2011-08-13 12:36:50 +04:00
|
|
|
# KWIN_HAVE_XRENDER_COMPOSITING - whether XRender-based compositing support is available: may be disabled
|
|
|
|
if( KWIN_BUILD_XRENDER_COMPOSITING )
|
2008-01-03 18:22:19 +03:00
|
|
|
set( KWIN_HAVE_XRENDER_COMPOSITING 1 )
|
2013-02-25 14:14:56 +04:00
|
|
|
endif()
|
2008-01-03 18:22:19 +03:00
|
|
|
|
2015-08-10 15:50:45 +03:00
|
|
|
include_directories(${XKB_INCLUDE_DIR})
|
2014-03-29 12:30:45 +04:00
|
|
|
|
2014-10-24 23:58:59 +04:00
|
|
|
include_directories(${epoxy_INCLUDE_DIR})
|
2015-10-30 13:50:31 +03:00
|
|
|
set(HAVE_EPOXY_GLX ${epoxy_HAS_GLX})
|
2014-10-24 23:58:59 +04:00
|
|
|
|
2008-01-03 18:22:19 +03:00
|
|
|
# for things that are also used by kwin libraries
|
2011-02-19 11:58:44 +03:00
|
|
|
configure_file(libkwineffects/kwinconfig.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/libkwineffects/kwinconfig.h )
|
2008-01-03 18:22:19 +03:00
|
|
|
# for kwin internal things
|
2015-08-10 15:50:45 +03:00
|
|
|
set(HAVE_X11_XCB ${X11_XCB_FOUND})
|
2015-05-12 11:03:00 +03:00
|
|
|
|
2015-12-08 13:42:48 +03:00
|
|
|
include(CheckIncludeFile)
|
2014-03-18 17:39:42 +04:00
|
|
|
include(CheckIncludeFiles)
|
2015-12-08 13:42:48 +03:00
|
|
|
include(CheckSymbolExists)
|
2014-03-18 12:30:40 +04:00
|
|
|
check_include_files(unistd.h HAVE_UNISTD_H)
|
|
|
|
check_include_files(malloc.h HAVE_MALLOC_H)
|
2015-12-08 13:42:48 +03:00
|
|
|
|
|
|
|
check_include_file("sys/prctl.h" HAVE_SYS_PRCTL_H)
|
|
|
|
check_symbol_exists(PR_SET_DUMPABLE "sys/prctl.h" HAVE_PR_SET_DUMPABLE)
|
2017-04-26 07:57:32 +03:00
|
|
|
check_symbol_exists(PR_SET_PDEATHSIG "sys/prctl.h" HAVE_PR_SET_PDEATHSIG)
|
Disallow ptrace on greeter and kwin_wayland process on FreeBSD [... for the future]
Summary:
Similar to[[ https://phabricator.kde.org/D1216 | D1216 ]] add procctl call to disable ptrace on FreeBSD.
We cannot do the procfs-lookup to check whether the process is already being run inside gdb -- however, on FreeBSD, we could use the P_TRACED flag of the process to figure this out:
> sys/proc.h:#define P_TRACED 0x00800 /* Debugged process being traced. */
And the code would look something similar to
```
pid_t pid = getpid();
struct procstat *prstat = procstat_open_sysctl();
struct kinfo_proc *procinfo;
unsigned int cnt;
procinfo = procstat_getprocs(prstat, KERN_PROC_PID, pid, &cnt);
long p_flags = procinfo->ki_flag;
int p_traced = p_flags & P_TRACED;
if (p_traced != P_TRACED) {
mode = PROC_TRACE_CTL_DISABLE;
procctl(P_PID, getpid(), PROC_TRACE_CTL, &mode);
}
procstat_freeprocs(prstat,procinfo);
procstat_close(prstat);
```
But as wayland is [far] in the future on FreeBSD, and that check above is a bit lengthy, I think it is enough if we add it once it is needed.
Reviewers: rakuco, graesslin
Reviewed By: graesslin
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1425
2016-05-10 09:49:58 +03:00
|
|
|
check_include_file("sys/procctl.h" HAVE_SYS_PROCCTL_H)
|
|
|
|
check_symbol_exists(PROC_TRACE_CTL "sys/procctl.h" HAVE_PROC_TRACE_CTL)
|
|
|
|
if (HAVE_PR_SET_DUMPABLE OR HAVE_PROC_TRACE_CTL)
|
|
|
|
set(CAN_DISABLE_PTRACE TRUE)
|
|
|
|
endif()
|
|
|
|
add_feature_info("prctl/procctl tracing control"
|
|
|
|
CAN_DISABLE_PTRACE
|
|
|
|
"Required for disallowing ptrace on kwin_wayland process")
|
2015-12-08 13:42:48 +03:00
|
|
|
|
2017-07-31 18:34:37 +03:00
|
|
|
check_include_file("sys/sysmacros.h" HAVE_SYS_SYSMACROS_H)
|
2008-01-03 18:22:19 +03:00
|
|
|
configure_file(config-kwin.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kwin.h )
|
|
|
|
|
2017-07-23 13:02:58 +03:00
|
|
|
check_include_file("linux/vt.h" HAVE_LINUX_VT_H)
|
|
|
|
add_feature_info("linux/vt.h"
|
|
|
|
HAVE_LINUX_VT_H
|
|
|
|
"Required for virtual terminal support under wayland")
|
|
|
|
check_include_file("linux/fb.h" HAVE_LINUX_FB_H)
|
|
|
|
add_feature_info("linux/fb.h"
|
|
|
|
HAVE_LINUX_FB_H
|
|
|
|
"Required for the fbdev backend")
|
2008-01-03 18:22:19 +03:00
|
|
|
|
2017-09-10 13:05:29 +03:00
|
|
|
check_symbol_exists(SCHED_RESET_ON_FORK "sched.h" HAVE_SCHED_RESET_ON_FORK)
|
|
|
|
add_feature_info("SCHED_RESET_ON_FORK"
|
|
|
|
HAVE_SCHED_RESET_ON_FORK
|
|
|
|
"Required for running kwin_wayland with real-time scheduling")
|
|
|
|
|
2008-01-03 18:22:19 +03:00
|
|
|
########### global ###############
|
2014-03-19 11:10:45 +04:00
|
|
|
set(kwin_effects_dbus_xml ${CMAKE_CURRENT_SOURCE_DIR}/org.kde.kwin.Effects.xml)
|
2007-04-29 21:35:43 +04:00
|
|
|
|
2011-08-11 20:03:01 +04:00
|
|
|
include_directories(BEFORE
|
2011-02-19 11:58:44 +03:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/libkwineffects
|
2007-06-22 20:32:06 +04:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
2011-02-19 11:58:44 +03:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/libkwineffects
|
2007-04-29 21:35:43 +04:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/effects
|
2009-09-13 15:36:45 +04:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/tabbox
|
2017-08-11 22:40:49 +03:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/platformsupport
|
2007-04-29 21:35:43 +04:00
|
|
|
)
|
|
|
|
|
2011-02-19 11:58:44 +03:00
|
|
|
add_subdirectory( libkwineffects )
|
2011-05-01 15:27:13 +04:00
|
|
|
if(KWIN_BUILD_KCMS)
|
|
|
|
add_subdirectory( kcmkwin )
|
2013-02-25 14:14:56 +04:00
|
|
|
endif()
|
2011-04-28 18:18:15 +04:00
|
|
|
|
2014-01-16 22:18:54 +04:00
|
|
|
add_subdirectory( data )
|
2007-06-22 20:32:06 +04:00
|
|
|
|
2008-06-06 15:07:15 +04:00
|
|
|
add_subdirectory( effects )
|
2012-02-18 15:42:36 +04:00
|
|
|
add_subdirectory( scripts )
|
2012-02-12 18:15:54 +04:00
|
|
|
add_subdirectory( tabbox )
|
2014-03-04 11:17:44 +04:00
|
|
|
add_subdirectory(scripting)
|
2016-06-20 12:21:16 +03:00
|
|
|
add_subdirectory(helpers)
|
2013-02-15 19:47:09 +04:00
|
|
|
|
2007-04-29 21:35:43 +04:00
|
|
|
########### next target ###############
|
|
|
|
|
|
|
|
set(kwin_KDEINIT_SRCS
|
2016-11-02 00:13:42 +03:00
|
|
|
workspace.cpp
|
2012-08-30 10:20:26 +04:00
|
|
|
dbusinterface.cpp
|
2015-03-05 12:21:03 +03:00
|
|
|
abstract_client.cpp
|
2016-11-02 00:13:42 +03:00
|
|
|
client.cpp
|
2013-01-07 11:07:27 +04:00
|
|
|
client_machine.cpp
|
2013-02-19 14:25:46 +04:00
|
|
|
cursor.cpp
|
2016-03-14 12:23:52 +03:00
|
|
|
debug_console.cpp
|
2012-01-12 10:42:55 +04:00
|
|
|
tabgroup.cpp
|
2012-11-20 20:26:50 +04:00
|
|
|
focuschain.cpp
|
2013-07-10 13:41:16 +04:00
|
|
|
globalshortcuts.cpp
|
2013-06-26 12:15:20 +04:00
|
|
|
input.cpp
|
2016-05-24 11:57:57 +03:00
|
|
|
input_event.cpp
|
2016-12-30 21:32:47 +03:00
|
|
|
input_event_spy.cpp
|
2016-02-15 15:42:48 +03:00
|
|
|
keyboard_input.cpp
|
2017-01-14 20:06:41 +03:00
|
|
|
keyboard_layout.cpp
|
2017-04-04 19:56:10 +03:00
|
|
|
keyboard_layout_switching.cpp
|
2017-01-27 08:50:50 +03:00
|
|
|
keyboard_repeat.cpp
|
2016-02-12 15:30:00 +03:00
|
|
|
pointer_input.cpp
|
2016-02-15 11:36:59 +03:00
|
|
|
touch_input.cpp
|
2013-04-26 12:41:24 +04:00
|
|
|
netinfo.cpp
|
2016-11-02 00:13:42 +03:00
|
|
|
placement.cpp
|
|
|
|
atoms.cpp
|
|
|
|
utils.cpp
|
|
|
|
layers.cpp
|
|
|
|
main.cpp
|
|
|
|
options.cpp
|
2011-04-28 13:16:27 +04:00
|
|
|
outline.cpp
|
2016-11-02 00:13:42 +03:00
|
|
|
events.cpp
|
|
|
|
killwindow.cpp
|
|
|
|
geometrytip.cpp
|
2013-04-03 14:19:27 +04:00
|
|
|
screens.cpp
|
2011-03-27 14:33:07 +04:00
|
|
|
shadow.cpp
|
2016-11-02 00:13:42 +03:00
|
|
|
sm.cpp
|
|
|
|
group.cpp
|
|
|
|
manage.cpp
|
2011-07-06 13:58:23 +04:00
|
|
|
overlaywindow.cpp
|
2016-11-02 00:13:42 +03:00
|
|
|
activation.cpp
|
|
|
|
useractions.cpp
|
|
|
|
geometry.cpp
|
2007-04-29 21:35:43 +04:00
|
|
|
rules.cpp
|
|
|
|
composite.cpp
|
|
|
|
toplevel.cpp
|
|
|
|
unmanaged.cpp
|
|
|
|
scene.cpp
|
2016-08-15 09:16:33 +03:00
|
|
|
screenlockerwatcher.cpp
|
2011-11-10 17:28:06 +04:00
|
|
|
thumbnailitem.cpp
|
2010-06-03 00:04:54 +04:00
|
|
|
lanczosfilter.cpp
|
2007-04-29 21:35:43 +04:00
|
|
|
deleted.cpp
|
|
|
|
effects.cpp
|
2014-03-22 12:48:07 +04:00
|
|
|
effectloader.cpp
|
2012-11-16 11:23:47 +04:00
|
|
|
virtualdesktops.cpp
|
2012-12-21 18:11:31 +04:00
|
|
|
xcbutils.cpp
|
2014-09-02 20:46:07 +04:00
|
|
|
x11eventfilter.cpp
|
2014-08-15 11:30:08 +04:00
|
|
|
logind.cpp
|
2016-12-18 13:53:50 +03:00
|
|
|
onscreennotification.cpp
|
|
|
|
osd.cpp
|
2014-11-21 19:12:50 +03:00
|
|
|
screenedge.cpp
|
2014-03-04 11:17:44 +04:00
|
|
|
scripting/scripting.cpp
|
|
|
|
scripting/workspace_wrapper.cpp
|
|
|
|
scripting/meta.cpp
|
|
|
|
scripting/scriptedeffect.cpp
|
|
|
|
scripting/scriptingutils.cpp
|
|
|
|
scripting/timer.cpp
|
|
|
|
scripting/scripting_model.cpp
|
|
|
|
scripting/dbuscall.cpp
|
|
|
|
scripting/screenedgeitem.cpp
|
2015-07-31 14:24:56 +03:00
|
|
|
scripting/scripting_logging.cpp
|
2014-07-22 15:11:19 +04:00
|
|
|
decorations/decoratedclient.cpp
|
|
|
|
decorations/decorationbridge.cpp
|
2015-03-31 16:26:42 +03:00
|
|
|
decorations/decorationpalette.cpp
|
2014-07-22 15:11:19 +04:00
|
|
|
decorations/settings.cpp
|
|
|
|
decorations/decorationrenderer.cpp
|
2015-07-31 14:12:43 +03:00
|
|
|
decorations/decorations_logging.cpp
|
2016-04-07 10:24:17 +03:00
|
|
|
platform.cpp
|
2015-08-10 15:50:45 +03:00
|
|
|
shell_client.cpp
|
|
|
|
wayland_server.cpp
|
|
|
|
wayland_cursor_theme.cpp
|
2016-04-29 16:05:03 +03:00
|
|
|
virtualkeyboard.cpp
|
2017-10-06 22:22:50 +03:00
|
|
|
virtualkeyboard_dbus.cpp
|
2017-01-11 12:21:03 +03:00
|
|
|
appmenu.cpp
|
2017-02-03 19:26:51 +03:00
|
|
|
modifier_only_shortcuts.cpp
|
2017-02-15 19:47:38 +03:00
|
|
|
xkb.cpp
|
2017-03-18 13:00:30 +03:00
|
|
|
gestures.cpp
|
2017-03-25 20:41:28 +03:00
|
|
|
popup_input_filter.cpp
|
[colorcorrection] Night Color - blue light filter at nighttime
With Wayland KWin needs to provide certain services, which were provided
before that by the Xserver. One of these is gamma correction, which includes
the - by many people beloved - functionality to reduce the blue light at
nighttime. This patch provides the KWin part of that. It is self contained,
but in the end will work in tandem with a lib in Plasma Workspace and a KCM
in Plasma Desktop, which can be used to configure Night Color.
* Three modi:
** Automatic: The location and sun timings are determined automatically
(location data updates will be provided by the workspace)
** Location: The sun timings are determined by fixed location data
** Timings: The sun timings are set manually by the user
* Color temperature value changes are smoothly applied:
** Configuration changes, which lead to other current values are changed
in a quick way over a few seconds
** Changes on sunrise and sunset are applied slowly over the course of few
minutes till several hours depending on the configuration
* The current color value is set immediately at startup or after suspend
phases and VT switches. There is no flickering.
* All configuration is done via a DBus interface, changed values are tested
on correctness and applied atomically
* Self contained mechanism, speaks directly to the hardware by setting the
gamma ramps on the CRTC
* Currently working on DRM backend, extensible to other platform backends in
the future
* The code is written in a way to make the classes later easily extendable to
also provide normal color correction, as it's currently done by KGamma on X
Test Plan:
Manually with the workspace parts and added integration tests in KWin using
the virtual backend.
BUG:371494
Reviewers: #kwin, graesslin
Subscribers: kwin, plasma-devel, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D5928
2017-12-11 12:43:12 +03:00
|
|
|
colorcorrection/manager.cpp
|
|
|
|
colorcorrection/colorcorrectdbusinterface.cpp
|
|
|
|
colorcorrection/suncalc.cpp
|
2017-06-26 07:56:55 +03:00
|
|
|
abstract_opengl_context_attribute_builder.cpp
|
|
|
|
egl_context_attribute_builder.cpp
|
2017-08-17 20:10:45 +03:00
|
|
|
was_user_interaction_x11_filter.cpp
|
2017-08-17 22:12:28 +03:00
|
|
|
moving_client_x11_filter.cpp
|
2017-09-16 20:25:33 +03:00
|
|
|
window_property_notify_x11_filter.cpp
|
2017-09-13 22:44:07 +03:00
|
|
|
rootinfo_filter.cpp
|
2017-11-06 19:00:15 +03:00
|
|
|
orientation_sensor.cpp
|
2017-11-16 23:48:19 +03:00
|
|
|
idle_inhibition.cpp
|
2018-01-23 19:28:18 +03:00
|
|
|
libinput/context.cpp
|
|
|
|
libinput/connection.cpp
|
|
|
|
libinput/device.cpp
|
|
|
|
libinput/events.cpp
|
|
|
|
libinput/libinput_logging.cpp
|
|
|
|
udev.cpp
|
2007-04-29 21:35:43 +04:00
|
|
|
)
|
|
|
|
|
[colorcorrection] Night Color - blue light filter at nighttime
With Wayland KWin needs to provide certain services, which were provided
before that by the Xserver. One of these is gamma correction, which includes
the - by many people beloved - functionality to reduce the blue light at
nighttime. This patch provides the KWin part of that. It is self contained,
but in the end will work in tandem with a lib in Plasma Workspace and a KCM
in Plasma Desktop, which can be used to configure Night Color.
* Three modi:
** Automatic: The location and sun timings are determined automatically
(location data updates will be provided by the workspace)
** Location: The sun timings are determined by fixed location data
** Timings: The sun timings are set manually by the user
* Color temperature value changes are smoothly applied:
** Configuration changes, which lead to other current values are changed
in a quick way over a few seconds
** Changes on sunrise and sunset are applied slowly over the course of few
minutes till several hours depending on the configuration
* The current color value is set immediately at startup or after suspend
phases and VT switches. There is no flickering.
* All configuration is done via a DBus interface, changed values are tested
on correctness and applied atomically
* Self contained mechanism, speaks directly to the hardware by setting the
gamma ramps on the CRTC
* Currently working on DRM backend, extensible to other platform backends in
the future
* The code is written in a way to make the classes later easily extendable to
also provide normal color correction, as it's currently done by KGamma on X
Test Plan:
Manually with the workspace parts and added integration tests in KWin using
the virtual backend.
BUG:371494
Reviewers: #kwin, graesslin
Subscribers: kwin, plasma-devel, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D5928
2017-12-11 12:43:12 +03:00
|
|
|
include(ECMQtDeclareLoggingCategory)
|
|
|
|
ecm_qt_declare_logging_category(kwin_KDEINIT_SRCS
|
|
|
|
HEADER
|
|
|
|
colorcorrect_logging.h
|
|
|
|
IDENTIFIER
|
|
|
|
KWIN_COLORCORRECTION
|
|
|
|
CATEGORY_NAME
|
|
|
|
kwin_colorcorrection
|
|
|
|
DEFAULT_SEVERITY
|
|
|
|
Critical
|
|
|
|
)
|
|
|
|
|
2011-06-30 15:02:30 +04:00
|
|
|
if(KWIN_BUILD_TABBOX)
|
|
|
|
set(
|
|
|
|
kwin_KDEINIT_SRCS ${kwin_KDEINIT_SRCS}
|
2011-07-15 19:22:41 +04:00
|
|
|
tabbox/tabbox.cpp
|
2011-06-30 15:02:30 +04:00
|
|
|
tabbox/clientmodel.cpp
|
2012-11-17 14:50:59 +04:00
|
|
|
tabbox/desktopchain.cpp
|
2011-06-30 15:02:30 +04:00
|
|
|
tabbox/desktopmodel.cpp
|
2013-12-10 10:14:44 +04:00
|
|
|
tabbox/switcheritem.cpp
|
2011-06-30 15:02:30 +04:00
|
|
|
tabbox/tabboxconfig.cpp
|
|
|
|
tabbox/tabboxhandler.cpp
|
2015-07-31 14:03:35 +03:00
|
|
|
tabbox/tabbox_logging.cpp
|
2017-08-18 18:32:31 +03:00
|
|
|
tabbox/x11_filter.cpp
|
2011-06-30 15:02:30 +04:00
|
|
|
)
|
2013-02-25 14:14:56 +04:00
|
|
|
endif()
|
2011-06-30 15:02:30 +04:00
|
|
|
|
2013-04-04 18:14:12 +04:00
|
|
|
if(KWIN_BUILD_ACTIVITIES)
|
|
|
|
set(
|
|
|
|
kwin_KDEINIT_SRCS ${kwin_KDEINIT_SRCS}
|
|
|
|
activities.cpp
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2018-01-23 19:28:18 +03:00
|
|
|
if (HAVE_LINUX_VT_H)
|
|
|
|
set(kwin_KDEINIT_SRCS
|
|
|
|
${kwin_KDEINIT_SRCS}
|
|
|
|
virtual_terminal.cpp
|
|
|
|
)
|
2014-08-14 16:43:57 +04:00
|
|
|
endif()
|
|
|
|
|
2013-11-26 22:51:13 +04:00
|
|
|
kconfig_add_kcfg_files(kwin_KDEINIT_SRCS settings.kcfgc)
|
[colorcorrection] Night Color - blue light filter at nighttime
With Wayland KWin needs to provide certain services, which were provided
before that by the Xserver. One of these is gamma correction, which includes
the - by many people beloved - functionality to reduce the blue light at
nighttime. This patch provides the KWin part of that. It is self contained,
but in the end will work in tandem with a lib in Plasma Workspace and a KCM
in Plasma Desktop, which can be used to configure Night Color.
* Three modi:
** Automatic: The location and sun timings are determined automatically
(location data updates will be provided by the workspace)
** Location: The sun timings are determined by fixed location data
** Timings: The sun timings are set manually by the user
* Color temperature value changes are smoothly applied:
** Configuration changes, which lead to other current values are changed
in a quick way over a few seconds
** Changes on sunrise and sunset are applied slowly over the course of few
minutes till several hours depending on the configuration
* The current color value is set immediately at startup or after suspend
phases and VT switches. There is no flickering.
* All configuration is done via a DBus interface, changed values are tested
on correctness and applied atomically
* Self contained mechanism, speaks directly to the hardware by setting the
gamma ramps on the CRTC
* Currently working on DRM backend, extensible to other platform backends in
the future
* The code is written in a way to make the classes later easily extendable to
also provide normal color correction, as it's currently done by KGamma on X
Test Plan:
Manually with the workspace parts and added integration tests in KWin using
the virtual backend.
BUG:371494
Reviewers: #kwin, graesslin
Subscribers: kwin, plasma-devel, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D5928
2017-12-11 12:43:12 +03:00
|
|
|
kconfig_add_kcfg_files(kwin_KDEINIT_SRCS colorcorrection/colorcorrect_settings.kcfgc)
|
2013-01-24 18:25:34 +04:00
|
|
|
|
2013-11-26 22:51:13 +04:00
|
|
|
qt5_add_dbus_adaptor( kwin_KDEINIT_SRCS org.kde.KWin.xml dbusinterface.h KWin::DBusInterface )
|
2014-06-02 10:51:28 +04:00
|
|
|
qt5_add_dbus_adaptor( kwin_KDEINIT_SRCS org.kde.kwin.Compositing.xml dbusinterface.h KWin::CompositorDBusInterface )
|
[colorcorrection] Night Color - blue light filter at nighttime
With Wayland KWin needs to provide certain services, which were provided
before that by the Xserver. One of these is gamma correction, which includes
the - by many people beloved - functionality to reduce the blue light at
nighttime. This patch provides the KWin part of that. It is self contained,
but in the end will work in tandem with a lib in Plasma Workspace and a KCM
in Plasma Desktop, which can be used to configure Night Color.
* Three modi:
** Automatic: The location and sun timings are determined automatically
(location data updates will be provided by the workspace)
** Location: The sun timings are determined by fixed location data
** Timings: The sun timings are set manually by the user
* Color temperature value changes are smoothly applied:
** Configuration changes, which lead to other current values are changed
in a quick way over a few seconds
** Changes on sunrise and sunset are applied slowly over the course of few
minutes till several hours depending on the configuration
* The current color value is set immediately at startup or after suspend
phases and VT switches. There is no flickering.
* All configuration is done via a DBus interface, changed values are tested
on correctness and applied atomically
* Self contained mechanism, speaks directly to the hardware by setting the
gamma ramps on the CRTC
* Currently working on DRM backend, extensible to other platform backends in
the future
* The code is written in a way to make the classes later easily extendable to
also provide normal color correction, as it's currently done by KGamma on X
Test Plan:
Manually with the workspace parts and added integration tests in KWin using
the virtual backend.
BUG:371494
Reviewers: #kwin, graesslin
Subscribers: kwin, plasma-devel, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D5928
2017-12-11 12:43:12 +03:00
|
|
|
qt5_add_dbus_adaptor( kwin_KDEINIT_SRCS org.kde.kwin.ColorCorrect.xml colorcorrection/colorcorrectdbusinterface.h KWin::ColorCorrect::ColorCorrectDBusInterface )
|
2014-03-18 19:09:20 +04:00
|
|
|
qt5_add_dbus_adaptor( kwin_KDEINIT_SRCS ${kwin_effects_dbus_xml} effects.h KWin::EffectsHandlerImpl )
|
2017-11-09 20:03:15 +03:00
|
|
|
qt5_add_dbus_adaptor( kwin_KDEINIT_SRCS org.kde.kwin.OrientationSensor.xml orientation_sensor.h KWin::OrientationSensor)
|
2007-04-29 21:35:43 +04:00
|
|
|
|
2014-03-24 19:30:22 +04:00
|
|
|
qt5_add_dbus_interface( kwin_KDEINIT_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/org.freedesktop.ScreenSaver.xml screenlocker_interface)
|
2010-06-11 18:26:41 +04:00
|
|
|
|
2017-01-11 12:21:03 +03:00
|
|
|
qt5_add_dbus_interface( kwin_KDEINIT_SRCS org.kde.kappmenu.xml appmenu_interface )
|
|
|
|
|
2013-11-15 16:37:47 +04:00
|
|
|
qt5_add_resources( kwin_KDEINIT_SRCS resources.qrc )
|
2007-04-29 21:35:43 +04:00
|
|
|
|
2015-02-19 16:38:09 +03:00
|
|
|
ki18n_wrap_ui(kwin_KDEINIT_SRCS
|
2016-03-14 12:23:52 +03:00
|
|
|
debug_console.ui
|
2013-12-12 17:17:26 +04:00
|
|
|
shortcutdialog.ui
|
|
|
|
)
|
|
|
|
|
2013-02-25 15:05:36 +04:00
|
|
|
########### target link libraries ###############
|
|
|
|
|
|
|
|
set(kwin_OWN_LIBS
|
|
|
|
kwineffects
|
2014-01-17 16:46:04 +04:00
|
|
|
kwin4_effect_builtins
|
2013-02-25 15:05:36 +04:00
|
|
|
)
|
|
|
|
|
|
|
|
set(kwin_QT_LIBS
|
2013-10-02 17:23:56 +04:00
|
|
|
Qt5::Concurrent
|
2013-08-20 10:47:47 +04:00
|
|
|
Qt5::DBus
|
2013-08-20 11:10:18 +04:00
|
|
|
Qt5::Quick
|
2017-11-06 19:00:15 +03:00
|
|
|
Qt5::Sensors
|
2014-03-04 11:17:44 +04:00
|
|
|
Qt5::Script
|
2013-02-25 15:05:36 +04:00
|
|
|
)
|
|
|
|
|
|
|
|
set(kwin_KDE_LIBS
|
2013-12-12 00:41:47 +04:00
|
|
|
KF5::ConfigCore
|
|
|
|
KF5::CoreAddons
|
2013-12-12 17:17:26 +04:00
|
|
|
KF5::ConfigWidgets
|
2013-12-09 12:33:58 +04:00
|
|
|
KF5::GlobalAccel
|
2015-06-26 11:51:11 +03:00
|
|
|
KF5::GlobalAccelPrivate
|
2013-12-12 00:41:47 +04:00
|
|
|
KF5::I18n
|
|
|
|
KF5::Notifications
|
2015-07-06 17:50:33 +03:00
|
|
|
KF5::Package
|
2013-10-16 03:36:24 +04:00
|
|
|
KF5::Plasma
|
2013-12-12 00:41:47 +04:00
|
|
|
KF5::WindowSystem
|
2017-11-01 18:45:05 +03:00
|
|
|
KF5::QuickAddons
|
2014-07-22 15:11:19 +04:00
|
|
|
KDecoration2::KDecoration
|
|
|
|
KDecoration2::KDecoration2Private
|
2015-11-05 16:09:23 +03:00
|
|
|
PW::KScreenLocker
|
2013-02-25 15:05:36 +04:00
|
|
|
)
|
|
|
|
|
|
|
|
set(kwin_XLIB_LIBS
|
2013-03-04 11:50:23 +04:00
|
|
|
${X11_X11_LIB}
|
2013-08-20 10:47:47 +04:00
|
|
|
${X11_ICE_LIB}
|
|
|
|
${X11_SM_LIB}
|
2016-01-20 00:35:14 +03:00
|
|
|
)
|
|
|
|
|
2013-02-25 15:05:36 +04:00
|
|
|
set(kwin_XCB_LIBS
|
2014-02-25 18:48:39 +04:00
|
|
|
XCB::XCB
|
|
|
|
XCB::XFIXES
|
|
|
|
XCB::DAMAGE
|
|
|
|
XCB::COMPOSITE
|
|
|
|
XCB::SHAPE
|
|
|
|
XCB::SYNC
|
|
|
|
XCB::RENDER
|
|
|
|
XCB::RANDR
|
|
|
|
XCB::KEYSYMS
|
|
|
|
XCB::SHM
|
2014-09-18 19:09:16 +04:00
|
|
|
XCB::GLX
|
2017-08-01 22:28:36 +03:00
|
|
|
XCB::ICCCM
|
2013-02-25 15:05:36 +04:00
|
|
|
)
|
|
|
|
|
2013-05-15 15:47:27 +04:00
|
|
|
set(kwin_WAYLAND_LIBS
|
2014-03-13 20:52:26 +04:00
|
|
|
XKB::XKB
|
2014-09-19 15:59:51 +04:00
|
|
|
KF5::WaylandClient
|
2015-02-09 15:28:37 +03:00
|
|
|
KF5::WaylandServer
|
2015-08-10 15:50:45 +03:00
|
|
|
Wayland::Cursor
|
2015-03-31 10:30:19 +03:00
|
|
|
${CMAKE_THREAD_LIBS_INIT}
|
2013-05-15 15:47:27 +04:00
|
|
|
)
|
|
|
|
|
2012-02-26 14:38:16 +04:00
|
|
|
if(KWIN_BUILD_ACTIVITIES)
|
2014-02-13 23:06:33 +04:00
|
|
|
set(kwin_KDE_LIBS ${kwin_KDE_LIBS} KF5::Activities)
|
2013-02-25 14:14:56 +04:00
|
|
|
endif()
|
2012-02-26 14:38:16 +04:00
|
|
|
|
2013-02-25 15:05:36 +04:00
|
|
|
set(kwinLibs
|
|
|
|
${kwin_OWN_LIBS}
|
|
|
|
${kwin_QT_LIBS}
|
|
|
|
${kwin_KDE_LIBS}
|
|
|
|
${kwin_XLIB_LIBS}
|
|
|
|
${kwin_XCB_LIBS}
|
2015-08-10 15:50:45 +03:00
|
|
|
${kwin_WAYLAND_LIBS}
|
2018-01-23 19:28:18 +03:00
|
|
|
${UDEV_LIBS}
|
|
|
|
Libinput::Libinput
|
2013-02-25 15:05:36 +04:00
|
|
|
)
|
|
|
|
|
2014-08-12 11:08:48 +04:00
|
|
|
add_library(kwin SHARED ${kwin_KDEINIT_SRCS})
|
2011-07-17 20:18:22 +04:00
|
|
|
|
2014-08-12 11:08:48 +04:00
|
|
|
set_target_properties(kwin PROPERTIES
|
2014-08-20 17:43:27 +04:00
|
|
|
VERSION ${PROJECT_VERSION}
|
|
|
|
SOVERSION ${PROJECT_VERSION_MAJOR}
|
2014-08-12 11:08:48 +04:00
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries(kwin ${kwinLibs})
|
|
|
|
generate_export_header(kwin EXPORT_FILE_NAME kwin_export.h)
|
2011-07-17 20:18:22 +04:00
|
|
|
|
2015-10-30 15:47:37 +03:00
|
|
|
target_link_libraries(kwin kwinglutils ${epoxy_LIBRARY})
|
2011-07-17 20:18:22 +04:00
|
|
|
|
2014-08-12 11:08:48 +04:00
|
|
|
kf5_add_kdeinit_executable(kwin_x11 main_x11.cpp)
|
2017-08-24 17:53:40 +03:00
|
|
|
target_link_libraries(kdeinit_kwin_x11 kwin KF5::Crash Qt5::X11Extras)
|
2014-08-12 11:08:48 +04:00
|
|
|
|
2014-08-25 14:49:03 +04:00
|
|
|
install(TARGETS kwin ${INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP )
|
2014-08-12 11:08:48 +04:00
|
|
|
install(TARGETS kdeinit_kwin_x11 ${INSTALL_TARGETS_DEFAULT_ARGS} )
|
|
|
|
install(TARGETS kwin_x11 ${INSTALL_TARGETS_DEFAULT_ARGS} )
|
|
|
|
|
A basic TabletModeManager
Summary:
depends from D9521
listens to switch events and updates the tablet mode status
which is exposed to dbus in the org.kde.KWin.TabletModeManager
interface
Test Plan:
as hardware support is limited, testing of clients
so far is done by the setter in the dbus property,
which should be removed from the final version.
It has been tested to successfully work on a Thinkpad.
Reviewers: #plasma, #kwin, graesslin
Reviewed By: #plasma, #kwin, graesslin
Subscribers: graesslin, davidedmundson, plasma-devel, kwin, #kwin
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D9764
2018-01-11 15:09:43 +03:00
|
|
|
add_executable(kwin_wayland tabletmodemanager.cpp main_wayland.cpp)
|
2015-08-10 15:50:45 +03:00
|
|
|
target_link_libraries(kwin_wayland kwin)
|
2017-09-10 13:05:29 +03:00
|
|
|
if (HAVE_LIBCAP)
|
|
|
|
target_link_libraries(kwin_wayland ${Libcap_LIBRARIES})
|
|
|
|
endif()
|
2014-08-12 11:08:48 +04:00
|
|
|
|
2015-08-10 15:50:45 +03:00
|
|
|
install(TARGETS kwin_wayland ${INSTALL_TARGETS_DEFAULT_ARGS} )
|
2017-09-10 13:05:29 +03:00
|
|
|
if (HAVE_LIBCAP)
|
|
|
|
install(
|
|
|
|
CODE "execute_process(
|
|
|
|
COMMAND
|
|
|
|
${SETCAP_EXECUTABLE}
|
|
|
|
CAP_SYS_NICE=+ep
|
2017-10-10 20:54:07 +03:00
|
|
|
\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_BINDIR}/kwin_wayland)"
|
2017-09-10 13:05:29 +03:00
|
|
|
)
|
|
|
|
endif()
|
2015-05-05 18:58:09 +03:00
|
|
|
|
2017-08-11 22:40:49 +03:00
|
|
|
add_subdirectory(platformsupport)
|
2015-08-10 15:50:45 +03:00
|
|
|
add_subdirectory(plugins)
|
2007-04-29 21:35:43 +04:00
|
|
|
|
|
|
|
########### install files ###############
|
|
|
|
|
2012-03-16 11:37:09 +04:00
|
|
|
install( FILES kwin.kcfg DESTINATION ${KCFG_INSTALL_DIR} RENAME ${KWIN_NAME}.kcfg )
|
[colorcorrection] Night Color - blue light filter at nighttime
With Wayland KWin needs to provide certain services, which were provided
before that by the Xserver. One of these is gamma correction, which includes
the - by many people beloved - functionality to reduce the blue light at
nighttime. This patch provides the KWin part of that. It is self contained,
but in the end will work in tandem with a lib in Plasma Workspace and a KCM
in Plasma Desktop, which can be used to configure Night Color.
* Three modi:
** Automatic: The location and sun timings are determined automatically
(location data updates will be provided by the workspace)
** Location: The sun timings are determined by fixed location data
** Timings: The sun timings are set manually by the user
* Color temperature value changes are smoothly applied:
** Configuration changes, which lead to other current values are changed
in a quick way over a few seconds
** Changes on sunrise and sunset are applied slowly over the course of few
minutes till several hours depending on the configuration
* The current color value is set immediately at startup or after suspend
phases and VT switches. There is no flickering.
* All configuration is done via a DBus interface, changed values are tested
on correctness and applied atomically
* Self contained mechanism, speaks directly to the hardware by setting the
gamma ramps on the CRTC
* Currently working on DRM backend, extensible to other platform backends in
the future
* The code is written in a way to make the classes later easily extendable to
also provide normal color correction, as it's currently done by KGamma on X
Test Plan:
Manually with the workspace parts and added integration tests in KWin using
the virtual backend.
BUG:371494
Reviewers: #kwin, graesslin
Subscribers: kwin, plasma-devel, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D5928
2017-12-11 12:43:12 +03:00
|
|
|
install( FILES colorcorrection/colorcorrect_settings.kcfg DESTINATION ${KCFG_INSTALL_DIR} RENAME ${KWIN_NAME}_colorcorrect.kcfg )
|
2014-04-27 01:27:35 +04:00
|
|
|
install( FILES kwin.notifyrc DESTINATION ${KNOTIFYRC_INSTALL_DIR} RENAME ${KWIN_NAME}.notifyrc)
|
2014-03-07 17:46:11 +04:00
|
|
|
install(
|
|
|
|
FILES
|
|
|
|
org.kde.KWin.xml
|
|
|
|
org.kde.kwin.Compositing.xml
|
[colorcorrection] Night Color - blue light filter at nighttime
With Wayland KWin needs to provide certain services, which were provided
before that by the Xserver. One of these is gamma correction, which includes
the - by many people beloved - functionality to reduce the blue light at
nighttime. This patch provides the KWin part of that. It is self contained,
but in the end will work in tandem with a lib in Plasma Workspace and a KCM
in Plasma Desktop, which can be used to configure Night Color.
* Three modi:
** Automatic: The location and sun timings are determined automatically
(location data updates will be provided by the workspace)
** Location: The sun timings are determined by fixed location data
** Timings: The sun timings are set manually by the user
* Color temperature value changes are smoothly applied:
** Configuration changes, which lead to other current values are changed
in a quick way over a few seconds
** Changes on sunrise and sunset are applied slowly over the course of few
minutes till several hours depending on the configuration
* The current color value is set immediately at startup or after suspend
phases and VT switches. There is no flickering.
* All configuration is done via a DBus interface, changed values are tested
on correctness and applied atomically
* Self contained mechanism, speaks directly to the hardware by setting the
gamma ramps on the CRTC
* Currently working on DRM backend, extensible to other platform backends in
the future
* The code is written in a way to make the classes later easily extendable to
also provide normal color correction, as it's currently done by KGamma on X
Test Plan:
Manually with the workspace parts and added integration tests in KWin using
the virtual backend.
BUG:371494
Reviewers: #kwin, graesslin
Subscribers: kwin, plasma-devel, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D5928
2017-12-11 12:43:12 +03:00
|
|
|
org.kde.kwin.ColorCorrect.xml
|
2014-03-07 17:46:11 +04:00
|
|
|
org.kde.kwin.Effects.xml
|
|
|
|
DESTINATION
|
2015-10-28 20:15:36 +03:00
|
|
|
${KDE_INSTALL_DBUSINTERFACEDIR}
|
2014-03-07 17:46:11 +04:00
|
|
|
)
|
2013-12-06 11:37:16 +04:00
|
|
|
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/kwin_export.h DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel)
|
2007-04-29 21:35:43 +04:00
|
|
|
|
2014-03-04 11:17:44 +04:00
|
|
|
# Install the KWin/Script service type
|
|
|
|
install( FILES scripting/kwinscript.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR} )
|
2012-02-18 13:34:27 +04:00
|
|
|
|
2014-05-22 18:38:07 +04:00
|
|
|
ecm_install_icons(
|
|
|
|
ICONS
|
|
|
|
16-apps-kwin.png
|
|
|
|
32-apps-kwin.png
|
|
|
|
48-apps-kwin.png
|
|
|
|
sc-apps-kwin.svgz
|
|
|
|
DESTINATION
|
|
|
|
${ICON_INSTALL_DIR}
|
|
|
|
THEME
|
2014-06-27 15:20:49 +04:00
|
|
|
hicolor
|
2014-05-22 18:38:07 +04:00
|
|
|
)
|
2012-05-18 16:03:55 +04:00
|
|
|
|
2014-02-27 18:25:03 +04:00
|
|
|
add_subdirectory(qml)
|
use proper packagestructures
Summary:
as the plasmapkg2 utility is dead, scripts and tabboxes couldn't
be installed anymore, as plasmapkg2 was launched with an hardcoded
package type (and had a bunch of custom code for it)
and no packagestructure for the relevant package types existed.
the port of scripts and tabboxes to kpackage in kwin is quite
incomplete and somewhat strange (given the fact that was started by
looking manually for the file as it couldn't link to libplasma)
this makes things a bit better as now scripts and tabboxes have an actual
package structure, making it installable by kpackagetool5.
in the future, the port should be completed and replace all the manual lookup
of files with package::filePath as it should work now given that valid
structures exist
BUG:374766
Test Plan:
tabbox plugins and kwin scripts can be installed from knewstuff
again and can be successfully loaded
Reviewers: #plasma, graesslin, subdiff
Reviewed By: #plasma, graesslin
Subscribers: graesslin, plasma-devel, kwin, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D4202
2017-01-19 20:13:01 +03:00
|
|
|
add_subdirectory(packageplugins)
|
2014-04-03 12:15:57 +04:00
|
|
|
|
2018-05-27 23:02:58 +03:00
|
|
|
if (BUILD_TESTING)
|
|
|
|
add_subdirectory(autotests)
|
|
|
|
add_subdirectory(tests)
|
|
|
|
endif()
|
|
|
|
|
2014-04-03 12:15:57 +04:00
|
|
|
if (KF5DocTools_FOUND)
|
|
|
|
add_subdirectory(doc)
|
|
|
|
endif()
|
2014-03-21 19:07:55 +04:00
|
|
|
|
2018-06-10 14:02:57 +03:00
|
|
|
add_subdirectory(kconf_update)
|
|
|
|
|
2015-03-23 00:25:38 +03:00
|
|
|
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
|
|
|
|
2017-09-12 19:14:03 +03:00
|
|
|
include(CMakePackageConfigHelpers)
|
2014-03-21 19:07:55 +04:00
|
|
|
set(CMAKECONFIG_INSTALL_DIR "${CMAKECONFIG_INSTALL_PREFIX}/KWinDBusInterface")
|
2017-09-12 19:14:03 +03:00
|
|
|
configure_package_config_file(KWinDBusInterfaceConfig.cmake.in
|
2014-03-27 15:31:25 +04:00
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/KWinDBusInterfaceConfig.cmake"
|
2015-10-28 20:15:36 +03:00
|
|
|
PATH_VARS KDE_INSTALL_DBUSINTERFACEDIR
|
2014-03-27 15:31:25 +04:00
|
|
|
INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR})
|
2014-03-21 19:07:55 +04:00
|
|
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/KWinDBusInterfaceConfig.cmake
|
|
|
|
DESTINATION ${CMAKECONFIG_INSTALL_DIR})
|