From c19f08178ed365e23fa231ae0843aa896da50a62 Mon Sep 17 00:00:00 2001 From: Sanel Zukan Date: Mon, 9 Jun 2008 15:08:45 +0000 Subject: [PATCH] Composite part now can be conditionally compiled Added some more common colors in ede-settings.xml --- evoke/EvokeService.cpp | 12 +++++++++++- evoke/EvokeService.h | 5 +++++ evoke/Jamfile | 5 ++++- evoke/ede-settings.xml | 8 ++++---- 4 files changed, 24 insertions(+), 6 deletions(-) diff --git a/evoke/EvokeService.cpp b/evoke/EvokeService.cpp index 6a918b6..01bcc8e 100644 --- a/evoke/EvokeService.cpp +++ b/evoke/EvokeService.cpp @@ -198,7 +198,11 @@ void wake_up_cb(int fd, void* v) { } EvokeService::EvokeService() : - is_running(0), logfile(NULL), xsm(NULL), composite(NULL), pidfile(NULL), lockfile(NULL) { + is_running(0), logfile(NULL), xsm(NULL), +#ifdef HAVE_COMPOSITE + composite(NULL), +#endif + pidfile(NULL), lockfile(NULL) { wake_up_pipe[0] = wake_up_pipe[1] = -1; } @@ -207,7 +211,9 @@ EvokeService::~EvokeService() { if(logfile) delete logfile; +#ifdef HAVE_COMPOSITE delete composite; +#endif stop_xsettings_manager(true); @@ -500,12 +506,14 @@ void EvokeService::stop_xsettings_manager(bool serialize) { } void EvokeService::init_composite(void) { +#ifdef HAVE_COMPOSITE composite = new Composite(); if(!composite->init()) { delete composite; composite = NULL; } +#endif } void EvokeService::setup_atoms(Display* d) { @@ -725,8 +733,10 @@ bool EvokeService::find_and_unregister_process(pid_t pid, EvokeProcess& pc) { } int EvokeService::composite_handle(const XEvent* xev) { +#ifdef HAVE_COMPOSITE if(composite) return composite->handle_xevents(xev); +#endif return 1; } diff --git a/evoke/EvokeService.h b/evoke/EvokeService.h index 1fd7f60..146a7b1 100644 --- a/evoke/EvokeService.h +++ b/evoke/EvokeService.h @@ -15,7 +15,10 @@ #include "Log.h" #include "Xsm.h" + +#ifdef HAVE_COMPOSITE #include "Composite.h" +#endif #include #include @@ -56,7 +59,9 @@ class EvokeService { bool is_running; Log* logfile; Xsm* xsm; +#ifdef HAVE_COMPOSITE Composite* composite; +#endif char* pidfile; char* lockfile; diff --git a/evoke/Jamfile b/evoke/Jamfile index c143c4e..a03c292 100644 --- a/evoke/Jamfile +++ b/evoke/Jamfile @@ -19,7 +19,6 @@ ObjectC++Flags EvokeService.cpp evoke.cpp : -DUSE_FLTK_LOOP_EMULATION ; SOURCE = evoke.cpp EvokeService.cpp - Composite.cpp ClassHack.c Xsm.cpp Spawn.cpp @@ -28,7 +27,11 @@ SOURCE = evoke.cpp Logout.cpp Autostart.cpp ; +# for composite +SOURCE += Composite.cpp ; +ObjectC++Flags $(SOURCE) : -DHAVE_COMPOSITE ; LinkAgainst evoke : -lXcomposite -lXdamage -lXfixes -lXrender ; + #LinkAgainst evoke : -lpthread ; EdeProgram evoke : $(SOURCE) ; diff --git a/evoke/ede-settings.xml b/evoke/ede-settings.xml index 4009a17..419f3b1 100644 --- a/evoke/ede-settings.xml +++ b/evoke/ede-settings.xml @@ -1,11 +1,11 @@ - - + + - + @@ -13,7 +13,7 @@ - +