diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/action.cpp | 6 | ||||
-rw-r--r-- | src/event.cpp | 8 | ||||
-rw-r--r-- | src/main.cpp | 5 | ||||
-rw-r--r-- | src/match.cpp | 12 | ||||
-rw-r--r-- | src/option.cpp | 13 | ||||
-rw-r--r-- | src/plugin.cpp | 10 | ||||
-rw-r--r-- | src/pluginclasses.cpp | 2 | ||||
-rw-r--r-- | src/privateaction.h | 2 | ||||
-rw-r--r-- | src/privatematch.h | 2 | ||||
-rw-r--r-- | src/privateoption.h | 2 | ||||
-rw-r--r-- | src/privateregion.h | 2 | ||||
-rw-r--r-- | src/privatescreen.h | 17 | ||||
-rw-r--r-- | src/privatewindow.h | 2 | ||||
-rw-r--r-- | src/region.cpp | 5 | ||||
-rw-r--r-- | src/screen.cpp | 88 | ||||
-rw-r--r-- | src/string.cpp | 7 | ||||
-rw-r--r-- | src/timer.cpp | 2 | ||||
-rw-r--r-- | src/window.cpp | 29 |
18 files changed, 105 insertions, 109 deletions
diff --git a/src/action.cpp b/src/action.cpp index 04cd3aa..f487ec9 100644 --- a/src/action.cpp +++ b/src/action.cpp @@ -1,6 +1,6 @@ /* * Copyright © 2005 Novell, Inc. - * + * * Permission to use, copy, modify, distribute, and sell this software * and its documentation for any purpose is hereby granted without * fee, provided that the above copyright notice appear in all copies @@ -12,11 +12,11 @@ * software for any purpose. It is provided "as is" without express or * implied warranty. * - * NOVELL, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * NOVELL, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN * NO EVENT SHALL NOVELL, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS - * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, + * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * diff --git a/src/event.cpp b/src/event.cpp index 6a2338e..f0e6d77 100644 --- a/src/event.cpp +++ b/src/event.cpp @@ -594,7 +594,7 @@ PrivateScreen::triggerEdgeEnter (unsigned int edge, edgeDelayTimer.start ( boost::bind (delayedEdgeTimeout, &edgeDelaySettings), - delay, (unsigned int)((float) delay * 1.2)); + delay, (unsigned int) ((float) delay * 1.2)); delayState = CompAction::StateNoEdgeDelay; if (triggerAllEdgeEnterBindings (state, delayState, edge, arguments)) @@ -931,12 +931,12 @@ void CompScreen::handleCompizEvent (const char *plugin, const char *event, CompOption::Vector &options) - WRAPABLE_HND_FUNC(7, handleCompizEvent, plugin, event, options) + WRAPABLE_HND_FUNC (7, handleCompizEvent, plugin, event, options) void CompScreen::handleEvent (XEvent *event) { - WRAPABLE_HND_FUNC(6, handleEvent, event) + WRAPABLE_HND_FUNC (6, handleEvent, event) CompWindow *w; @@ -1667,7 +1667,7 @@ CompScreen::handleEvent (XEvent *event) priv->autoRaiseWindow = w->id (); priv->autoRaiseTimer.start ( boost::bind (autoRaiseTimeout, this), - delay, (unsigned int)((float) delay * 1.2)); + delay, (unsigned int) ((float) delay * 1.2)); } else { diff --git a/src/main.cpp b/src/main.cpp index 2bed44d..957effe 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -179,12 +179,11 @@ main (int argc, char **argv) } else { - plugins.push_back(argv[i]); + plugins.push_back (argv[i]); } } - screen = new CompScreen(); - + screen = new CompScreen (); if (!screen) return 1; diff --git a/src/match.cpp b/src/match.cpp index 04194d3..663bd69 100644 --- a/src/match.cpp +++ b/src/match.cpp @@ -52,7 +52,7 @@ class CoreExp : public CompMatch::Expression { TypeRGBA, TypeType } Type; - + CoreExp (const CompString& str) { if (str.compare (0, 4, "xid=") == 0) @@ -116,7 +116,7 @@ class CoreExp : public CompMatch::Expression { CompMatch::Expression * CompScreen::matchInitExp (const CompString& str) { - WRAPABLE_HND_FUNC_RETURN(10, CompMatch::Expression *, matchInitExp, str) + WRAPABLE_HND_FUNC_RETURN (10, CompMatch::Expression *, matchInitExp, str) return new CoreExp (str); } @@ -145,7 +145,7 @@ matchUpdateMatchOptions (CompOption::Vector& options) void CompScreen::matchExpHandlerChanged () { - WRAPABLE_HND_FUNC(11, matchExpHandlerChanged) + WRAPABLE_HND_FUNC (11, matchExpHandlerChanged) foreach (CompPlugin *p, CompPlugin::getPlugins ()) { @@ -157,7 +157,7 @@ CompScreen::matchExpHandlerChanged () void CompScreen::matchPropertyChanged (CompWindow *w) { - WRAPABLE_HND_FUNC(12, matchPropertyChanged, w) + WRAPABLE_HND_FUNC (12, matchPropertyChanged, w) } static void @@ -359,7 +359,7 @@ matchAddFromString (MatchOp::List &list, if (j > i) { MatchExpOp *exp = new MatchExpOp (); - exp->value = strndupValue (str.substr(i, j - i)); + exp->value = strndupValue (str.substr (i, j - i)); exp->flags = flags; list.push_back (exp); } @@ -563,7 +563,7 @@ MatchGroupOp::operator= (const MatchGroupOp &gr) op.push_back (eop); break; default: - break; + break; } } } diff --git a/src/option.cpp b/src/option.cpp index b3fba2f..dbe0df6 100644 --- a/src/option.cpp +++ b/src/option.cpp @@ -268,8 +268,8 @@ CompOption::Value::action () priv->checkType (priv->type); if (!checkIsAction (priv->type)) - compLogMessage("core", CompLogLevelWarn, - "CompOption::Value not an action"); + compLogMessage ("core", CompLogLevelWarn, + "CompOption::Value not an action"); return priv->action; } @@ -602,7 +602,7 @@ CompOption::findOption (CompOption::Vector &options, for (i = 0; i < options.size (); i++) { - if (options[i].priv->name.compare(name) == 0) + if (options[i].priv->name == name) { if (index) *index = i; @@ -691,7 +691,7 @@ CompOption::setName (CompString name, CompOption::Type type) priv->name = name; priv->type = type; } - + CompString CompOption::name () { @@ -726,8 +726,9 @@ CompOption::set (CompOption::Value &val) (!isAction () || !checkIsAction (val.type ()))) { compLogMessage ("core", CompLogLevelWarn, - "Can't set Value with type %d to option \"%s\" with type %d", - val.type (), priv->name.c_str(), priv->type); + "Can't set Value with type %d to " + "option \"%s\" with type %d", + val.type (), priv->name.c_str (), priv->type); return false; } diff --git a/src/plugin.cpp b/src/plugin.cpp index da8f6cd..f6c3961 100644 --- a/src/plugin.cpp +++ b/src/plugin.cpp @@ -309,7 +309,7 @@ finiPlugin (CompPlugin *p) bool CompScreen::initPluginForScreen (CompPlugin *p) { - WRAPABLE_HND_FUNC_RETURN(2, bool, initPluginForScreen, p) + WRAPABLE_HND_FUNC_RETURN (2, bool, initPluginForScreen, p) bool status = true; CompWindowList::iterator it, fail; @@ -341,7 +341,7 @@ CompScreen::initPluginForScreen (CompPlugin *p) void CompScreen::finiPluginForScreen (CompPlugin *p) { - WRAPABLE_HND_FUNC(3, finiPluginForScreen, p) + WRAPABLE_HND_FUNC (3, finiPluginForScreen, p) foreach (CompWindow *w, priv->windows) p->vTable->finiWindow (w); @@ -360,7 +360,7 @@ CompPlugin::screenInitPlugins (CompScreen *s) if (p->vTable->initScreen (s)) s->initPluginForScreen (p); - + rit++; } @@ -392,7 +392,7 @@ CompPlugin::windowInitPlugins (CompWindow *w) p = (*rit); status &= p->vTable->initWindow (w); - + rit++; } @@ -684,7 +684,7 @@ void CompPlugin::VTable::finiWindow (CompWindow *) { } - + CompOption::Vector & CompPlugin::VTable::getOptions () { diff --git a/src/pluginclasses.cpp b/src/pluginclasses.cpp index f48bede..3c36db6 100644 --- a/src/pluginclasses.cpp +++ b/src/pluginclasses.cpp @@ -30,7 +30,7 @@ PluginClassStorage::PluginClassStorage (PluginClassStorage::Indices& iList) : pluginClasses (0) { - if (iList.size() > 0) + if (iList.size () > 0) pluginClasses.resize (iList.size ()); } diff --git a/src/privateaction.h b/src/privateaction.h index 54eff84..9c972ec 100644 --- a/src/privateaction.h +++ b/src/privateaction.h @@ -32,7 +32,7 @@ class PrivateAction { public: PrivateAction (); PrivateAction (const PrivateAction&); - + CompAction::CallBack initiate; CompAction::CallBack terminate; diff --git a/src/privatematch.h b/src/privatematch.h index 63d45c8..a7fdbca 100644 --- a/src/privatematch.h +++ b/src/privatematch.h @@ -61,7 +61,7 @@ class MatchExpOp : public MatchOp { CompString value; - boost::shared_ptr<CompMatch::Expression> e; + boost::shared_ptr<CompMatch::Expression> e; }; class MatchGroupOp : public MatchOp { diff --git a/src/privateoption.h b/src/privateoption.h index fb74280..1749554 100644 --- a/src/privateoption.h +++ b/src/privateoption.h @@ -85,7 +85,7 @@ class PrivateOption public: PrivateOption (); PrivateOption (const PrivateOption &); - + CompString name; CompOption::Type type; CompOption::Value value; diff --git a/src/privateregion.h b/src/privateregion.h index 9d323d0..d91e9c1 100644 --- a/src/privateregion.h +++ b/src/privateregion.h @@ -35,7 +35,7 @@ class PrivateRegion { ~PrivateRegion (); void makeReal (); - + public: Region region; REGION box; diff --git a/src/privatescreen.h b/src/privatescreen.h index cc3db33..bb1fe8a 100644 --- a/src/privatescreen.h +++ b/src/privatescreen.h @@ -117,8 +117,8 @@ class PrivateScreen : public CoreOptions { friend class CompScreen; private: - Cursor cursor; - const char *name; + Cursor cursor; + const char *name; }; public: @@ -171,13 +171,13 @@ class PrivateScreen : public CoreOptions { void setAudibleBell (bool audible); bool handlePingTimeout (); - + bool handleActionEvent (XEvent *event); void handleSelectionRequest (XEvent *event); void handleSelectionClear (XEvent *event); - + bool desktopHintEqual (unsigned long *data, int size, int offset, @@ -197,7 +197,7 @@ class PrivateScreen : public CoreOptions { void reshape (int w, int h); - bool handleStartupSequenceTimeout(); + bool handleStartupSequenceTimeout (); void addSequence (SnStartupSequence *sequence); @@ -266,7 +266,6 @@ class PrivateScreen : public CoreOptions { void setCurrentOutput (unsigned int outputNum); - void configure (XConfigureEvent *ce); void eraseWindowFromMap (Window id); @@ -361,7 +360,7 @@ class PrivateScreen : public CoreOptions { CompOption::Value plugin; bool dirtyPluginList; - + CompScreen *screen; CompWindowList windows; @@ -417,13 +416,13 @@ class PrivateScreen : public CoreOptions { CompWindow **clientList; int nClientList; - std::list<ButtonGrab> buttonGrabs; + std::list<ButtonGrab> buttonGrabs; std::list<KeyGrab> keyGrabs; std::list<Grab *> grabs; unsigned int pendingDestroys; - + CompRect workArea; unsigned int showingDesktopMask; diff --git a/src/privatewindow.h b/src/privatewindow.h index 7d6fe48..e54c096 100644 --- a/src/privatewindow.h +++ b/src/privatewindow.h @@ -165,7 +165,7 @@ class PrivateWindow { unsigned int adjustConfigureRequestForGravity (XWindowChanges *xwc, unsigned int xwcm, int gravity); - + void updateSize (); bool getUserTime (Time& time); diff --git a/src/region.cpp b/src/region.cpp index 4200cac..9cd4e33 100644 --- a/src/region.cpp +++ b/src/region.cpp @@ -108,7 +108,7 @@ CompRegion::operator= (const CompRegion &c) bool CompRegion::operator== (const CompRegion &c) const { - return XEqualRegion(handle (), c.handle ()); + return XEqualRegion (handle (), c.handle ()); } bool @@ -208,7 +208,7 @@ CompRegion::rects () const } return rv; } - + CompRegion CompRegion::subtracted (const CompRegion &r) const { @@ -311,7 +311,6 @@ CompRegion::xored (const CompRegion &r) const XXorRegion (handle (), r.handle (), rv.handle ()); return rv; } - const CompRegion CompRegion::operator& (const CompRegion &r) const diff --git a/src/screen.cpp b/src/screen.cpp index f3b158b..04a33c5 100644 --- a/src/screen.cpp +++ b/src/screen.cpp @@ -92,8 +92,6 @@ typedef struct { CompScreen *screen; -#define NUM_OPTIONS(s) (sizeof ((s)->priv->opt) / sizeof (CompOption)) - PluginClassStorage::Indices screenPluginClassIndices (0); int @@ -140,18 +138,18 @@ CompScreen::eventLoop () priv->processEvents (); - if (!priv->timers.empty()) + if (!priv->timers.empty ()) { gettimeofday (&tv, 0); priv->handleTimers (&tv); - if (priv->timers.front()->mMinLeft > 0) + if (priv->timers.front ()->mMinLeft > 0) { - std::list<CompTimer *>::iterator it = priv->timers.begin(); + std::list<CompTimer *>::iterator it = priv->timers.begin (); t = (*it); time = t->mMaxLeft; - while (it != priv->timers.end()) + while (it != priv->timers.end ()) { t = (*it); if (t->mMinLeft <= time) @@ -184,7 +182,7 @@ CompScreen::addFileWatch (const char *path, int mask, FileWatchCallBack callBack) { - CompFileWatch *fileWatch = new CompFileWatch(); + CompFileWatch *fileWatch = new CompFileWatch (); if (!fileWatch) return 0; @@ -196,7 +194,7 @@ CompScreen::addFileWatch (const char *path, if (priv->lastFileWatchHandle == MAXSHORT) priv->lastFileWatchHandle = 1; - priv->fileWatch.push_front(fileWatch); + priv->fileWatch.push_front (fileWatch); fileWatchAdded (fileWatch); @@ -209,11 +207,11 @@ CompScreen::removeFileWatch (CompFileWatchHandle handle) std::list<CompFileWatch *>::iterator it; CompFileWatch *w; - for (it = priv->fileWatch.begin(); it != priv->fileWatch.end(); it++) + for (it = priv->fileWatch.begin (); it != priv->fileWatch.end (); it++) if ((*it)->handle == handle) break; - if (it == priv->fileWatch.end()) + if (it == priv->fileWatch.end ()) return; w = (*it); @@ -240,7 +238,7 @@ PrivateScreen::addTimer (CompTimer *timer) if (it != timers.end ()) return; - for (it = timers.begin(); it != timers.end(); it++) + for (it = timers.begin (); it != timers.end (); it++) { if ((int) timer->mMinTime < (*it)->mMinLeft) break; @@ -270,7 +268,7 @@ CompScreen::addWatchFd (int fd, short int events, FdWatchCallBack callBack) { - CompWatchFd *watchFd = new CompWatchFd(); + CompWatchFd *watchFd = new CompWatchFd (); if (!watchFd) return 0; @@ -303,13 +301,13 @@ CompScreen::removeWatchFd (CompWatchFdHandle handle) int i; for (it = priv->watchFds.begin(), i = priv->nWatchFds - 1; - it != priv->watchFds.end(); it++, i--) + it != priv->watchFds.end (); it++, i--) { if ((*it)->handle == handle) break; } - if (it == priv->watchFds.end()) + if (it == priv->watchFds.end ()) return; w = (*it); @@ -384,7 +382,7 @@ PrivateScreen::watchFdEvents (CompWatchFdHandle handle) std::list<CompWatchFd *>::iterator it; int i; - for (it = watchFds.begin(), i = nWatchFds - 1; it != watchFds.end(); + for (it = watchFds.begin (), i = nWatchFds - 1; it != watchFds.end (); it++, i--) if ((*it)->handle == handle) return watchPollFds[i].revents; @@ -403,7 +401,7 @@ PrivateScreen::doPoll (int timeout) std::list<CompWatchFd *>::iterator it; int i; - for (it = watchFds.begin(), i = nWatchFds - 1; it != watchFds.end(); + for (it = watchFds.begin (), i = nWatchFds - 1; it != watchFds.end (); it++, i--) { if (watchPollFds[i].revents != 0 && (*it)->callBack) @@ -427,18 +425,18 @@ PrivateScreen::handleTimers (struct timeval *tv) if (timeDiff < 0) timeDiff = 0; - for (it = timers.begin(); it != timers.end(); it++) + for (it = timers.begin (); it != timers.end (); it++) { t = (*it); t->mMinLeft -= timeDiff; t->mMaxLeft -= timeDiff; } - while (timers.begin() != timers.end() && - (*timers.begin())->mMinLeft <= 0) + while (timers.begin () != timers.end () && + timers.front ()->mMinLeft <= 0) { - t = (*timers.begin()); - timers.pop_front(); + t = timers.front (); + timers.pop_front (); t->mActive = false; if (t->mCallBack ()) @@ -454,12 +452,12 @@ PrivateScreen::handleTimers (struct timeval *tv) void CompScreen::fileWatchAdded (CompFileWatch *watch) - WRAPABLE_HND_FUNC(0, fileWatchAdded, watch) + WRAPABLE_HND_FUNC (0, fileWatchAdded, watch) void CompScreen::fileWatchRemoved (CompFileWatch *watch) - WRAPABLE_HND_FUNC(1, fileWatchRemoved, watch) - + WRAPABLE_HND_FUNC (1, fileWatchRemoved, watch) + bool CompScreen::setOptionForPlugin (const char *plugin, const char *name, @@ -496,7 +494,6 @@ void ScreenInterface::finiPluginForScreen (CompPlugin *plugin) WRAPABLE_DEF (finiPluginForScreen, plugin) - bool ScreenInterface::setOptionForPlugin (const char *plugin, const char *name, @@ -638,7 +635,7 @@ PrivateScreen::updateScreenInfo () { int nInfo; XineramaScreenInfo *info = XineramaQueryScreens (dpy, &nInfo); - + screenInfo = std::vector<XineramaScreenInfo> (info, info + nInfo); if (info) @@ -977,7 +974,7 @@ PrivateScreen::updatePlugins () if (plugin.list ()[j].s () != list[i].s ()) break; } - + nPop = plugin.list ().size () - j; for (j = 0; j < nPop; j++) @@ -1296,7 +1293,7 @@ CompScreen::logMessage (const char *componentName, CompLogLevel level, const char *message) { - WRAPABLE_HND_FUNC(13, logMessage, componentName, level, message) + WRAPABLE_HND_FUNC (13, logMessage, componentName, level, message) ::logMessage (componentName, level, message); } @@ -1960,7 +1957,7 @@ PrivateScreen::detectOutputDevices () else { CompOption::Value::Vector l; - l.push_back (compPrintf ("%dx%d+%d+%d", screen->width(), + l.push_back (compPrintf ("%dx%d+%d+%d", screen->width (), screen->height (), 0, 0)); value.set (CompOption::TypeString, l); } @@ -1989,7 +1986,7 @@ PrivateScreen::updateStartupFeedback () #define STARTUP_TIMEOUT_DELAY 15000 bool -PrivateScreen::handleStartupSequenceTimeout() +PrivateScreen::handleStartupSequenceTimeout () { struct timeval now, active; double elapsed; @@ -2133,7 +2130,7 @@ PrivateScreen::setCurrentOutput (unsigned int outputNum) void PrivateScreen::reshape (int w, int h) { - updateScreenInfo(); + updateScreenInfo (); region = CompRegion (0, 0, w, h); @@ -2392,15 +2389,14 @@ PrivateScreen::getDesktopHints () void CompScreen::enterShowDesktopMode () { - WRAPABLE_HND_FUNC(14, enterShowDesktopMode) - + WRAPABLE_HND_FUNC (14, enterShowDesktopMode) unsigned long data = 1; int count = 0; bool st = priv->optionGetHideSkipTaskbarWindows (); priv->showingDesktopMask = ~(CompWindowTypeDesktopMask | - CompWindowTypeDockMask); + CompWindowTypeDockMask); foreach (CompWindow *w, priv->windows) { @@ -2434,7 +2430,7 @@ CompScreen::enterShowDesktopMode () void CompScreen::leaveShowDesktopMode (CompWindow *window) { - WRAPABLE_HND_FUNC(15, leaveShowDesktopMode, window) + WRAPABLE_HND_FUNC (15, leaveShowDesktopMode, window) unsigned long data = 0; @@ -2708,7 +2704,7 @@ CompScreen::invisibleCursor () CompScreen::GrabHandle CompScreen::pushGrab (Cursor cursor, const char *name) { - if (priv->grabs.empty()) + if (priv->grabs.empty ()) { int status; @@ -3381,7 +3377,7 @@ CompScreen::runCommand (CompString command) CompString env (priv->displayString); setsid (); - + pos = env.find (':'); if (pos != std::string::npos) { @@ -3397,7 +3393,7 @@ CompScreen::runCommand (CompString command) } env.append (compPrintf (".%d", priv->screenNum)); - + putenv (const_cast<char *> (env.c_str ())); exit (execl ("/bin/sh", "/bin/sh", "-c", command.c_str (), NULL)); @@ -3675,7 +3671,7 @@ CompScreen::getWorkareaForOutput (int output) const void CompScreen::outputChangeNotify () - WRAPABLE_HND_FUNC(16, outputChangeNotify) + WRAPABLE_HND_FUNC (16, outputChangeNotify) @@ -3749,7 +3745,7 @@ CompScreen::outputDeviceForGeometry (const CompWindow::Geometry& gm) x = (gm.x () + (gm.width () / 2) + gm.border ()) % width (); if (x < 0) x += width (); - y = (gm.y () + (gm.height () / 2) + gm.border()) % height (); + y = (gm.y () + (gm.height () / 2) + gm.border ()) % height (); if (y < 0) y += height (); @@ -3785,8 +3781,10 @@ CompScreen::outputDeviceForGeometry (const CompWindow::Geometry& gm) user preferred strategy for that */ unsigned int currentSize, bestOutputSize; Bool searchLargest; - - searchLargest = (strategy != CoreOptions::OverlappingOutputsPreferSmallerOutput); + + searchLargest = + (strategy != CoreOptions::OverlappingOutputsPreferSmallerOutput); + if (searchLargest) bestOutputSize = 0; else @@ -4224,7 +4222,7 @@ CompScreen::init (const char *name) &priv->xineramaEvent, &priv->xineramaError); - priv->updateScreenInfo(); + priv->updateScreenInfo (); priv->escapeKeyCode = XKeysymToKeycode (dpy, XStringToKeysym ("Escape")); priv->returnKeyCode = XKeysymToKeycode (dpy, XStringToKeysym ("Return")); @@ -4582,7 +4580,7 @@ PrivateScreen::PrivateScreen (CompScreen *screen) : edgeDelayTimer (), plugin (), dirtyPluginList (true), - screen(screen), + screen (screen), windows (), vp (0, 0), vpSize (1, 1), @@ -4619,7 +4617,7 @@ PrivateScreen::PrivateScreen (CompScreen *screen) : gettimeofday (&lastTimeout, 0); pingTimer.setCallback ( - boost::bind(&PrivateScreen::handlePingTimeout, this)); + boost::bind (&PrivateScreen::handlePingTimeout, this)); startupSequenceTimer.setCallback ( boost::bind (&PrivateScreen::handleStartupSequenceTimeout, this)); diff --git a/src/string.cpp b/src/string.cpp index cc96c5e..7ec0bec 100644 --- a/src/string.cpp +++ b/src/string.cpp @@ -34,7 +34,7 @@ CompString compPrintf (const char *format, ...) CompString rv; va_start (ap, format); - rv = compPrintf(format, ap); + rv = compPrintf (format, ap); va_end (ap); return rv; @@ -74,13 +74,14 @@ CompString compPrintf (const char *format, va_list ap) delete [] str; str = new char[size]; - + if (!str) { return CompString (""); } } - CompString rv(str); + + CompString rv (str); delete [] str; return rv; } diff --git a/src/timer.cpp b/src/timer.cpp index e025644..c9bfdee 100644 --- a/src/timer.cpp +++ b/src/timer.cpp @@ -55,7 +55,7 @@ CompTimer::setTimes (unsigned int min, unsigned int max) if (wasActive) start (); } - + void CompTimer::setCallback (CompTimer::CallBack callback) { diff --git a/src/window.cpp b/src/window.cpp index d66183a..427e3a9 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -2240,7 +2240,7 @@ PrivateWindow::reconfigureXWindow (unsigned int valueMask, wc.y -= input.top; wc.width += input.left + input.right; wc.height += input.top + input.bottom; - + XConfigureWindow (screen->dpy (), frame, valueMask, &wc); valueMask &= ~(CWSibling | CWStackMode); @@ -2323,7 +2323,7 @@ PrivateWindow::stackAncestors (CompWindow *w, if (ancestor->priv->mapNum || ancestor->priv->pendingMaps) ancestor->priv->reconfigureXWindow (CWSibling | CWStackMode, - xwc); + xwc); stackAncestors (ancestor, xwc); } @@ -2792,7 +2792,7 @@ CompWindow::moveResize (XWindowChanges *xwc, safe to assume that the saved coordinates should be updated too, e.g. because the window was moved to another viewport by some client */ if ((xwcm & CWX) && (priv->saveMask & CWX)) - priv->saveWc.x += (xwc->x - priv->serverGeometry.x ()); + priv->saveWc.x += (xwc->x - priv->serverGeometry.x ()); if ((xwcm & CWY) && (priv->saveMask & CWY)) priv->saveWc.y += (xwc->y - priv->serverGeometry.y ()); @@ -3144,7 +3144,7 @@ PrivateWindow::revealAncestors (CompWindow *w, void CompWindow::activate () { - WRAPABLE_HND_FUNC(3, activate) + WRAPABLE_HND_FUNC (3, activate) screen->priv->setCurrentDesktop (priv->desktop); @@ -3885,7 +3885,7 @@ CompWindow::getIcon (int width, } /* don't fetch property again */ - if (priv->icons.size() == 0) + if (priv->icons.size () == 0) priv->noIcons = true; } @@ -4116,7 +4116,6 @@ void WindowInterface::windowNotify (CompWindowNotify n) WRAPABLE_DEF (windowNotify, n) - void WindowInterface::grabNotify (int x, int y, @@ -4147,19 +4146,19 @@ CompWindow::type () { return priv->type; } - + unsigned int & CompWindow::state () { return priv->state; } - + unsigned int CompWindow::actions () { return priv->actions; } - + unsigned int & CompWindow::protocols () { @@ -5096,7 +5095,7 @@ CompWindow::updateFrameRegion () r = priv->region.boundingRect (); priv->frameRegion -= r; - r.setGeometry (r.x1 () - priv->input.left, + r.setGeometry (r.x1 () - priv->input.left, r.y1 () - priv->input.top, r.width () + priv->input.right + priv->input.left, r.height () + priv->input.bottom + priv->input.top); @@ -5144,7 +5143,7 @@ CompWindow::setWindowFrameExtents (CompWindowExtents *i) void CompWindow::updateFrameRegion (CompRegion& region) - WRAPABLE_HND_FUNC(12, updateFrameRegion, region) + WRAPABLE_HND_FUNC (12, updateFrameRegion, region) bool PrivateWindow::reparent () @@ -5178,14 +5177,14 @@ PrivateWindow::reparent () SubstructureNotifyMask | EnterWindowMask | LeaveWindowMask; - frame = XCreateWindow(dpy, screen->root (), sg.x () - input.left, + frame = XCreateWindow (dpy, screen->root (), sg.x () - input.left, sg.y () - input.top, sg.width () + input.left + input.right, sg.height () + input.top + input.bottom, 0, attrib.depth, InputOutput, attrib.visual, mask, &attr); - wrapper = XCreateWindow(dpy, frame, input.left, input.top, + wrapper = XCreateWindow (dpy, frame, input.left, input.top, sg.width (), sg.height (), 0, attrib.depth, InputOutput, attrib.visual, mask, &attr); @@ -5209,7 +5208,7 @@ PrivateWindow::reparent () XChangeSaveSet (dpy, id, SetModeInsert); XFlush (dpy); - XChangeWindowAttributes(dpy, id, CWEventMask | CWDontPropagate, &attr); + XChangeWindowAttributes (dpy, id, CWEventMask | CWDontPropagate, &attr); if (mapNum || shaded) { @@ -5259,7 +5258,7 @@ PrivateWindow::unreparent () XConfigureWindow (dpy, id, CWSibling | CWStackMode, &xwc); XUnmapWindow (dpy, frame); XFlush (dpy); - + if (mapNum || shaded) { if (XCheckTypedWindowEvent (dpy, id, FocusIn, &e) || |