diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/action.cpp | 4 | ||||
-rw-r--r-- | src/core.cpp | 23 | ||||
-rw-r--r-- | src/display.cpp | 12 | ||||
-rw-r--r-- | src/fragment.cpp | 1 | ||||
-rw-r--r-- | src/main.cpp | 21 | ||||
-rw-r--r-- | src/match.cpp | 3 | ||||
-rw-r--r-- | src/matrix.cpp | 1 | ||||
-rw-r--r-- | src/metadata.cpp | 4 | ||||
-rw-r--r-- | src/object.cpp | 47 | ||||
-rw-r--r-- | src/plugin.cpp | 42 | ||||
-rw-r--r-- | src/privatecore.h | 9 | ||||
-rw-r--r-- | src/privatedisplay.h | 3 | ||||
-rw-r--r-- | src/privatefragment.h | 2 | ||||
-rw-r--r-- | src/privateobject.h | 2 | ||||
-rw-r--r-- | src/privateoption.h | 5 | ||||
-rw-r--r-- | src/privatescreen.h | 21 | ||||
-rw-r--r-- | src/privatewindow.h | 6 | ||||
-rw-r--r-- | src/screen.cpp | 25 | ||||
-rw-r--r-- | src/session.cpp | 11 | ||||
-rw-r--r-- | src/string.cpp | 3 | ||||
-rw-r--r-- | src/texture.cpp | 2 | ||||
-rw-r--r-- | src/window.cpp | 31 |
22 files changed, 155 insertions, 123 deletions
diff --git a/src/action.cpp b/src/action.cpp index 37b123e..90fd243 100644 --- a/src/action.cpp +++ b/src/action.cpp @@ -28,9 +28,11 @@ #include <string.h> #include <compiz.h> -#include <compiz-core.h> +#include <compoption.h> #include <compaction.h> +#include <compscreen.h> +#include <compdisplay.h> #include <privateaction.h> struct _Modifier { diff --git a/src/core.cpp b/src/core.cpp index 6fc98ca..51a90dc 100644 --- a/src/core.cpp +++ b/src/core.cpp @@ -25,6 +25,7 @@ #include <string.h> #include <sys/poll.h> +#include <sys/time.h> #include <assert.h> #include <algorithm> @@ -32,6 +33,8 @@ #define foreach BOOST_FOREACH #include <compiz-core.h> +#include <compplugin.h> +#include <compdisplay.h> #include "privatecore.h" CompCore *core; @@ -165,7 +168,7 @@ CompCore::eventLoop () foreach (CompDisplay *d, priv->displays) d->setWatchFdHandle (addWatchFd (ConnectionNumber (d->dpy()), - POLLIN, NULL, NULL)); + POLLIN, NULL)); for (;;) { @@ -213,10 +216,9 @@ CompCore::eventLoop () CompFileWatchHandle -CompCore::addFileWatch (const char *path, - int mask, - FileWatchCallBackProc callBack, - void *closure) +CompCore::addFileWatch (const char *path, + int mask, + FileWatchCallBack callBack) { CompFileWatch *fileWatch = new CompFileWatch(); if (!fileWatch) @@ -225,7 +227,6 @@ CompCore::addFileWatch (const char *path, fileWatch->path = strdup (path); fileWatch->mask = mask; fileWatch->callBack = callBack; - fileWatch->closure = closure; fileWatch->handle = priv->lastFileWatchHandle++; if (priv->lastFileWatchHandle == MAXSHORT) @@ -295,10 +296,9 @@ PrivateCore::removeTimer (CompCore::Timer *timer) } CompWatchFdHandle -CompCore::addWatchFd (int fd, - short int events, - CallBackProc callBack, - void *closure) +CompCore::addWatchFd (int fd, + short int events, + FdWatchCallBack callBack) { CompWatchFd *watchFd = new CompWatchFd(); @@ -307,7 +307,6 @@ CompCore::addWatchFd (int fd, watchFd->fd = fd; watchFd->callBack = callBack; - watchFd->closure = closure; watchFd->handle = priv->lastWatchFdHandle++; if (priv->lastWatchFdHandle == MAXSHORT) @@ -381,7 +380,7 @@ PrivateCore::doPoll (int timeout) for (it = watchFds.begin(), i = nWatchFds - 1; it != watchFds.end(); it++, i--) if (watchPollFds[i].revents != 0 && (*it)->callBack) - (*(*it)->callBack) ((*it)->closure); + (*it)->callBack (); } return rv; diff --git a/src/display.cpp b/src/display.cpp index 88a2f85..6f948c3 100644 --- a/src/display.cpp +++ b/src/display.cpp @@ -48,7 +48,7 @@ #include <boost/bind.hpp> - +#include "privatecore.h" #include "privatedisplay.h" #include "privatescreen.h" #include "privatewindow.h" @@ -679,7 +679,7 @@ errorHandler (Display *dpy, } int -compCheckForError (Display *dpy) +CompDisplay::checkForError (Display *dpy) { int e; @@ -1521,14 +1521,6 @@ CompDisplay::findScreen (Window root) return 0; } -void -CompDisplay::forEachWindow (ForEachWindowProc proc, - void *closure) -{ - foreach (CompScreen *s, priv->screens) - s->forEachWindow (proc, closure); -} - CompWindow * CompDisplay::findWindow (Window id) { diff --git a/src/fragment.cpp b/src/fragment.cpp index dcda2bf..abc2587 100644 --- a/src/fragment.cpp +++ b/src/fragment.cpp @@ -31,6 +31,7 @@ #include <compiz-core.h> #include <comptexture.h> #include <compfragment.h> +#include <compscreen.h> #include "privatefragment.h" #include <string.h> diff --git a/src/main.cpp b/src/main.cpp index 88e8804..ab8c749 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -27,6 +27,8 @@ # include "../config.h" #endif +#include <compiz.h> + #include <stdio.h> #include <stdlib.h> #include <signal.h> @@ -37,6 +39,7 @@ #include <compiz-core.h> #include "privatedisplay.h" #include "privatescreen.h" +#include "privatecore.h" char *programName; char **programArgv; @@ -52,21 +55,21 @@ Window currentRoot = 0; int defaultRefreshRate = 50; char *defaultTextureFilter = "Good"; -Bool shutDown = FALSE; -Bool restartSignal = FALSE; +bool shutDown = false; +bool restartSignal = false; CompWindow *lastFoundWindow = 0; CompWindow *lastDamagedWindow = 0; -Bool replaceCurrentWm = FALSE; -Bool indirectRendering = FALSE; -Bool strictBinding = TRUE; -Bool noDetection = FALSE; -Bool useDesktopHints = TRUE; -Bool onlyCurrentScreen = FALSE; +bool replaceCurrentWm = false; +bool indirectRendering = false; +bool strictBinding = true; +bool noDetection = false; +bool useDesktopHints = true; +bool onlyCurrentScreen = false; #ifdef USE_COW -Bool useCow = TRUE; +bool useCow = true; #endif CompMetadata *coreMetadata = NULL; diff --git a/src/match.cpp b/src/match.cpp index d6d6bd7..12e1e68 100644 --- a/src/match.cpp +++ b/src/match.cpp @@ -32,7 +32,10 @@ #include <compiz-core.h> #include "privatedisplay.h" +#include <compscreen.h> #include <compmatch.h> +#include <compwindow.h> +#include <compplugin.h> #include "privatematch.h" class CoreExp : public CompMatch::Expression { diff --git a/src/matrix.cpp b/src/matrix.cpp index 7f1c74f..4718b69 100644 --- a/src/matrix.cpp +++ b/src/matrix.cpp @@ -21,6 +21,7 @@ * From Mesa 3-D graphics library. */ +#include <compiz.h> #include <string.h> #include <math.h> #include <compiz-core.h> diff --git a/src/metadata.cpp b/src/metadata.cpp index c9f319f..7b63efb 100644 --- a/src/metadata.cpp +++ b/src/metadata.cpp @@ -33,8 +33,10 @@ #include <boost/foreach.hpp> #define foreach BOOST_FOREACH -#include <compiz-core.h> +#include <compiz.h> #include <compmetadata.h> +#include <compdisplay.h> +#include <compscreen.h> #define HOME_METADATADIR ".compiz/metadata" #define EXTENSION ".xml" diff --git a/src/object.cpp b/src/object.cpp index 64b4d49..b310e17 100644 --- a/src/object.cpp +++ b/src/object.cpp @@ -23,9 +23,13 @@ * Author: David Reveman <davidr@novell.com> */ +#include <compiz.h> + #include <algorithm> +#include <boost/bind.hpp> #include <compiz-core.h> +#include <compcore.h> #include "privateobject.h" PrivateObject::PrivateObject () : @@ -36,7 +40,7 @@ PrivateObject::PrivateObject () : } -CompObject::CompObject (CompObjectType type, const char* typeName, +CompObject::CompObject (CompObject::Type type, const char* typeName, CompObject::indices *iList) : privates (0) { @@ -82,7 +86,7 @@ CompObject::typeName () return priv->typeName; } -CompObjectType +CompObject::Type CompObject::type () { return priv->type; @@ -99,9 +103,8 @@ CompObject::addChild (CompObject *object) } bool -CompObject::forEachChild (ObjectCallBackProc proc, - void *closure, - CompObjectType type) +CompObject::forEachChild (CompObject::CallBack proc, + CompObject::Type type) { bool rv = true; @@ -110,33 +113,26 @@ CompObject::forEachChild (ObjectCallBackProc proc, { if (type > 0 && (*it)->type () != type) continue; - rv &= (*proc) ((*it), closure); + rv &= proc ((*it)); } return rv; } -typedef struct _ResizeInfo { - CompObjectType type; - unsigned int size; -} ResizeInfo; - static bool -resizePrivates (CompObject *o, void * closure) +resizePrivates (CompObject *o, CompObject::Type type, unsigned int size) { - ResizeInfo *info = static_cast<ResizeInfo *> (closure); - - if (o->type () == info->type) + if (o->type () == type) { - o->privates.resize (info->size); + o->privates.resize (size); } - o->forEachChild (resizePrivates, info); + o->forEachChild (boost::bind (resizePrivates, _1, type, size)); return true; } int -CompObject::allocatePrivateIndex (CompObjectType type, +CompObject::allocatePrivateIndex (CompObject::Type type, CompObject::indices *iList) { if (!iList) @@ -154,18 +150,13 @@ CompObject::allocatePrivateIndex (CompObjectType type, iList->resize (i + 1); iList->at (i) = true; - ResizeInfo info; - info.type = type; - info.size = i + 1; - - - resizePrivates (core, static_cast<void *> (&info)); + resizePrivates (core, type, i + 1); return i; } void -CompObject::freePrivateIndex (CompObjectType type, +CompObject::freePrivateIndex (CompObject::Type type, CompObject::indices *iList, int idx) { @@ -181,10 +172,6 @@ CompObject::freePrivateIndex (CompObjectType type, unsigned int i = iList->size () - 1; iList->resize (i); - ResizeInfo info; - info.type = type; - info.size = i; - - resizePrivates (core, static_cast<void *> (&info)); + resizePrivates (core, type, i); } diff --git a/src/plugin.cpp b/src/plugin.cpp index c46b672..8a22f14 100644 --- a/src/plugin.cpp +++ b/src/plugin.cpp @@ -278,24 +278,23 @@ LoadPluginProc loaderLoadPlugin = dlloaderLoadPlugin; UnloadPluginProc loaderUnloadPlugin = dlloaderUnloadPlugin; ListPluginsProc loaderListPlugins = dlloaderListPlugins; -typedef struct _InitObjectContext { +struct InitObjectContext { CompPlugin *plugin; CompObject *object; -} InitObjectContext; +}; static bool -initObjectTree (CompObject *object, - void *closure); +initObjectTree (CompObject *object, + InitObjectContext *pCtx); static bool -finiObjectTree (CompObject *object, - void *closure); +finiObjectTree (CompObject *object, + InitObjectContext *pCtx); static bool -initObjectTree (CompObject *object, - void *closure) +initObjectTree (CompObject *object, + InitObjectContext *pCtx) { - InitObjectContext *pCtx = (InitObjectContext *) closure; CompPlugin *p = pCtx->plugin; InitObjectContext ctx; @@ -312,16 +311,16 @@ initObjectTree (CompObject *object, ctx.plugin = pCtx->plugin; ctx.object = NULL; - if (!object->forEachChild (initObjectTree, static_cast<void *> (&ctx))) + if (!object->forEachChild (boost::bind (initObjectTree, _1, &ctx))) { - object->forEachChild (finiObjectTree, static_cast<void *> (&ctx)); + object->forEachChild (boost::bind (finiObjectTree, _1, &ctx)); return false; } if (!core->initPluginForObject (p, object)) { - object->forEachChild (finiObjectTree, static_cast<void *> (&ctx)); + object->forEachChild (boost::bind (finiObjectTree, _1, &ctx)); p->vTable->finiObject (object); return false; @@ -331,10 +330,9 @@ initObjectTree (CompObject *object, } static bool -finiObjectTree (CompObject *object, - void *closure) +finiObjectTree (CompObject *object, + InitObjectContext *pCtx) { - InitObjectContext *pCtx = (InitObjectContext *) closure; CompPlugin *p = pCtx->plugin; InitObjectContext ctx; @@ -345,7 +343,7 @@ finiObjectTree (CompObject *object, ctx.plugin = p; ctx.object = NULL; - object->forEachChild (finiObjectTree, static_cast<void *> (&ctx)); + object->forEachChild (boost::bind (finiObjectTree, _1, &ctx)); p->vTable->finiObject (object); @@ -369,7 +367,7 @@ initPlugin (CompPlugin *p) ctx.plugin = p; ctx.object = NULL; - if (!initObjectTree (core, static_cast<void *> (&ctx))) + if (!initObjectTree (core, &ctx)) { p->vTable->fini (); return false; @@ -386,7 +384,7 @@ finiPlugin (CompPlugin *p) ctx.plugin = p; ctx.object = NULL; - finiObjectTree (core, (void *) &ctx); + finiObjectTree (core, &ctx); p->vTable->fini (); } @@ -405,7 +403,7 @@ CompPlugin::objectInitPlugins (CompObject *o) ctx.plugin = (*rit); - if (!initObjectTree (o, (void *) &ctx)) + if (!initObjectTree (o, &ctx)) { if (rit == plugins.rbegin ()) return false; @@ -414,12 +412,12 @@ CompPlugin::objectInitPlugins (CompObject *o) { ctx.plugin = (*rit); - finiObjectTree (o, (void *) &ctx); + finiObjectTree (o, &ctx); } ctx.plugin = (*rit); - finiObjectTree (o, (void *) &ctx); + finiObjectTree (o, &ctx); return false; } rit++; @@ -439,7 +437,7 @@ CompPlugin::objectFiniPlugins (CompObject *o) { ctx.plugin = p; - finiObjectTree (o, (void *) &ctx); + finiObjectTree (o, &ctx); } } diff --git a/src/privatecore.h b/src/privatecore.h index b21f483..8e1de6b 100644 --- a/src/privatecore.h +++ b/src/privatecore.h @@ -4,6 +4,15 @@ #include <compiz-core.h> #include <compcore.h> +extern bool shutDown; +extern bool restartSignal; + +typedef struct _CompWatchFd { + int fd; + FdWatchCallBack callBack; + CompWatchFdHandle handle; +} CompWatchFd; + class PrivateCore { public: diff --git a/src/privatedisplay.h b/src/privatedisplay.h index 70800d6..5a972f3 100644 --- a/src/privatedisplay.h +++ b/src/privatedisplay.h @@ -1,8 +1,11 @@ #ifndef _PRIVATEDISPLAY_H #define _PRIVATEDISPLAY_H +#include <X11/XKBlib.h> + #include <compiz-core.h> #include <compdisplay.h> +#include <compmetadata.h> #define COMP_DISPLAY_OPTION_ABI 0 #define COMP_DISPLAY_OPTION_ACTIVE_PLUGINS 1 diff --git a/src/privatefragment.h b/src/privatefragment.h index bab11bc..68c9e47 100644 --- a/src/privatefragment.h +++ b/src/privatefragment.h @@ -1,6 +1,8 @@ #ifndef _PRIVATEFRAGMENT_H #define _PRIVATEFRAGMENT_H +#include <vector> + #include <compfragment.h> namespace CompFragment { diff --git a/src/privateobject.h b/src/privateobject.h index a8f8eca..2678368 100644 --- a/src/privateobject.h +++ b/src/privateobject.h @@ -9,7 +9,7 @@ class PrivateObject { public : PrivateObject (); - CompObjectType type; + CompObject::Type type; const char *typeName; diff --git a/src/privateoption.h b/src/privateoption.h index c9fef36..bdbcad2 100644 --- a/src/privateoption.h +++ b/src/privateoption.h @@ -3,6 +3,11 @@ #include <vector> +#include <compaction.h> +#include <compmatch.h> +#include <compdisplay.h> +#include <compscreen.h> + typedef struct _CompOptionIntRestriction { int min; int max; diff --git a/src/privatescreen.h b/src/privatescreen.h index bf9dbb5..570b00f 100644 --- a/src/privatescreen.h +++ b/src/privatescreen.h @@ -9,6 +9,27 @@ #include <compfragment.h> #include "privatefragment.h" +extern char *backgroundImage; + +extern Window currentRoot; + +extern CompWindow *lastFoundWindow; +extern CompWindow *lastDamagedWindow; +extern bool replaceCurrentWm; +extern bool indirectRendering; +extern bool strictBinding; +extern bool useCow; +extern bool noDetection; +extern bool useDesktopHints; +extern bool onlyCurrentScreen; + +extern int defaultRefreshRate; +extern char *defaultTextureFilter; + +#define RED_SATURATION_WEIGHT 0.30f +#define GREEN_SATURATION_WEIGHT 0.59f +#define BLUE_SATURATION_WEIGHT 0.11f + #define COMP_SCREEN_OPTION_DETECT_REFRESH_RATE 0 #define COMP_SCREEN_OPTION_LIGHTING 1 #define COMP_SCREEN_OPTION_REFRESH_RATE 2 diff --git a/src/privatewindow.h b/src/privatewindow.h index a2857f6..52ff71f 100644 --- a/src/privatewindow.h +++ b/src/privatewindow.h @@ -107,7 +107,7 @@ class PrivateWindow { static void revealAncestors (CompWindow *w, - void *closure); + CompWindow *transient); bool constrainNewWindowSize (int width, @@ -117,11 +117,11 @@ class PrivateWindow { static void minimizeTransients (CompWindow *w, - void *closure); + CompWindow *ancestor); static void unminimizeTransients (CompWindow *w, - void *closure); + CompWindow *ancestor); bool getUsageTimestamp (Time *timestamp); diff --git a/src/screen.cpp b/src/screen.cpp index 2dbdbbf..408ebba 100644 --- a/src/screen.cpp +++ b/src/screen.cpp @@ -34,6 +34,7 @@ #include <dlfcn.h> #include <string.h> #include <sys/types.h> +#include <sys/time.h> #include <unistd.h> #include <assert.h> #include <limits.h> @@ -50,9 +51,11 @@ #include <X11/extensions/shape.h> #include <X11/cursorfont.h> + #include <compiz-core.h> #include <compscreen.h> +#include <compdisplay.h> #include <compicon.h> #include "privatescreen.h" @@ -1561,12 +1564,12 @@ CompScreen::init (CompDisplay *display, int screenNum) } while (event.type != DestroyNotify); } - compCheckForError (dpy); + CompDisplay::checkForError (dpy); XCompositeRedirectSubwindows (dpy, XRootWindow (dpy, screenNum), CompositeRedirectManual); - if (compCheckForError (dpy)) + if (CompDisplay::checkForError (dpy)) { compLogMessage (display, "core", CompLogLevelError, "Another composite manager is already " @@ -1603,7 +1606,7 @@ CompScreen::init (CompDisplay *display, int screenNum) FocusChangeMask | ExposureMask); - if (compCheckForError (dpy)) + if (CompDisplay::checkForError (dpy)) { compLogMessage (display, "core", CompLogLevelError, "Another window manager is " @@ -2314,10 +2317,10 @@ CompScreen::damagePending () } void -CompScreen::forEachWindow (ForEachWindowProc proc, void *closure) +CompScreen::forEachWindow (CompWindow::ForEach proc) { foreach (CompWindow *w, priv->windows) - (*proc) (w, closure); + proc (w); } void @@ -2646,7 +2649,7 @@ PrivateScreen::grabUngrabKeys (unsigned int modifiers, XModifierKeymap *modMap = display->modMap (); int ignore, mod, k; - compCheckForError (display->dpy ()); + CompDisplay::checkForError (display->dpy ()); for (ignore = 0; ignore <= display->ignoredModMask (); ignore++) { @@ -2679,7 +2682,7 @@ PrivateScreen::grabUngrabKeys (unsigned int modifiers, } } - if (compCheckForError (display->dpy ())) + if (CompDisplay::checkForError (display->dpy ())) return false; } @@ -3033,13 +3036,11 @@ isClientListWindow (CompWindow *w) static void countClientListWindow (CompWindow *w, - void *closure) + int *n) { if (isClientListWindow (w)) { - int *num = (int *) closure; - - *num = *num + 1; + *n = *n + 1; } } @@ -3060,7 +3061,7 @@ CompScreen::updateClientList () Bool updateClientListStacking = true; int i, n = 0; - forEachWindow (countClientListWindow, (void *) &n); + forEachWindow (boost::bind (countClientListWindow, _1, &n)); if (n == 0) { diff --git a/src/session.cpp b/src/session.cpp index 6efb27a..6c0a223 100644 --- a/src/session.cpp +++ b/src/session.cpp @@ -27,6 +27,8 @@ # include "../config.h" #endif +#include <compiz.h> + #include <stdlib.h> #include <stdio.h> #include <poll.h> @@ -36,6 +38,8 @@ #include <X11/SM/SMlib.h> #include <X11/ICE/ICElib.h> +#include <boost/bind.hpp> + #include <compsession.h> #include <compiz-core.h> @@ -303,9 +307,8 @@ CompSession::getSessionClientId (CompSession::ClientIdType type) /* This is called when data is available on an ICE connection. */ static bool -iceProcessMessages (void *data) +iceProcessMessages (IceConn connection) { - IceConn connection = (IceConn) data; IceProcessMessagesStatus status; SM_DEBUG (printf ("ICE connection process messages\n")); @@ -343,8 +346,8 @@ iceNewConnection (IceConn connection, F_GETFD,0) | FD_CLOEXEC); iceWatchFdHandle = core->addWatchFd (IceConnectionNumber (connection), - POLLIN | POLLPRI | POLLHUP | POLLERR, - iceProcessMessages, connection); + POLLIN | POLLPRI | POLLHUP | POLLERR, + boost::bind (iceProcessMessages, connection)); iceConnected = 1; } diff --git a/src/string.cpp b/src/string.cpp index 24efaf3..e35cd85 100644 --- a/src/string.cpp +++ b/src/string.cpp @@ -1,5 +1,6 @@ -#include <compiz-core.h> +#include <compiz.h> +#include <string.h> #include <stdarg.h> CompString compPrintf (const char *format, ...) diff --git a/src/texture.cpp b/src/texture.cpp index b5f8c0b..9fdf5a1 100644 --- a/src/texture.cpp +++ b/src/texture.cpp @@ -27,6 +27,8 @@ # include "../config.h" #endif +#include <compiz.h> + #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/src/window.cpp b/src/window.cpp index b9d785f..98165a3 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -23,6 +23,8 @@ * Author: David Reveman <davidr@novell.com> */ +#include <compiz.h> + #include <X11/Xlib.h> #include <X11/Xatom.h> #include <X11/Xproto.h> @@ -1684,7 +1686,7 @@ PrivateWindow::initializeSyncCounter () values.events = TRUE; - compCheckForError (screen->display ()->dpy ()); + CompDisplay::checkForError (screen->display ()->dpy ()); /* Note that by default, the alarm increments the trigger value * when it fires until the condition (counter.value < trigger.value) @@ -1699,7 +1701,7 @@ PrivateWindow::initializeSyncCounter () XSyncCAEvents, &values); - if (!compCheckForError (screen->display ()->dpy ())) + if (CompDisplay::checkForError (screen->display ()->dpy ())) return true; XSyncDestroyAlarm (screen->display ()->dpy (), syncAlarm); @@ -3282,13 +3284,11 @@ PrivateWindow::reveal () void PrivateWindow::revealAncestors (CompWindow *w, - void *closure) + CompWindow *transient) { - CompWindow *transient = (CompWindow *) closure; - if (isAncestorTo (transient, w)) { - w->priv->screen->forEachWindow (revealAncestors, (void *) w); + w->priv->screen->forEachWindow (boost::bind (revealAncestors, _1, w)); w->priv->reveal (); } } @@ -3300,7 +3300,8 @@ CompWindow::activate () priv->screen->setCurrentDesktop (priv->desktop); - priv->screen->forEachWindow (PrivateWindow::revealAncestors, (void *) this); + priv->screen->forEachWindow ( + boost::bind (PrivateWindow::revealAncestors, _1, this)); priv->reveal (); if (priv->state & CompWindowStateHiddenMask) @@ -3571,10 +3572,8 @@ CompWindow::show () void PrivateWindow::minimizeTransients (CompWindow *w, - void *closure) + CompWindow *ancestor) { - CompWindow *ancestor = (CompWindow *) closure; - if (w->priv->transientFor == ancestor->priv->id || w->priv->isGroupTransient (ancestor->priv->clientLeader)) { @@ -3592,8 +3591,8 @@ CompWindow::minimize () { priv->minimized = true; - priv->screen->forEachWindow (PrivateWindow::minimizeTransients, - (void *) this); + priv->screen->forEachWindow ( + boost::bind (PrivateWindow::minimizeTransients, _1, this)); hide (); } @@ -3601,10 +3600,8 @@ CompWindow::minimize () void PrivateWindow::unminimizeTransients (CompWindow *w, - void *closure) + CompWindow *ancestor) { - CompWindow *ancestor = (CompWindow *) closure; - if (w->priv->transientFor == ancestor->priv->id || w->priv->isGroupTransient (ancestor->priv->clientLeader)) w->unminimize (); @@ -3619,8 +3616,8 @@ CompWindow::unminimize () show (); - priv->screen->forEachWindow (PrivateWindow::unminimizeTransients, - (void *) this); + priv->screen->forEachWindow ( + boost::bind (PrivateWindow::unminimizeTransients, _1, this)); } } |