summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Golubev <fatzer2@gmail.com>2013-09-25 16:14:08 +0200
committerSlávek Banko <slavek.banko@axis.cz>2015-12-23 02:22:31 +0100
commit37c097719c0be5cfa238daf71e13288f2b510d73 (patch)
treebb1cca776ef7d54ea3a27b20eef5c2a2af67a178
parente8a9c63d92d7bc068d70da3f1f16b2a13ee1e40b (diff)
downloadtdelibs-37c097719c0be5cfa238daf71e13288f2b510d73.tar.gz
tdelibs-37c097719c0be5cfa238daf71e13288f2b510d73.zip
Add new build option WITH_XCOMPOSITE
Fix build without xcomposite This resolves Bug 1289 (cherry picked from commit 6e81fa9ce19536f7b5c7de37f710a416bb31eaf3)
-rw-r--r--CMakeLists.txt14
-rw-r--r--kdecore/kapplication.cpp12
2 files changed, 14 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0d0b270b3..9b19e0e37 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -86,6 +86,7 @@ OPTION( WITH_SUDO_KDESU_BACKEND "Use sudo as backend for kdesu (default is su)"
OPTION( WITH_LZMA "Enable support for LZMA/XZ" ${WITH_ALL_OPTIONS} )
OPTION( WITH_LIBBFD "Enable pretty backtraces with libbfd from GNU binutils" OFF )
OPTION( WITH_XRANDR "Build the krandr library" ON )
+OPTION( WITH_XCOMPOSITE "Enable xcomposite support" ON )
OPTION( WITH_ASPELL "Enable aspell support" ${WITH_ALL_OPTIONS} )
OPTION( WITH_HSPELL "Enable hspell support" ${WITH_ALL_OPTIONS} )
@@ -612,10 +613,15 @@ endif( XRENDER_FOUND )
##### check for xcomposite #########################
-pkg_search_module( XCOMPOSITE xcomposite )
-if( XCOMPOSITE_FOUND )
- set( HAVE_XCOMPOSITE 1 )
-endif( XCOMPOSITE_FOUND )
+if( WITH_XCOMPOSITE )
+ pkg_search_module( XCOMPOSITE xcomposite )
+ if( XCOMPOSITE_FOUND )
+ set( HAVE_XCOMPOSITE 1 )
+ else( WITH_XCOMPOSITE )
+ tde_message_fatal( "xcomposite support was requested, but xcomposite was not found on your system" )
+ endif( XCOMPOSITE_FOUND )
+endif( WITH_XCOMPOSITE )
+
##### check for libxml-2.0 ######################
diff --git a/kdecore/kapplication.cpp b/kdecore/kapplication.cpp
index fa7ad7adb..bb2f642d8 100644
--- a/kdecore/kapplication.cpp
+++ b/kdecore/kapplication.cpp
@@ -186,7 +186,7 @@ static Atom atom_NetSupported;
static Atom kde_xdnd_drop;
#endif
-#ifdef Q_WS_X11
+#if defined(Q_WS_X11) && defined(COMPOSITE)
static int composite_event, composite_error, composite_opcode;
static bool x11_composite_error_generated;
static int x11_error(Display *dpy, XErrorEvent *ev) {
@@ -1981,7 +1981,7 @@ bool KApplication::isCompositionManagerAvailable() {
return false;
}
-bool KApplication::detectCompositionManagerAvailable(bool force_available) {
+bool KApplication::detectCompositionManagerAvailable(bool force_available, bool available) {
const char *home;
struct passwd *p;
p = getpwuid(getuid());
@@ -2023,21 +2023,17 @@ Display* KApplication::openX11RGBADisplay() {
return 0;
}
-Qt::HANDLE KApplication::getX11RGBAVisual(char *display) {
+Qt::HANDLE KApplication::getX11RGBAVisual(Display *dpy) {
return 0;
}
-Qt::HANDLE KApplication::getX11RGBAColormap(char *display) {
+Qt::HANDLE KApplication::getX11RGBAColormap(Display *dpy) {
return 0;
}
bool KApplication::isX11CompositionAvailable() {
return false;
}
-
-KApplication KApplication::KARGBApplication( bool allowStyles ) {
- return KApplication::KApplication(allowStyles, true);
-}
#endif
static bool kapp_block_user_input = false;