summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk/window-decorator/gtk-window-decorator.c10
-rw-r--r--include/core/action.h2
-rw-r--r--include/core/match.h2
-rw-r--r--include/core/option.h2
-rw-r--r--include/core/output.h2
-rw-r--r--include/core/plugin.h16
-rw-r--r--include/core/pluginclasses.h4
-rw-r--r--include/core/pluginclasshandler.h2
-rw-r--r--include/core/region.h6
-rw-r--r--include/core/screen.h23
-rw-r--r--include/core/window.h32
-rw-r--r--include/core/wrapsystem.h81
-rw-r--r--kde/window-decorator-kde4/decorator.cpp78
-rw-r--r--kde/window-decorator-kde4/decorator.h2
-rw-r--r--kde/window-decorator-kde4/kdecoration_plugins.h4
-rw-r--r--kde/window-decorator-kde4/main.cpp26
-rw-r--r--kde/window-decorator-kde4/options.cpp4
-rw-r--r--kde/window-decorator-kde4/switcher.cpp23
-rw-r--r--kde/window-decorator-kde4/switcher.h2
-rw-r--r--kde/window-decorator-kde4/utils.cpp12
-rw-r--r--kde/window-decorator-kde4/window.cpp191
-rw-r--r--kde/window-decorator-kde4/window.h11
-rw-r--r--libdecoration/decoration.c2
-rw-r--r--plugins/blur/src/blur.cpp95
-rw-r--r--plugins/blur/src/blur.h3
-rw-r--r--plugins/commands/src/commands.cpp2
-rw-r--r--plugins/composite/include/composite/composite.h8
-rw-r--r--plugins/composite/src/privates.h5
-rw-r--r--plugins/composite/src/screen.cpp25
-rw-r--r--plugins/composite/src/window.cpp9
-rw-r--r--plugins/copytex/src/copytex.cpp39
-rw-r--r--plugins/copytex/src/copytex.h6
-rw-r--r--plugins/decor/src/decor.cpp18
-rw-r--r--plugins/decor/src/decor.h3
-rw-r--r--plugins/imgpng/src/imgpng.cpp2
-rw-r--r--plugins/imgsvg/src/imgsvg.cpp2
-rw-r--r--plugins/ini/src/ini.cpp2
-rw-r--r--plugins/move/src/move.cpp10
-rw-r--r--plugins/move/src/move.h7
-rw-r--r--plugins/opengl/include/opengl/opengl.h8
-rw-r--r--plugins/opengl/include/opengl/texture.h1
-rw-r--r--plugins/opengl/src/fragment.cpp23
-rw-r--r--plugins/opengl/src/matrix.cpp2
-rw-r--r--plugins/opengl/src/paint.cpp39
-rw-r--r--plugins/opengl/src/privates.h8
-rw-r--r--plugins/opengl/src/screen.cpp6
-rw-r--r--plugins/opengl/src/texture.cpp11
-rw-r--r--plugins/opengl/src/window.cpp7
-rw-r--r--plugins/place/src/place.cpp4
-rw-r--r--plugins/regex/src/regex.cpp2
-rw-r--r--plugins/resize/src/resize.cpp18
-rw-r--r--plugins/resize/src/resize.h6
-rw-r--r--plugins/scale/include/scale/scale.h6
-rw-r--r--plugins/scale/src/privates.h5
-rw-r--r--plugins/scale/src/scale.cpp24
-rw-r--r--plugins/switcher/src/switcher.cpp8
-rw-r--r--plugins/switcher/src/switcher.h1
-rw-r--r--plugins/water/src/water.cpp4
-rw-r--r--plugins/water/src/water.h3
-rw-r--r--plugins/zoom/src/zoom.h2
-rw-r--r--src/action.cpp6
-rw-r--r--src/event.cpp8
-rw-r--r--src/main.cpp5
-rw-r--r--src/match.cpp12
-rw-r--r--src/option.cpp13
-rw-r--r--src/plugin.cpp10
-rw-r--r--src/pluginclasses.cpp2
-rw-r--r--src/privateaction.h2
-rw-r--r--src/privatematch.h2
-rw-r--r--src/privateoption.h2
-rw-r--r--src/privateregion.h2
-rw-r--r--src/privatescreen.h17
-rw-r--r--src/privatewindow.h2
-rw-r--r--src/region.cpp5
-rw-r--r--src/screen.cpp88
-rw-r--r--src/string.cpp7
-rw-r--r--src/timer.cpp2
-rw-r--r--src/window.cpp29
78 files changed, 579 insertions, 596 deletions
diff --git a/gtk/window-decorator/gtk-window-decorator.c b/gtk/window-decorator/gtk-window-decorator.c
index a85932a..213ab49 100644
--- a/gtk/window-decorator/gtk-window-decorator.c
+++ b/gtk/window-decorator/gtk-window-decorator.c
@@ -2924,7 +2924,7 @@ meta_button_present (MetaButtonLayout *button_layout,
MetaButtonFunction function)
{
int i;
-
+
for (i = 0; i < MAX_BUTTONS_PER_CORNER; i++)
if (button_layout->left_buttons[i] == function)
return TRUE;
@@ -3957,7 +3957,7 @@ window_actions_changed (WnckWindow *win)
if (!update_window_decoration_size (win))
queue_decor_draw (d);
- update_event_windows (win);
+ update_event_windows (win);
}
}
@@ -5941,7 +5941,7 @@ meta_update_button_layout (const char *value)
{
f = meta_button_function_from_string (buttons[b]);
#ifdef HAVE_METACITY_2_23_2
- if (i > 0 && strcmp("spacer", buttons[b]) == 0)
+ if (i > 0 && strcmp ("spacer", buttons[b]) == 0)
{
new_layout.left_buttons_has_spacer[i - 1] = TRUE;
f = meta_button_opposite_function (f);
@@ -5988,7 +5988,7 @@ meta_update_button_layout (const char *value)
{
f = meta_button_function_from_string (buttons[b]);
#ifdef HAVE_METACITY_2_23_2
- if (i > 0 && strcmp("spacer", buttons[b]) == 0)
+ if (i > 0 && strcmp ("spacer", buttons[b]) == 0)
{
new_layout.right_buttons_has_spacer[i - 1] = TRUE;
f = meta_button_opposite_function (f);
@@ -6018,7 +6018,7 @@ meta_update_button_layout (const char *value)
b++;
}
new_layout.right_buttons[i] = META_BUTTON_FUNCTION_LAST;
-
+
g_strfreev (buttons);
}
}
diff --git a/include/core/action.h b/include/core/action.h
index 9e16df1..e24a6d1 100644
--- a/include/core/action.h
+++ b/include/core/action.h
@@ -134,7 +134,7 @@ class CompAction {
KeyBinding & key ();
void setKey (const KeyBinding &key);
-
+
ButtonBinding & button ();
void setButton (const ButtonBinding &button);
diff --git a/include/core/match.h b/include/core/match.h
index 4afbec7..de26b5a 100644
--- a/include/core/match.h
+++ b/include/core/match.h
@@ -42,7 +42,7 @@ class CompMatch {
virtual ~Expression () {};
virtual bool evaluate (CompWindow *window) = 0;
};
-
+
public:
CompMatch ();
CompMatch (const CompString);
diff --git a/include/core/option.h b/include/core/option.h
index c9e26fe..2d9ba5f 100644
--- a/include/core/option.h
+++ b/include/core/option.h
@@ -159,7 +159,7 @@ class CompOption {
~CompOption ();
void setName (CompString name, Type type);
-
+
CompString name ();
Type type ();
diff --git a/include/core/output.h b/include/core/output.h
index 0fba119..0d12d54 100644
--- a/include/core/output.h
+++ b/include/core/output.h
@@ -37,7 +37,7 @@ class CompOutput : public CompRect {
CompOutput ();
CompString name () const;
-
+
unsigned int id () const;
const CompRect& workArea () const;
diff --git a/include/core/plugin.h b/include/core/plugin.h
index cb15018..8c0581d 100644
--- a/include/core/plugin.h
+++ b/include/core/plugin.h
@@ -44,7 +44,7 @@ extern CompScreen *screen;
if (!name##VTable) \
{ \
name##VTable = new classname (); \
- name##VTable->initVTable (TOSTRING(name), &name##VTable); \
+ name##VTable->initVTable (TOSTRING (name), &name##VTable);\
return name##VTable; \
} \
else \
@@ -82,7 +82,7 @@ class CompPlugin {
void initVTable (CompString name,
CompPlugin::VTable **self = NULL);
-
+
const CompString name () const;
virtual bool init () = 0;
@@ -96,7 +96,7 @@ class CompPlugin {
virtual bool initWindow (CompWindow *w);
virtual void finiWindow (CompWindow *w);
-
+
virtual CompOption::Vector & getOptions ();
virtual bool setOption (const CompString &name,
@@ -134,7 +134,7 @@ class CompPlugin {
struct cmpStr
{
- bool operator() (const char *a, const char *b) const
+ bool operator () (const char *a, const char *b) const
{
return strcmp (a, b) < 0;
}
@@ -221,7 +221,7 @@ void CompPlugin::VTableForScreenAndWindow<T,T2>::finiWindow (CompWindow *w)
template <typename T, typename T2>
CompOption::Vector & CompPlugin::VTableForScreenAndWindow<T,T2>::getOptions ()
{
- CompOption::Class *oc = dynamic_cast<CompOption::Class *>(T::get (screen));
+ CompOption::Class *oc = dynamic_cast<CompOption::Class *> (T::get (screen));
if (!oc)
return noOptions;
return oc->getOptions ();
@@ -231,7 +231,7 @@ template <typename T, typename T2>
bool CompPlugin::VTableForScreenAndWindow<T,T2>::setOption (const CompString &name,
CompOption::Value &value)
{
- CompOption::Class *oc = dynamic_cast<CompOption::Class *>(T::get (screen));
+ CompOption::Class *oc = dynamic_cast<CompOption::Class *> (T::get (screen));
if (!oc)
return false;
return oc->setOption (name, value);
@@ -259,7 +259,7 @@ void CompPlugin::VTableForScreen<T>::finiScreen (CompScreen *s)
template <typename T>
CompOption::Vector & CompPlugin::VTableForScreen<T>::getOptions ()
{
- CompOption::Class *oc = dynamic_cast<CompOption::Class *>(T::get (screen));
+ CompOption::Class *oc = dynamic_cast<CompOption::Class *> (T::get (screen));
if (!oc)
return noOptions;
return oc->getOptions ();
@@ -269,7 +269,7 @@ template <typename T>
bool CompPlugin::VTableForScreen<T>::setOption (const CompString &name,
CompOption::Value &value)
{
- CompOption::Class *oc = dynamic_cast<CompOption::Class *>(T::get (screen));
+ CompOption::Class *oc = dynamic_cast<CompOption::Class *> (T::get (screen));
if (!oc)
return false;
return oc->setOption (name, value);
diff --git a/include/core/pluginclasses.h b/include/core/pluginclasses.h
index 0ba2502..351ac7c 100644
--- a/include/core/pluginclasses.h
+++ b/include/core/pluginclasses.h
@@ -32,10 +32,10 @@
class PluginClassIndex {
public:
- PluginClassIndex () : index(-1), refCount (0),
+ PluginClassIndex () : index (-1), refCount (0),
initiated (false), failed (false),
pcFailed (false), pcIndex (0) {}
-
+
int index;
int refCount;
bool initiated;
diff --git a/include/core/pluginclasshandler.h b/include/core/pluginclasshandler.h
index a833e53..2b0e809 100644
--- a/include/core/pluginclasshandler.h
+++ b/include/core/pluginclasshandler.h
@@ -43,7 +43,7 @@ class PluginClassHandler {
void setFailed () { mFailed = true; };
bool loadFailed () { return mFailed; };
-
+
Tb * get () { return mBase; };
static Tp * get (Tb *);
diff --git a/include/core/region.h b/include/core/region.h
index fe6df71..30654d8 100644
--- a/include/core/region.h
+++ b/include/core/region.h
@@ -75,7 +75,7 @@ class CompRegion {
CompRegion united (const CompRegion &) const;
CompRegion united (const CompRect &) const;
CompRegion xored (const CompRegion &) const;
-
+
bool operator== (const CompRegion &) const;
bool operator!= (const CompRegion &) const;
const CompRegion operator& (const CompRegion &) const;
@@ -91,12 +91,12 @@ class CompRegion {
CompRegion & operator-= (const CompRegion &);
CompRegion & operator-= (const CompRect &);
CompRegion & operator= (const CompRegion &);
-
+
const CompRegion operator^ (const CompRegion &) const;
CompRegion & operator^= (const CompRegion &);
const CompRegion operator| (const CompRegion &) const;
CompRegion & operator|= (const CompRegion &);
-
+
private:
PrivateRegion *priv;
};
diff --git a/include/core/screen.h b/include/core/screen.h
index a076b42..1f4e064 100644
--- a/include/core/screen.h
+++ b/include/core/screen.h
@@ -137,7 +137,7 @@ class CompScreen :
~CompScreen ();
bool init (const char *name);
-
+
void eventLoop ();
CompFileWatchHandle addFileWatch (const char *path,
@@ -145,21 +145,21 @@ class CompScreen :
FileWatchCallBack callBack);
void removeFileWatch (CompFileWatchHandle handle);
-
+
const CompFileWatchList& getFileWatches () const;
-
+
CompWatchFdHandle addWatchFd (int fd,
short int events,
FdWatchCallBack callBack);
-
+
void removeWatchFd (CompWatchFdHandle handle);
void storeValue (CompString key, CompPrivate value);
bool hasValue (CompString key);
CompPrivate getValue (CompString key);
void eraseValue (CompString key);
-
- Display * dpy();
+
+ Display * dpy ();
CompOption::Vector & getOptions ();
@@ -168,7 +168,7 @@ class CompScreen :
bool XRandr ();
int randrEvent ();
-
+
bool XShape ();
int shapeEvent ();
@@ -176,9 +176,9 @@ class CompScreen :
int syncEvent ();
SnDisplay * snDisplay ();
-
+
Window activeWindow ();
-
+
Window autoRaiseWindow ();
const char * displayString ();
@@ -217,7 +217,6 @@ class CompScreen :
Atom property,
unsigned short value);
-
Window root ();
int xkbEvent ();
@@ -336,7 +335,7 @@ class CompScreen :
CompSize &, int &, void *&);
WRAPABLE_HND (9, ScreenInterface, bool, imageToFile, CompString &,
CompString &, CompSize &, int, void *);
-
+
WRAPABLE_HND (10, ScreenInterface, CompMatch::Expression *,
matchInitExp, const CompString&);
WRAPABLE_HND (11, ScreenInterface, void, matchExpHandlerChanged)
@@ -395,7 +394,7 @@ class CompScreen :
static bool raiseWin (CompAction *action,
CompAction::State state,
CompOption::Vector &options);
-
+
static bool lowerWin (CompAction *action,
CompAction::State state,
CompOption::Vector &options);
diff --git a/include/core/window.h b/include/core/window.h
index 689312b..211dbdf 100644
--- a/include/core/window.h
+++ b/include/core/window.h
@@ -190,7 +190,8 @@ struct CompStruts {
XRectangle bottom;
};
-class WindowInterface : public WrapableInterface<CompWindow, WindowInterface> {
+class WindowInterface : public WrapableInterface<CompWindow, WindowInterface>
+{
public:
virtual void getOutputExtents (CompWindowExtents& output);
@@ -208,7 +209,7 @@ class WindowInterface : public WrapableInterface<CompWindow, WindowInterface> {
virtual void resizeNotify (int dx, int dy, int dwidth, int dheight);
virtual void moveNotify (int dx, int dy, bool immediate);
virtual void windowNotify (CompWindowNotify n);
-
+
virtual void grabNotify (int x, int y,
unsigned int state, unsigned int mask);
virtual void ungrabNotify ();
@@ -222,11 +223,10 @@ class CompWindow :
public WrapableHandler<WindowInterface, 13>,
public PluginClassStorage
{
-
public:
- class Geometry : public CompRect {
-
+ class Geometry : public CompRect
+ {
public:
Geometry ();
Geometry (int, int, unsigned int, unsigned int, unsigned int);
@@ -240,18 +240,14 @@ class CompWindow :
unsigned int mBorder;
};
-
-
typedef boost::function<void (CompWindow *)> ForEach;
-
typedef std::map<Window, CompWindow *> Map;
-
+
public:
CompWindow *next;
CompWindow *prev;
public:
-
CompWindow (Window id,
Window aboveId);
~CompWindow ();
@@ -266,7 +262,7 @@ class CompWindow :
unsigned int width () const;
unsigned int height () const;
CompSize size () const;
-
+
Geometry & serverGeometry () const;
int serverX () const;
@@ -289,13 +285,13 @@ class CompWindow :
void setWindowFrameExtents (CompWindowExtents *input);
unsigned int & wmType ();
-
+
unsigned int type ();
-
+
unsigned int & state ();
-
+
unsigned int actions ();
-
+
unsigned int & protocols ();
void close (Time serverTime);
@@ -347,7 +343,7 @@ class CompWindow :
void unmap ();
bool resize (XWindowAttributes);
-
+
bool resize (Geometry);
bool resize (int x, int y, unsigned int width, unsigned int height,
@@ -451,7 +447,7 @@ class CompWindow :
int height,
int *newWidth,
int *newHeight);
-
+
static unsigned int constrainWindowState (unsigned int state,
unsigned int actions);
@@ -485,7 +481,7 @@ class CompWindow :
friend class PrivateWindow;
friend class CompScreen;
friend class PrivateScreen;
-
+
private:
PrivateWindow *priv;
};
diff --git a/include/core/wrapsystem.h b/include/core/wrapsystem.h
index 3c3b324..c71c599 100644
--- a/include/core/wrapsystem.h
+++ b/include/core/wrapsystem.h
@@ -29,14 +29,14 @@
#include <stdlib.h>
#include <vector>
-#define WRAPABLE_DEF(func, ...) \
-{ \
+#define WRAPABLE_DEF(func, ...) \
+{ \
mHandler-> func ## SetEnabled (this, false); \
- return mHandler-> func (__VA_ARGS__); \
+ return mHandler-> func (__VA_ARGS__); \
}
-#define WRAPABLE_HND(num,itype,rtype, func, ...) \
- rtype func (__VA_ARGS__); \
+#define WRAPABLE_HND(num,itype,rtype, func, ...) \
+ rtype func (__VA_ARGS__); \
void func ## SetEnabled (itype *obj, bool enabled) \
{ \
functionSetEnabled (obj, num, enabled); \
@@ -50,41 +50,41 @@
mCurrFunction[num] = index; \
}
-#define WRAPABLE_HND_FUNC(num, func, ...) \
-{ \
- unsigned int curr = mCurrFunction[num]; \
- while (mCurrFunction[num] < mInterface.size() && \
- !mInterface[mCurrFunction[num]].enabled[num]) \
+#define WRAPABLE_HND_FUNC(num, func, ...) \
+{ \
+ unsigned int curr = mCurrFunction[num]; \
+ while (mCurrFunction[num] < mInterface.size () && \
+ !mInterface[mCurrFunction[num]].enabled[num]) \
mCurrFunction[num]++; \
- if (mCurrFunction[num] < mInterface.size()) \
- { \
- mInterface[mCurrFunction[num]++].obj-> func (__VA_ARGS__); \
- mCurrFunction[num] = curr; \
- return; \
- } \
- mCurrFunction[num] = curr; \
+ if (mCurrFunction[num] < mInterface.size ()) \
+ { \
+ mInterface[mCurrFunction[num]++].obj-> func (__VA_ARGS__); \
+ mCurrFunction[num] = curr; \
+ return; \
+ } \
+ mCurrFunction[num] = curr; \
}
-#define WRAPABLE_HND_FUNC_RETURN(num, rtype, func, ...) \
-{ \
- unsigned int curr = mCurrFunction[num]; \
- rtype rv; \
- while (mCurrFunction[num] < mInterface.size() && \
- !mInterface[mCurrFunction[num]].enabled[num]) \
- mCurrFunction[num]++; \
- if (mCurrFunction[num] < mInterface.size()) \
- { \
+#define WRAPABLE_HND_FUNC_RETURN(num, rtype, func, ...) \
+{ \
+ unsigned int curr = mCurrFunction[num]; \
+ rtype rv; \
+ while (mCurrFunction[num] < mInterface.size () && \
+ !mInterface[mCurrFunction[num]].enabled[num]) \
+ mCurrFunction[num]++; \
+ if (mCurrFunction[num] < mInterface.size ()) \
+ { \
rv = mInterface[mCurrFunction[num]++].obj-> func (__VA_ARGS__); \
- mCurrFunction[num] = curr; \
- return rv; \
- } \
- mCurrFunction[num] = curr; \
+ mCurrFunction[num] = curr; \
+ return rv; \
+ } \
+ mCurrFunction[num] = curr; \
}
template <typename T, typename T2>
class WrapableInterface {
protected:
- WrapableInterface () : mHandler(0) {};
+ WrapableInterface () : mHandler (0) {};
virtual ~WrapableInterface ()
{
if (mHandler)
@@ -103,17 +103,18 @@ class WrapableInterface {
};
template <typename T, unsigned int N>
-class WrapableHandler : public T {
-
+class WrapableHandler : public T
+{
public:
void registerWrap (T *, bool);
void unregisterWrap (T *);
- unsigned int numWrapClients () { return mInterface.size (); };
-
+ unsigned int numWrapClients () { return mInterface.size (); };
+
protected:
- class Interface {
+ class Interface
+ {
public:
T *obj;
bool *enabled;
@@ -131,7 +132,7 @@ class WrapableHandler : public T {
~WrapableHandler ()
{
typename std::vector<Interface>::iterator it;
- for (it = mInterface.begin(); it != mInterface.end(); it++)
+ for (it = mInterface.begin (); it != mInterface.end (); it++)
delete [] (*it).enabled;
mInterface.clear ();
delete [] mCurrFunction;
@@ -153,14 +154,14 @@ void WrapableHandler<T,N>::registerWrap (T *obj, bool enabled)
return;
for (unsigned int i = 0; i < N; i++)
in.enabled[i] = enabled;
- mInterface.insert (mInterface.begin(), in);
+ mInterface.insert (mInterface.begin (), in);
};
template <typename T, unsigned int N>
void WrapableHandler<T,N>::unregisterWrap (T *obj)
{
typename std::vector<Interface>::iterator it;
- for (it = mInterface.begin(); it != mInterface.end(); it++)
+ for (it = mInterface.begin (); it != mInterface.end (); it++)
if ((*it).obj == obj)
{
delete [] (*it).enabled;
@@ -173,7 +174,7 @@ template <typename T, unsigned int N>
void WrapableHandler<T,N>::functionSetEnabled (T *obj, unsigned int num,
bool enabled)
{
- for (unsigned int i = 0; i < mInterface.size(); i++)
+ for (unsigned int i = 0; i < mInterface.size (); i++)
if (mInterface[i].obj == obj)
{
mInterface[i].enabled[num] = enabled;
diff --git a/kde/window-decorator-kde4/decorator.cpp b/kde/window-decorator-kde4/decorator.cpp
index ee533a4..24ae4aa 100644
--- a/kde/window-decorator-kde4/decorator.cpp
+++ b/kde/window-decorator-kde4/decorator.cpp
@@ -86,8 +86,10 @@ struct _cursor cursors[3][3] = {
KWD::PluginManager::PluginManager (KSharedConfigPtr config):
KWD::KDecorationPlugins (config)
{
- defaultPlugin = (QPixmap::defaultDepth() > 8) ?
- "kwin3_oxygen" : "kwin3_plastik";
+ if (QPixmap::defaultDepth () > 8)
+ defaultPlugin = "kwin3_oxygen";
+ else
+ defaultPlugin = "kwin3_plastik";
}
#ifdef QT_45
@@ -105,13 +107,14 @@ KWD::Decorator::Decorator (Display* display,
{
XSetWindowAttributes attr;
int i, j;
- QDBusConnection dbus = QDBusConnection::sessionBus();
+ QDBusConnection dbus = QDBusConnection::sessionBus ();
- mRootInfo = new NETRootInfo (QX11Info::display(), 0);
+ mRootInfo = new NETRootInfo (QX11Info::display (), 0);
mActiveId = 0;
- KConfigGroup cfg (KSharedConfig::openConfig("plasmarc"), QString("Theme"));
+ KConfigGroup cfg (KSharedConfig::openConfig ("plasmarc"),
+ QString ("Theme"));
Plasma::Theme::defaultTheme ()->setThemeName (cfg.readEntry ("name"));
Atoms::init ();
@@ -144,7 +147,7 @@ KWD::Decorator::Decorator (Display* display,
mConfig = new KConfig ("kwinrc");
mOptions = new KWD::Options (mConfig);
- mPlugins = new PluginManager (KSharedConfig::openConfig("kwinrc"));
+ mPlugins = new PluginManager (KSharedConfig::openConfig ("kwinrc"));
mShadowOptions.shadow_radius = SHADOW_RADIUS;
mShadowOptions.shadow_opacity = SHADOW_OPACITY;
@@ -160,23 +163,25 @@ KWD::Decorator::Decorator (Display* display,
{
if (cursors[i][j].shape != XC_left_ptr)
cursors[i][j].cursor =
- XCreateFontCursor (QX11Info::display(), cursors[i][j].shape);
+ XCreateFontCursor (QX11Info::display (),
+ cursors[i][j].shape);
}
}
attr.override_redirect = True;
- mCompositeWindow = XCreateWindow (QX11Info::display(), QX11Info::appRootWindow(),
+ mCompositeWindow = XCreateWindow (QX11Info::display (),
+ QX11Info::appRootWindow (),
-ROOT_OFF_X, -ROOT_OFF_Y, 1, 1, 0,
CopyFromParent,
CopyFromParent,
CopyFromParent,
CWOverrideRedirect, &attr);
- XCompositeRedirectSubwindows (QX11Info::display(), mCompositeWindow,
+ XCompositeRedirectSubwindows (QX11Info::display (), mCompositeWindow,
CompositeRedirectManual);
- XMapWindow (QX11Info::display(), mCompositeWindow);
+ XMapWindow (QX11Info::display (), mCompositeWindow);
}
KWD::Decorator::~Decorator (void)
@@ -195,7 +200,7 @@ KWD::Decorator::~Decorator (void)
if (mSwitcher)
delete mSwitcher;
- XDestroyWindow (QX11Info::display(), mCompositeWindow);
+ XDestroyWindow (QX11Info::display (), mCompositeWindow);
delete mOptions;
delete mPlugins;
@@ -223,9 +228,11 @@ KWD::Decorator::enableDecorations (Time timestamp,
updateShadow ();
- mDecorNormal = new KWD::Window (mCompositeWindow, QX11Info::appRootWindow(),
+ mDecorNormal = new KWD::Window (mCompositeWindow,
+ QX11Info::appRootWindow (),
0, Window::Default);
- mDecorActive = new KWD::Window (mCompositeWindow, QX11Info::appRootWindow(),
+ mDecorActive = new KWD::Window (mCompositeWindow,
+ QX11Info::appRootWindow (),
0, Window::DefaultActive);
mActiveId = KWindowSystem::activeWindow ();
@@ -249,7 +256,7 @@ KWD::Decorator::enableDecorations (Time timestamp,
SLOT (plasmaThemeChanged ()));
// select for client messages
- XSelectInput (QX11Info::display(), QX11Info::appRootWindow(),
+ XSelectInput (QX11Info::display (), QX11Info::appRootWindow (),
StructureNotifyMask | PropertyChangeMask);
return true;
@@ -262,7 +269,7 @@ KWD::Decorator::updateDefaultShadow (KWD::Window *w)
if (mDefaultShadow)
{
- decor_shadow_destroy (QX11Info::display(), mDefaultShadow);
+ decor_shadow_destroy (QX11Info::display (), mDefaultShadow);
mDefaultShadow = NULL;
}
@@ -360,7 +367,7 @@ KWD::Decorator::changeShadowOptions (decor_shadow_options_t *opt)
void
KWD::Decorator::updateShadow (void)
{
- Display *xdisplay = QX11Info::display();
+ Display *xdisplay = QX11Info::display ();
Screen *xscreen;
decor_context_t context;
@@ -405,7 +412,7 @@ KWD::Decorator::updateShadow (void)
0, 0, quads, nQuad);
KWD::trapXError ();
- XChangeProperty (QX11Info::display(), QX11Info::appRootWindow(),
+ XChangeProperty (QX11Info::display (), QX11Info::appRootWindow (),
Atoms::netWindowDecorBare,
XA_INTEGER,
32, PropModeReplace, (unsigned char *) data,
@@ -479,10 +486,11 @@ KWD::Decorator::x11EventFilter (XEvent *xevent)
}
} break;
case SelectionRequest:
- decor_handle_selection_request (QX11Info::display(), xevent, mDmSnTimestamp);
+ decor_handle_selection_request (QX11Info::display (),
+ xevent, mDmSnTimestamp);
break;
case SelectionClear:
- status = decor_handle_selection_clear (QX11Info::display(),
+ status = decor_handle_selection_clear (QX11Info::display (),
xevent, 0);
if (status == DECOR_SELECTION_GIVE_UP)
KApplication::exit (0);
@@ -545,12 +553,12 @@ KWD::Decorator::x11EventFilter (XEvent *xevent)
if (client->activeChild ())
QApplication::sendEvent (client->activeChild (), &qe);
- XUndefineCursor (QX11Info::display(), client->frameId ());
+ XUndefineCursor (QX11Info::display (), client->frameId ());
}
} break;
case MotionNotify:
{
- XMotionEvent *xme = reinterpret_cast < XMotionEvent * >(xevent);
+ XMotionEvent *xme = reinterpret_cast <XMotionEvent *> (xevent);
QWidget *child;
if (!mFrames.contains (xme->window))
@@ -591,9 +599,9 @@ KWD::Decorator::x11EventFilter (XEvent *xevent)
case ButtonPress:
case ButtonRelease:
{
- XButtonEvent *xbe = reinterpret_cast <XButtonEvent *>(xevent);
+ XButtonEvent *xbe = reinterpret_cast <XButtonEvent *> (xevent);
QWidget *child;
-
+
if (!mFrames.contains (xbe->window))
break;
@@ -672,7 +680,7 @@ KWD::Decorator::x11EventFilter (XEvent *xevent)
if (xevent->type == mDamageEvent + XDamageNotify)
{
XDamageNotifyEvent *xde =
- reinterpret_cast <XDamageNotifyEvent *>(xevent);
+ reinterpret_cast <XDamageNotifyEvent *> (xevent);
if (mWindows.contains (xde->drawable))
client = mWindows[xde->drawable];
@@ -743,13 +751,13 @@ KWD::Decorator::handleWindowAdded (WId id)
QWidgetList widgets;
/* avoid adding any of our own top level windows */
- foreach (QWidget *widget, QApplication::topLevelWidgets()) {
- if (widget->winId() == id)
+ foreach (QWidget *widget, QApplication::topLevelWidgets ()) {
+ if (widget->winId () == id)
return;
}
KWD::trapXError ();
- XGetGeometry (QX11Info::display(), id, &root, &x, &y, &width, &height,
+ XGetGeometry (QX11Info::display (), id, &root, &x, &y, &width, &height,
&border, &depth);
if (KWD::popXError ())
return;
@@ -800,14 +808,15 @@ KWD::Decorator::handleWindowAdded (WId id)
}
KWD::trapXError ();
- XSelectInput (QX11Info::display(), id, StructureNotifyMask | PropertyChangeMask);
+ XSelectInput (QX11Info::display (), id,
+ StructureNotifyMask | PropertyChangeMask);
KWD::popXError ();
if (frame)
{
XWindowAttributes attr;
KWD::trapXError ();
- XGetWindowAttributes (QX11Info::display(), frame, &attr);
+ XGetWindowAttributes (QX11Info::display (), frame, &attr);
if (KWD::popXError ())
frame = None;
}
@@ -925,7 +934,6 @@ KWD::Decorator::handleWindowChanged (WId id,
client->updateIcons ();
if (properties[0] & NET::WMGeometry)
client->updateWindowGeometry ();
-
}
void
@@ -948,16 +956,16 @@ KWD::Decorator::sendClientMessage (WId eventWid,
ev.xclient.format = 32;
ev.xclient.data.l[0] = value;
- ev.xclient.data.l[1] = QX11Info::appTime();
+ ev.xclient.data.l[1] = QX11Info::appTime ();
ev.xclient.data.l[2] = data1;
ev.xclient.data.l[3] = data2;
ev.xclient.data.l[4] = data3;
- if (eventWid == QX11Info::appRootWindow())
+ if (eventWid == QX11Info::appRootWindow ())
mask = SubstructureRedirectMask | SubstructureNotifyMask;
KWD::trapXError ();
- XSendEvent (QX11Info::display(), eventWid, false, mask, &ev);
+ XSendEvent (QX11Info::display (), eventWid, false, mask, &ev);
KWD::popXError ();
}
@@ -1008,7 +1016,7 @@ KWD::Decorator::shadowColorChanged (QString value)
int c[4];
- if (sscanf (value.toAscii().data(), "#%2x%2x%2x%2x",
+ if (sscanf (value.toAscii ().data (), "#%2x%2x%2x%2x",
&c[0], &c[1], &c[2], &c[3]) == 4)
{
opt.shadow_color[0] = c[0] << 8 | c[0];
@@ -1024,7 +1032,7 @@ KWD::Decorator::plasmaThemeChanged ()
{
if (mSwitcher)
{
- WId win = mSwitcher->xid();
+ WId win = mSwitcher->xid ();
delete mSwitcher;
mSwitcher = new Switcher (mCompositeWindow, win);
}
diff --git a/kde/window-decorator-kde4/decorator.h b/kde/window-decorator-kde4/decorator.h
index 0ab3522..bd41b6a 100644
--- a/kde/window-decorator-kde4/decorator.h
+++ b/kde/window-decorator-kde4/decorator.h
@@ -139,7 +139,7 @@ class Decorator:public KApplication {
public slots:
void reconfigure (void);
-
+
private:
WId fetchFrame (WId window);
void updateShadow (void);
diff --git a/kde/window-decorator-kde4/kdecoration_plugins.h b/kde/window-decorator-kde4/kdecoration_plugins.h
index 14a1454..d609796 100644
--- a/kde/window-decorator-kde4/kdecoration_plugins.h
+++ b/kde/window-decorator-kde4/kdecoration_plugins.h
@@ -36,7 +36,7 @@ DEALINGS IN THE SOFTWARE.
//
// This header file is internal. I mean it.
-//
+//
#include <QtGui/QWidget>
@@ -84,7 +84,7 @@ class KDecorationPlugins
*/
}
-
+
/** @} */
#endif
diff --git a/kde/window-decorator-kde4/main.cpp b/kde/window-decorator-kde4/main.cpp
index 3a6581d..91c96ee 100644
--- a/kde/window-decorator-kde4/main.cpp
+++ b/kde/window-decorator-kde4/main.cpp
@@ -99,15 +99,15 @@ main (int argc, char **argv)
}
// Disable window less child widgets
- QApplication::setAttribute(Qt::AA_NativeWindows, true);
+ QApplication::setAttribute (Qt::AA_NativeWindows, true);
#ifdef QT_45
app = new KWD::Decorator ();
#else
- dpy = XOpenDisplay(0); // open default display
+ dpy = XOpenDisplay (0); // open default display
screen = DefaultScreen (dpy);
if (!dpy) {
- kError() << "Cannot connect to the X server" << endl;
+ kError () << "Cannot connect to the X server" << endl;
return 0;
}
@@ -136,23 +136,23 @@ main (int argc, char **argv)
}
}
- app = new KWD::Decorator (dpy, visual ? Qt::HANDLE(visual) : 0,
- colormap ? Qt::HANDLE(colormap) : 0);
+ app = new KWD::Decorator (dpy, visual ? Qt::HANDLE (visual) : 0,
+ colormap ? Qt::HANDLE (colormap) : 0);
#endif
if (args->isSet ("sm-disable"))
app->disableSessionManagement ();
- if (!XDamageQueryExtension (QX11Info::display(), &event, &error))
+ if (!XDamageQueryExtension (QX11Info::display (), &event, &error))
{
fprintf (stderr,
"%s: Damage extension is missing on display \"%s\"\n",
- argv[0], DisplayString (QX11Info::display()));
+ argv[0], DisplayString (QX11Info::display ()));
return 1;
}
- status = decor_acquire_dm_session (QX11Info::display(),
+ status = decor_acquire_dm_session (QX11Info::display (),
QX11Info::appScreen (),
"kwd", args->isSet ("replace"),
&timestamp);
@@ -164,7 +164,7 @@ main (int argc, char **argv)
"%s: Could not acquire decoration manager "
"selection on screen %d display \"%s\"\n",
argv[0], QX11Info::appScreen (),
- DisplayString (QX11Info::display()));
+ DisplayString (QX11Info::display ()));
}
else if (status == DECOR_ACQUIRE_STATUS_OTHER_DM_RUNNING)
{
@@ -174,13 +174,13 @@ main (int argc, char **argv)
"--replace option to replace the current "
"decoration manager.\n",
argv[0], QX11Info::appScreen (),
- DisplayString (QX11Info::display()));
+ DisplayString (QX11Info::display ()));
}
return 1;
}
- decor_set_dm_check_hint (QX11Info::display(), QX11Info::appScreen (),
+ decor_set_dm_check_hint (QX11Info::display (), QX11Info::appScreen (),
WINDOW_DECORATION_TYPE_PIXMAP |
WINDOW_DECORATION_TYPE_WINDOW);
@@ -188,7 +188,7 @@ main (int argc, char **argv)
{
fprintf (stderr,
"%s: Could not enable decorations on display \"%s\"\n",
- argv[0], DisplayString (QX11Info::display()));
+ argv[0], DisplayString (QX11Info::display ()));
return 1;
}
@@ -196,7 +196,7 @@ main (int argc, char **argv)
if (QX11Info::appScreen () == 0)
appname = "org.kde.kwin";
else
- appname.sprintf("org.kde.kwin-screen-%d", QX11Info::appScreen ());
+ appname.sprintf ("org.kde.kwin-screen-%d", QX11Info::appScreen ());
QDBusConnection::sessionBus ().interface ()->registerService
(appname, QDBusConnectionInterface::DontQueueService);
diff --git a/kde/window-decorator-kde4/options.cpp b/kde/window-decorator-kde4/options.cpp
index c91c014..d0e1879 100644
--- a/kde/window-decorator-kde4/options.cpp
+++ b/kde/window-decorator-kde4/options.cpp
@@ -36,7 +36,7 @@ unsigned long
KWD::Options::updateSettings (void)
{
unsigned long changed = 0;
- KConfigGroup config = mConfig->group("Windows");
+ KConfigGroup config = mConfig->group ("Windows");
changed |= KDecorationOptions::updateSettings (mConfig);
@@ -54,7 +54,7 @@ KWD::Options::updateSettings (void)
"Maximize (horizontal only)"),
true));
- config = mConfig->group("MouseBindings");
+ config = mConfig->group ("MouseBindings");
CmdActiveTitlebar1 =
mouseCommand (config.readEntry ("CommandActiveTitlebar1",
diff --git a/kde/window-decorator-kde4/switcher.cpp b/kde/window-decorator-kde4/switcher.cpp
index 27fc810..f9ec4b3 100644
--- a/kde/window-decorator-kde4/switcher.cpp
+++ b/kde/window-decorator-kde4/switcher.cpp
@@ -49,15 +49,16 @@ KWD::Switcher::Switcher (WId, WId id):
QColor color;
color = Plasma::Theme::defaultTheme ()->color (Plasma::Theme::TextColor);
- mBackground = new Plasma::FrameSvg();
+ mBackground = new Plasma::FrameSvg ();
mBackground->setImagePath ("dialogs/background");
- mBackground->setEnabledBorders(Plasma::FrameSvg::AllBorders);
+ mBackground->setEnabledBorders (Plasma::FrameSvg::AllBorders);
- mBorder.left = mBackground->marginSize(Plasma::LeftMargin);
- mBorder.right = mBackground->marginSize(Plasma::RightMargin);
- mBorder.top = mBackground->marginSize(Plasma::TopMargin);
- mBorder.bottom = mBackground->marginSize(Plasma::BottomMargin) +
- Plasma::Theme::defaultTheme ()->fontMetrics ().height () + 10;
+ mBorder.left = mBackground->marginSize (Plasma::LeftMargin);
+ mBorder.right = mBackground->marginSize (Plasma::RightMargin);
+ mBorder.top = mBackground->marginSize (Plasma::TopMargin);
+ mBorder.bottom = mBackground->marginSize (Plasma::BottomMargin) +
+ Plasma::Theme::defaultTheme ()->fontMetrics ().height () +
+ 10;
mContext.extents.left = mBorder.left;
mContext.extents.right = mBorder.right;
@@ -128,7 +129,7 @@ KWD::Switcher::updateGeometry ()
mPixmap = QPixmap::fromX11Pixmap (mX11Pixmap, QPixmap::ExplicitlyShared);
mBackgroundPixmap = QPixmap::fromX11Pixmap (mX11BackgroundPixmap,
- QPixmap::ExplicitlyShared);
+ QPixmap::ExplicitlyShared);
#else
mPixmap = QPixmap (width + mBorder.left + mBorder.right,
height + mBorder.top + mBorder.bottom);
@@ -205,7 +206,7 @@ KWD::Switcher::update ()
fm.height ()));
p.setFont (font);
- p.setPen (Plasma::Theme::defaultTheme ()->color(Plasma::Theme::TextColor));
+ p.setPen (Plasma::Theme::defaultTheme ()->color (Plasma::Theme::TextColor));
p.drawText ((mPixmap.width () - fm.width (name)) / 2,
mBorder.top + mGeometry.height () + 5 + fm.ascent (), name);
@@ -240,7 +241,7 @@ KWD::Switcher::updateWindowProperties ()
quads, nQuad);
#endif
KWD::trapXError ();
- XChangeProperty (QX11Info::display(), mId, Atoms::netWindowDecor,
+ XChangeProperty (QX11Info::display (), mId, Atoms::netWindowDecor,
XA_INTEGER, 32, PropModeReplace, (unsigned char *) data,
BASE_PROP_SIZE + QUAD_PROP_SIZE * nQuad);
KWD::popXError ();
@@ -269,7 +270,7 @@ KWD::Switcher::updateBlurProperty (int topOffset,
if (blurType != BLUR_TYPE_NONE)
{
QRegion r;
-
+
topQRegion = QRegion (-mContext.extents.left, -mContext.extents.top,
w, mContext.extents.top);
topRegion = topQRegion.handle ();
diff --git a/kde/window-decorator-kde4/switcher.h b/kde/window-decorator-kde4/switcher.h
index f6305a0..cb0c350 100644
--- a/kde/window-decorator-kde4/switcher.h
+++ b/kde/window-decorator-kde4/switcher.h
@@ -61,7 +61,7 @@ class Switcher
int bottomOffset,
int leftOffset,
int rightOffset);
- void redrawPixmap ();
+ void redrawPixmap ();
private:
diff --git a/kde/window-decorator-kde4/utils.cpp b/kde/window-decorator-kde4/utils.cpp
index a9ef8e4..d9ed12e 100644
--- a/kde/window-decorator-kde4/utils.cpp
+++ b/kde/window-decorator-kde4/utils.cpp
@@ -78,7 +78,7 @@ KWD::trapXError (void)
int
KWD::popXError (void)
{
- XSync (QX11Info::display(), false);
+ XSync (QX11Info::display (), false);
XSetErrorHandler (oldErrorHandler);
return trappedErrorCode;
@@ -98,7 +98,7 @@ KWD::readXProperty (WId window,
int result;
KWD::trapXError ();
- result = XGetWindowProperty (QX11Info::display(), window, property, offset,
+ result = XGetWindowProperty (QX11Info::display (), window, property, offset,
length, false, type,
&actualType, &format, &nItems,
&bytesRemaining, &data);
@@ -111,7 +111,7 @@ KWD::readXProperty (WId window,
if (items)
*items = nItems;
- return reinterpret_cast <void *>(data);
+ return reinterpret_cast <void *> (data);
}
if (data)
@@ -133,7 +133,7 @@ KWD::readWindowProperty (long window,
if (data)
{
if (value)
- *value = *reinterpret_cast <int *>(data);
+ *value = *reinterpret_cast <int *> (data);
XFree (data);
@@ -154,7 +154,7 @@ KWD::readPropertyShort (WId id,
unsigned char *data;
KWD::trapXError ();
- result = XGetWindowProperty (QX11Info::display(), id, property,
+ result = XGetWindowProperty (QX11Info::display (), id, property,
0L, 1L, FALSE, XA_CARDINAL, &actual, &format,
&n, &left, &data);
if (KWD::popXError ())
@@ -177,7 +177,7 @@ KWD::readPropertyShort (WId id,
void
KWD::Atoms::init (void)
{
- Display *xdisplay = QX11Info::display();
+ Display *xdisplay = QX11Info::display ();
netInputFrameWindow =
XInternAtom (xdisplay, DECOR_INPUT_FRAME_ATOM_NAME, false);
diff --git a/kde/window-decorator-kde4/window.cpp b/kde/window-decorator-kde4/window.cpp
index 0d0c1d4..a5e8d8e 100644
--- a/kde/window-decorator-kde4/window.cpp
+++ b/kde/window-decorator-kde4/window.cpp
@@ -158,25 +158,25 @@ KWD::Window::Window (WId parentId,
KWD::Window::~Window (void)
{
if (mShadow)
- decor_shadow_destroy (QX11Info::display(), mShadow);
+ decor_shadow_destroy (QX11Info::display (), mShadow);
if (mPicture)
- XRenderFreePicture (QX11Info::display(), mPicture);
+ XRenderFreePicture (QX11Info::display (), mPicture);
if (mPixmap)
- XFreePixmap (QX11Info::display(), mPixmap);
+ XFreePixmap (QX11Info::display (), mPixmap);
if (mTexturePicture)
- XRenderFreePicture (QX11Info::display(), mTexturePicture);
+ XRenderFreePicture (QX11Info::display (), mTexturePicture);
if (mDecorationPicture)
- XRenderFreePicture (QX11Info::display(), mDecorationPicture);
+ XRenderFreePicture (QX11Info::display (), mDecorationPicture);
if (mTexturePixmap)
- XFreePixmap (QX11Info::display(), mTexturePixmap);
+ XFreePixmap (QX11Info::display (), mTexturePixmap);
if (mTexturePixmapBuffer)
- XFreePixmap (QX11Info::display(), mTexturePixmapBuffer);
+ XFreePixmap (QX11Info::display (), mTexturePixmapBuffer);
if (mDecor)
delete mDecor;
@@ -379,7 +379,7 @@ KWD::Window::showWindowMenu (const QPoint &pos)
{
QAction *action;
const int levels[] = { 100, 90, 75, 50, 25, 10 };
-
+
mPopup = new QMenu ();
mPopup->setFont (KGlobalSettings::menuFont ());
@@ -427,7 +427,6 @@ KWD::Window::showWindowMenu (const QPoint &pos)
connect (mOpacityMenu, SIGNAL (triggered (QAction*)),
SLOT (handleOpacityPopupActivated (QAction*)));
-
for (unsigned int i = 0;
i < sizeof (levels) / sizeof (levels[0]); ++i)
@@ -458,7 +457,7 @@ KWD::Window::showWindowMenu (const QPoint &pos)
mMoveOpAction->setData (KDecorationDefines::MoveOp);
mResizeOpAction = mPopup->addAction (i18n ("Re&size"));
- kaction = qobject_cast<KAction*> (mKeys.action("Window Resize"));
+ kaction = qobject_cast<KAction*> (mKeys.action ("Window Resize"));
if (kaction != 0)
mResizeOpAction->setShortcut (kaction->globalShortcut ().primary ());
mResizeOpAction->setData (KDecorationDefines::ResizeOp);
@@ -485,9 +484,9 @@ KWD::Window::showWindowMenu (const QPoint &pos)
mPopup->addSeparator ();
- mCloseOpAction = mPopup->addAction (i18n("&Close"));
+ mCloseOpAction = mPopup->addAction (i18n ("&Close"));
mCloseOpAction->setIcon (KIcon ("window-close" ));
- kaction = qobject_cast<KAction*> (mKeys.action("Window Close"));
+ kaction = qobject_cast<KAction*> (mKeys.action ("Window Close"));
if (kaction != 0)
mCloseOpAction->setShortcut (kaction->globalShortcut ().primary ());
mCloseOpAction->setData (KDecorationDefines::CloseOp);
@@ -497,7 +496,7 @@ KWD::Window::showWindowMenu (const QPoint &pos)
pnt += QPoint (mGeometry.x () - mBorder.left,
mGeometry.y () - mBorder.top);
-
+
mPopup->exec (pnt);
}
@@ -519,15 +518,15 @@ KWD::Window::processMousePressEvent (QMouseEvent *qme)
switch (qme->button ()) {
case Qt::LeftButton:
com = active ? Decorator::options ()->commandActiveTitlebar1 () :
- Decorator::options()->commandInactiveTitlebar1 ();
+ Decorator::options ()->commandInactiveTitlebar1 ();
break;
case Qt::MidButton:
com = active ? Decorator::options ()->commandActiveTitlebar2 () :
- Decorator::options()->commandInactiveTitlebar2 ();
+ Decorator::options ()->commandInactiveTitlebar2 ();
break;
case Qt::RightButton:
com = active ? Decorator::options ()->commandActiveTitlebar3 () :
- Decorator::options()->commandInactiveTitlebar3 ();
+ Decorator::options ()->commandInactiveTitlebar3 ();
default:
break;
}
@@ -733,7 +732,7 @@ KWD::Window::titlebarMouseWheelOperation (int delta)
{
Options::MouseCommand com;
- com = Decorator::options()->operationTitlebarMouseWheel (delta);
+ com = Decorator::options ()->operationTitlebarMouseWheel (delta);
performMouseCommand (com, 0);
}
@@ -783,7 +782,7 @@ KWD::Window::createDecoration (void)
if (mFrame)
{
KWD::trapXError ();
- XSelectInput (QX11Info::display(), mFrame,
+ XSelectInput (QX11Info::display (), mFrame,
StructureNotifyMask | PropertyChangeMask |
ButtonPressMask | ButtonReleaseMask | PointerMotionMask |
EnterWindowMask | LeaveWindowMask);
@@ -792,7 +791,7 @@ KWD::Window::createDecoration (void)
}
KWD::trapXError ();
- XSelectInput (QX11Info::display(), QWidget::winId(),
+ XSelectInput (QX11Info::display (), QWidget::winId (),
StructureNotifyMask | PropertyChangeMask);
KWD::popXError ();
@@ -1010,7 +1009,7 @@ cornersFromQRegion (QRegion *region,
void
KWD::Window::updateShadow (void)
{
- Display *xdisplay = QX11Info::display();
+ Display *xdisplay = QX11Info::display ();
Screen *xscreen;
XRenderPictFormat *xformat;
int leftCorner, rightCorner, topCorner, bottomCorner;
@@ -1022,7 +1021,7 @@ KWD::Window::updateShadow (void)
if (mShadow)
{
- decor_shadow_destroy (QX11Info::display(), mShadow);
+ decor_shadow_destroy (QX11Info::display (), mShadow);
mShadow = NULL;
}
@@ -1094,38 +1093,38 @@ KWD::Window::updateShadow (void)
&mLayout);
if (mDecorationPicture)
- XRenderFreePicture (QX11Info::display(), mDecorationPicture);
+ XRenderFreePicture (QX11Info::display (), mDecorationPicture);
if (mTexturePicture)
- XRenderFreePicture (QX11Info::display(), mTexturePicture);
+ XRenderFreePicture (QX11Info::display (), mTexturePicture);
if (mTexturePixmap)
- XFreePixmap (QX11Info::display(), mTexturePixmap);
+ XFreePixmap (QX11Info::display (), mTexturePixmap);
if (mTexturePixmapBuffer)
- XFreePixmap (QX11Info::display(), mTexturePixmapBuffer);
+ XFreePixmap (QX11Info::display (), mTexturePixmapBuffer);
- mTexturePixmap = XCreatePixmap (QX11Info::display(),
+ mTexturePixmap = XCreatePixmap (QX11Info::display (),
QX11Info::appRootWindow (),
mLayout.width, mLayout.height, 32);
- mTexturePixmapBuffer = XCreatePixmap (QX11Info::display(),
+ mTexturePixmapBuffer = XCreatePixmap (QX11Info::display (),
QX11Info::appRootWindow (),
mLayout.width, mLayout.height, 32);
mTexturePixmapSize = QSize (mLayout.width, mLayout.height);
- xformat = XRenderFindStandardFormat (QX11Info::display(),
+ xformat = XRenderFindStandardFormat (QX11Info::display (),
PictStandardARGB32);
mDecorationPicture =
- XRenderCreatePicture (QX11Info::display(),
+ XRenderCreatePicture (QX11Info::display (),
mTexturePixmap,
xformat, 0, NULL);
mTexturePicture =
- XRenderCreatePicture (QX11Info::display(),
+ XRenderCreatePicture (QX11Info::display (),
mTexturePixmapBuffer,
xformat, 0, NULL);
- decor_fill_picture_extents_with_shadow (QX11Info::display(),
+ decor_fill_picture_extents_with_shadow (QX11Info::display (),
mShadow,
&mContext,
mTexturePicture,
@@ -1157,7 +1156,7 @@ KWD::Window::setMask (const QRegion &reg, int)
mGeometry.width (), mGeometry.height ());
KWD::trapXError ();
- XShapeCombineRegion (QX11Info::display(),
+ XShapeCombineRegion (QX11Info::display (),
mFrame,
(mType == Normal2D) ? ShapeBounding : ShapeInput,
0,
@@ -1213,7 +1212,7 @@ KWD::Window::resizeDecoration (bool force)
if (mType != Normal && mType != Normal2D)
{
- Display *xdisplay = QX11Info::display();
+ Display *xdisplay = QX11Info::display ();
Screen *xscreen;
decor_shadow_t *tmpShadow;
decor_context_t c;
@@ -1257,17 +1256,17 @@ KWD::Window::resizeDecoration (bool force)
if (mPixmap)
{
- XFreePixmap (QX11Info::display(), mPixmap);
+ XFreePixmap (QX11Info::display (), mPixmap);
mPixmap = None;
}
if (mPicture)
{
- XRenderFreePicture (QX11Info::display(), mPicture);
+ XRenderFreePicture (QX11Info::display (), mPicture);
mPicture = 0;
}
- if (w != width() || h != height())
+ if (w != width () || h != height ())
{
mPendingConfigure = 1;
}
@@ -1280,7 +1279,7 @@ KWD::Window::resizeDecoration (bool force)
if (mType != Normal2D)
{
- XMoveResizeWindow (QX11Info::display(), winId(),
+ XMoveResizeWindow (QX11Info::display (), winId (),
mGeometry.x () + ROOT_OFF_X - mBorder.left,
mGeometry.y () + ROOT_OFF_Y - mBorder.top,
w, h);
@@ -1289,7 +1288,7 @@ KWD::Window::resizeDecoration (bool force)
{
mPendingMap = 1;
- XReparentWindow (QX11Info::display(), winId (), mParentId, 0, 0);
+ XReparentWindow (QX11Info::display (), winId (), mParentId, 0, 0);
show ();
mMapped = true;
@@ -1297,7 +1296,7 @@ KWD::Window::resizeDecoration (bool force)
if (mDamageId != winId ())
{
mDamageId = winId ();
- XDamageCreate (QX11Info::display(), mDamageId,
+ XDamageCreate (QX11Info::display (), mDamageId,
XDamageReportRawRectangles);
}
}
@@ -1306,7 +1305,7 @@ KWD::Window::resizeDecoration (bool force)
{
if (!mMapped)
{
- XReparentWindow (QX11Info::display(), mDecor->widget ()->winId (),
+ XReparentWindow (QX11Info::display (), mDecor->widget ()->winId (),
mFrame, 0, 0);
mMapped = true;
updateProperty ();
@@ -1329,17 +1328,17 @@ KWD::Window::rebindPixmap (void)
return;
if (mPicture)
- XRenderFreePicture (QX11Info::display(), mPicture);
+ XRenderFreePicture (QX11Info::display (), mPicture);
if (mPixmap)
- XFreePixmap (QX11Info::display(), mPixmap);
+ XFreePixmap (QX11Info::display (), mPixmap);
- mPixmap = XCompositeNameWindowPixmap (QX11Info::display(), winId ());
+ mPixmap = XCompositeNameWindowPixmap (QX11Info::display (), winId ());
- xformat = XRenderFindVisualFormat (QX11Info::display(),
+ xformat = XRenderFindVisualFormat (QX11Info::display (),
(Visual *) QX11Info::appVisual ());
- mPicture = XRenderCreatePicture (QX11Info::display(), mPixmap,
+ mPicture = XRenderCreatePicture (QX11Info::display (), mPixmap,
xformat, 0, NULL);
updateShadow ();
@@ -1469,7 +1468,7 @@ KWD::Window::updateBlurProperty (int topOffset,
rightRegion, rightOffset);
KWD::trapXError ();
- XChangeProperty (QX11Info::display(), mClientId, atom,
+ XChangeProperty (QX11Info::display (), mClientId, atom,
XA_INTEGER,
32, PropModeReplace, (unsigned char *) data,
2 + size * 6);
@@ -1478,7 +1477,7 @@ KWD::Window::updateBlurProperty (int topOffset,
else
{
KWD::trapXError ();
- XDeleteProperty (QX11Info::display(), mClientId, atom);
+ XDeleteProperty (QX11Info::display (), mClientId, atom);
KWD::popXError ();
}
}
@@ -1517,12 +1516,12 @@ KWD::Window::updateProperty (void)
lh = mLayout.left.x2 - mLayout.left.x1;
else
lh = mLayout.left.y2 - mLayout.left.y1;
-
+
if (mLayout.rotation)
rh = mLayout.right.x2 - mLayout.right.x1;
else
rh = mLayout.right.y2 - mLayout.right.y1;
-
+
w = mLayout.top.x2 - mLayout.top.x1 - mContext.left_space -
mContext.right_space;
@@ -1535,18 +1534,18 @@ KWD::Window::updateProperty (void)
x = w - mContext.left_space - mContext.left_corner_space;
if (x > topXOffset)
topXOffset = x;
-
+
if (widget)
{
const QList<QObject*> children = widget->children ();
-
+
foreach (QObject *obj, children)
{
QWidget *child;
-
+
if (!obj->isWidgetType ())
continue;
-
+
child = static_cast <QWidget *> (obj);
x = child->x () - mBorder.left - 2;
@@ -1561,9 +1560,9 @@ KWD::Window::updateProperty (void)
rh / 2,
topXOffset,
w / 2);
-
+
updateBlurProperty (topXOffset, w / 2, lh / 2, rh / 2);
-
+
minWidth = mContext.left_corner_space + 1 + mContext.right_corner_space;
}
else
@@ -1582,9 +1581,9 @@ KWD::Window::updateProperty (void)
{
decor_gen_window_property (data, &normExtents, &maxExtents, 1, 0);
}
-
+
KWD::trapXError ();
- XChangeProperty (QX11Info::display(), mClientId, atom,
+ XChangeProperty (QX11Info::display (), mClientId, atom,
XA_INTEGER,
32, PropModeReplace, (unsigned char *) data,
BASE_PROP_SIZE + QUAD_PROP_SIZE * nQuad);
@@ -1605,12 +1604,12 @@ KWD::Window::updateFrame (WId frame)
{
if (mMapped && mType == Normal2D && mFrame != frame)
{
- XReparentWindow (QX11Info::display(), winId (), frame, 0, 0);
+ XReparentWindow (QX11Info::display (), winId (), frame, 0, 0);
}
mFrame = frame;
KWD::trapXError ();
- XSelectInput (QX11Info::display(), mFrame,
+ XSelectInput (QX11Info::display (), mFrame,
StructureNotifyMask | PropertyChangeMask |
ButtonPressMask | ButtonReleaseMask | PointerMotionMask |
EnterWindowMask | LeaveWindowMask);
@@ -1665,7 +1664,7 @@ KWD::Window::reloadDecoration (void)
if (mShadow)
{
- decor_shadow_destroy (QX11Info::display(), mShadow);
+ decor_shadow_destroy (QX11Info::display (), mShadow);
mShadow = NULL;
}
@@ -1706,9 +1705,9 @@ KWD::Window::updateCursor (QPoint pos)
{
KWD::trapXError ();
if (mType == Normal2D)
- XDefineCursor (QX11Info::display(), winId (), positionToCursor (pos));
+ XDefineCursor (QX11Info::display (), winId (), positionToCursor (pos));
else
- XDefineCursor (QX11Info::display(), mFrame, positionToCursor (pos));
+ XDefineCursor (QX11Info::display (), mFrame, positionToCursor (pos));
KWD::popXError ();
}
@@ -1723,7 +1722,7 @@ KWD::Window::getWindowProtocols (void)
mSupportContextHelp = false;
KWD::trapXError ();
- status = XGetWMProtocols (QX11Info::display(), mClientId, &p, &n);
+ status = XGetWMProtocols (QX11Info::display (), mClientId, &p, &n);
if (KWD::popXError ())
return;
@@ -1747,20 +1746,21 @@ KWD::Window::getWindowProtocols (void)
void
KWD::Window::handlePopupActivated (QAction * action)
{
- WindowOperation op = static_cast <WindowOperation> (action->data().toInt());
+ WindowOperation op;
+ op = static_cast <WindowOperation> (action->data ().toInt ());
performWindowOperation (op);
}
void
KWD::Window::handleOpacityPopupActivated (QAction *action)
{
- int op = action->data().toInt();
+ int op = action->data ().toInt ();
op = op * 0xffff / 100;
if (op != mOpacity)
- Decorator::sendClientMessage (QX11Info::appRootWindow(), mClientId,
+ Decorator::sendClientMessage (QX11Info::appRootWindow (), mClientId,
Atoms::netWmWindowOpacity,
(op << 16) | op);
}
@@ -1769,9 +1769,8 @@ KWD::Window::handleOpacityPopupActivated (QAction *action)
void
KWD::Window::handleDesktopPopupActivated (QAction *action)
{
-
- if (action->data().toInt())
- setDesktop (action->data().toInt());
+ if (action->data ().toInt ())
+ setDesktop (action->data ().toInt ());
else
KWindowSystem::setOnAllDesktops (mClientId, true);
}
@@ -1844,11 +1843,11 @@ KWD::Window::handlePopupAboutToShow (void)
{
foreach (QAction* action, mOpacityMenu->actions ())
{
- if(action->data ().toInt () ==
- qRound ((float)mOpacity * 100.0 / 0xffff))
- action->setChecked( true );
+ if (action->data ().toInt () ==
+ qRound ((float) mOpacity * 100.0 / 0xffff))
+ action->setChecked (true);
else
- action->setChecked( false );
+ action->setChecked (false);
}
}
@@ -1954,12 +1953,12 @@ KWD::Window::moveWindow (QMouseEvent *qme)
direction = positionToDirection (mDecor->mousePosition (qme->pos ()));
- XUngrabPointer (QX11Info::display(), CurrentTime);
- XUngrabKeyboard (QX11Info::display(), CurrentTime);
+ XUngrabPointer (QX11Info::display (), CurrentTime);
+ XUngrabKeyboard (QX11Info::display (), CurrentTime);
Decorator::rootInfo ()->restackRequest (mClientId, NET::FromApplication,
- None, Above,
- QX11Info::appTime());
+ None, Above,
+ QX11Info::appTime ());
Decorator::rootInfo ()->moveResizeRequest (mClientId,
qme->globalX (),
qme->globalY (),
@@ -2034,7 +2033,7 @@ KWD::Window::performMouseCommand (Options::MouseCommand command,
if (opacity > 0xffff)
opacity = 0xffff;
- Decorator::sendClientMessage (QX11Info::appRootWindow(),
+ Decorator::sendClientMessage (QX11Info::appRootWindow (),
mClientId,
Atoms::netWmWindowOpacity,
(opacity << 16) | opacity);
@@ -2050,7 +2049,7 @@ KWD::Window::performMouseCommand (Options::MouseCommand command,
if (opacity < OPACITY_STEP)
opacity = OPACITY_STEP;
- Decorator::sendClientMessage (QX11Info::appRootWindow(),
+ Decorator::sendClientMessage (QX11Info::appRootWindow (),
mClientId,
Atoms::netWmWindowOpacity,
(opacity << 16) | opacity);
@@ -2110,7 +2109,7 @@ KWD::Window::processDamage (void)
{
r2.translate (-xOff, -yOff);
- decor_blend_border_picture (QX11Info::display(),
+ decor_blend_border_picture (QX11Info::display (),
&mContext,
mPicture,
xOff, xOff,
@@ -2133,7 +2132,7 @@ KWD::Window::processDamage (void)
{
r2.translate (-xOff, -yOff);
- decor_blend_border_picture (QX11Info::display(),
+ decor_blend_border_picture (QX11Info::display (),
&mContext,
mPicture,
xOff, yOff,
@@ -2156,7 +2155,7 @@ KWD::Window::processDamage (void)
{
r2.translate (-xOff, -yOff);
- decor_blend_border_picture (QX11Info::display(),
+ decor_blend_border_picture (QX11Info::display (),
&mContext,
mPicture,
xOff, yOff,
@@ -2179,7 +2178,7 @@ KWD::Window::processDamage (void)
{
r2.translate (-xOff, -yOff);
- decor_blend_border_picture (QX11Info::display(),
+ decor_blend_border_picture (QX11Info::display (),
&mContext,
mPicture,
xOff, yOff,
@@ -2194,7 +2193,7 @@ KWD::Window::processDamage (void)
mDamage = QRegion ();
- XRenderComposite (QX11Info::display(),
+ XRenderComposite (QX11Info::display (),
PictOpSrc,
mTexturePicture,
None,
@@ -2215,8 +2214,9 @@ KWD::Window::showKillProcessDialog (Time timestamp)
KWindowInfo kWinInfo =
KWindowSystem::windowInfo (mClientId, 0, NET::WM2WindowClass |
NET::WM2ClientMachine);
- NETWinInfo wInfo = NETWinInfo (QX11Info::display(), mClientId,
- QX11Info::appRootWindow(), NET::WMPid);
+ NETWinInfo wInfo = NETWinInfo (QX11Info::display (), mClientId,
+ QX11Info::appRootWindow (),
+ NET::WMPid);
QByteArray clientMachine, resourceClass;
pid_t pid;
char buf[257];
@@ -2254,37 +2254,38 @@ KWD::Window::hideKillProcessDialog (void)
}
bool
-KWD::Window::eventFilter( QObject* o, QEvent* e )
+KWD::Window::eventFilter (QObject *o,
+ QEvent *e)
{
- if (mDecor == NULL || o != mDecor->widget())
+ if (!mDecor || o != mDecor->widget ())
return false;
- if (e->type() == QEvent::MouseMove)
+ if (e->type () == QEvent::MouseMove)
{
- QMouseEvent* ev = static_cast< QMouseEvent* >( e );
- updateCursor (QPoint (ev->x(), ev->y()));
+ QMouseEvent* ev = static_cast<QMouseEvent *> (e);
+ updateCursor (QPoint (ev->x (), ev->y ()));
}
return false;
}
// unsable API part
void
-KWD::Window::repaintShadow()
+KWD::Window::repaintShadow ()
{
}
bool
-KWD::Window::compositingActive() const
+KWD::Window::compositingActive () const
{
return false;
}
bool
-KWD::Window::shadowsActive() const
+KWD::Window::shadowsActive () const
{
return false;
}
-double KWD::Window::opacity() const
+double KWD::Window::opacity () const
{
return 1.0;
}
diff --git a/kde/window-decorator-kde4/window.h b/kde/window-decorator-kde4/window.h
index c8229a6..de7031a 100644
--- a/kde/window-decorator-kde4/window.h
+++ b/kde/window-decorator-kde4/window.h
@@ -62,10 +62,10 @@ class Window:public QWidget, public KDecorationBridgeUnstable {
~Window (void);
// unsable API part
- virtual void repaintShadow();
- virtual bool compositingActive() const;
- virtual bool shadowsActive() const;
- virtual double opacity() const;
+ virtual void repaintShadow ();
+ virtual bool compositingActive () const;
+ virtual bool shadowsActive () const;
+ virtual double opacity () const;
// stable API part;
virtual bool isActive (void) const;
@@ -212,9 +212,8 @@ class Window:public QWidget, public KDecorationBridgeUnstable {
}
return QWidget::childAt (x, y);
}
-
- virtual bool eventFilter( QObject* o, QEvent* e );
+ virtual bool eventFilter (QObject *o, QEvent *e);
private:
bool resizeDecoration (bool force = false);
diff --git a/libdecoration/decoration.c b/libdecoration/decoration.c
index b1b7ce4..834ecd9 100644
--- a/libdecoration/decoration.c
+++ b/libdecoration/decoration.c
@@ -2403,7 +2403,7 @@ _decor_blend_vert_border_picture (Display *xdisplay,
}
gop = PictOpInReverse;
}
-
+
if (alpha != 0xffff)
{
op = PictOpIn;
diff --git a/plugins/blur/src/blur.cpp b/plugins/blur/src/blur.cpp
index c13230e..ecb86c5 100644
--- a/plugins/blur/src/blur.cpp
+++ b/plugins/blur/src/blur.cpp
@@ -220,7 +220,7 @@ BlurWindow::updateRegion ()
if (!q.isEmpty ())
{
q &= r;
-
+
if (q != r)
state[BLUR_STATE_CLIENT].clipped = true;
@@ -428,7 +428,7 @@ BlurScreen::preparePaint (int msSinceLastPaint)
foreach (CompWindow *w, screen->windows ())
{
BLUR_WINDOW (w);
-
+
if (!w->isViewable () || !CompositeWindow::get (w)->damaged ())
continue;
@@ -579,7 +579,7 @@ BlurScreen::getSrcBlurFragmentFunction (GLTexture *texture,
{
static const char *temp[] = { "offset0", "offset1", "sum" };
int i;
-
+
for (i = 0; i < sizeof (temp) / sizeof (temp[0]); i++)
data.addTempHeaderOp (temp[i]);
@@ -723,7 +723,7 @@ BlurScreen::getDstBlurFragmentFunction (GLTexture *texture,
}
else
{
- i = MAX(((maxTemp / 2) - 4) / 4, 1);
+ i = MAX (((maxTemp / 2) - 4) / 4, 1);
numIndirect = ceil ((float)numTexop / (float)i);
numIndirectOp = ceil ((float)numTexop / (float)numIndirect);
}
@@ -744,7 +744,6 @@ BlurScreen::getDstBlurFragmentFunction (GLTexture *texture,
data.addTempHeaderOp (str);
}
-
data.addFetchOp ("output", NULL, target);
data.addColorOp ("output", "output");
@@ -765,7 +764,7 @@ BlurScreen::getDstBlurFragmentFunction (GLTexture *texture,
{
base = j * numIndirectOp;
end = MIN ((j + 1) * numIndirectOp, numTexop) - base;
-
+
ITCbase = MAX (numITC - base, 0);
for (i = ITCbase; i < end; i++)
@@ -988,7 +987,7 @@ BlurScreen::loadFilterProgram (int numITC)
{
base = j * numIndirectOp;
end = MIN ((j + 1) * numIndirectOp, numTexop) - base;
-
+
ITCbase = MAX (numITC - base, 0);
for (i = ITCbase; i < end; i++)
@@ -1369,10 +1368,11 @@ BlurWindow::updateDstTexture (const GLMatrix &transform,
if (state[BLUR_STATE_DECOR].threshold)
{
int xx, yy, ww, hh;
- // top
+ // top
xx = window->x () - window->output ().left;
yy = window->y () - window->output ().top;
- ww = window->width () + window->output ().left + window->output ().right;
+ ww = window->width () + window->output ().left +
+ window->output ().right;
hh = window->output ().top;
bScreen->tmpRegion2 = bScreen->tmpRegion.intersected (
@@ -1384,7 +1384,8 @@ BlurWindow::updateDstTexture (const GLMatrix &transform,
// bottom
xx = window->x () - window->output ().left;
yy = window->y () + window->height ();
- ww = window->width () + window->output ().left + window->output ().right;
+ ww = window->width () + window->output ().left +
+ window->output ().right;
hh = window->output ().bottom;
bScreen->tmpRegion2 = bScreen->tmpRegion.intersected (
@@ -1555,7 +1556,7 @@ BlurWindow::updateDstTexture (const GLMatrix &transform,
switch (filter) {
case BlurOptions::FilterGaussian:
- return bScreen->fboUpdate (bScreen->tmpRegion.handle()->rects,
+ return bScreen->fboUpdate (bScreen->tmpRegion.handle ()->rects,
bScreen->tmpRegion.numRects ());
case BlurOptions::FilterMipmap:
(*GL::generateMipmap) (bScreen->target);
@@ -1605,7 +1606,7 @@ BlurWindow::glDraw (const GLMatrix &transform,
bScreen->tmpRegion = this->region.intersected (reg);
if (!bScreen->blurOcclusion &&
!(mask & PAINT_WINDOW_TRANSFORMED_MASK))
- bScreen->tmpRegion -= clip;
+ bScreen->tmpRegion -= clip;
if (updateDstTexture (transform, &box, clientThreshold))
{
@@ -1663,7 +1664,7 @@ BlurWindow::glDraw (const GLMatrix &transform,
GLTexture::MatrixList ml;
gWindow->geometry ().reset ();
-
+
gWindow->glAddGeometry (ml, bScreen->tmpRegion, reg);
if (gWindow->geometry ().vCount)
{
@@ -1800,7 +1801,9 @@ BlurWindow::glDrawTexture (GLTexture *texture,
unit = dstFa.allocTextureUnits (2);
function = bScreen->getDstBlurFragmentFunction (
- texture, param, unit, iTC, gWindow->geometry().texUnits);
+ texture, param, unit, iTC,
+ gWindow->geometry ().texUnits);
+
if (function)
{
int i;
@@ -1867,30 +1870,30 @@ BlurWindow::glDrawTexture (GLTexture *texture,
q_gen[2] = rm[11];
q_gen[3] = rm[15];
- glTexGenfv(GL_T, GL_OBJECT_PLANE, t_gen);
- glTexGenfv(GL_S, GL_OBJECT_PLANE, s_gen);
- glTexGenfv(GL_Q, GL_OBJECT_PLANE, q_gen);
+ glTexGenfv (GL_T, GL_OBJECT_PLANE, t_gen);
+ glTexGenfv (GL_S, GL_OBJECT_PLANE, s_gen);
+ glTexGenfv (GL_Q, GL_OBJECT_PLANE, q_gen);
- glTexGeni(GL_S, GL_TEXTURE_GEN_MODE,
- GL_OBJECT_LINEAR);
- glTexGeni(GL_T, GL_TEXTURE_GEN_MODE,
- GL_OBJECT_LINEAR);
- glTexGeni(GL_Q, GL_TEXTURE_GEN_MODE,
- GL_OBJECT_LINEAR);
+ glTexGeni (GL_S, GL_TEXTURE_GEN_MODE,
+ GL_OBJECT_LINEAR);
+ glTexGeni (GL_T, GL_TEXTURE_GEN_MODE,
+ GL_OBJECT_LINEAR);
+ glTexGeni (GL_Q, GL_TEXTURE_GEN_MODE,
+ GL_OBJECT_LINEAR);
- glEnable(GL_TEXTURE_GEN_S);
- glEnable(GL_TEXTURE_GEN_T);
- glEnable(GL_TEXTURE_GEN_Q);
+ glEnable (GL_TEXTURE_GEN_S);
+ glEnable (GL_TEXTURE_GEN_T);
+ glEnable (GL_TEXTURE_GEN_Q);
(*GL::activeTexture) (GL_TEXTURE0_ARB +
gWindow->geometry ().texUnits +
1 + (i * 2));
rm.reset ();
-
+
rm[13] = -bScreen->ty * bScreen->pos[i];
rm *= tm;
-
+
s_gen[0] = rm[0];
s_gen[1] = rm[4];
s_gen[2] = rm[8];
@@ -1904,20 +1907,20 @@ BlurWindow::glDrawTexture (GLTexture *texture,
q_gen[2] = rm[11];
q_gen[3] = rm[15];
- glTexGenfv(GL_T, GL_OBJECT_PLANE, t_gen);
- glTexGenfv(GL_S, GL_OBJECT_PLANE, s_gen);
- glTexGenfv(GL_Q, GL_OBJECT_PLANE, q_gen);
+ glTexGenfv (GL_T, GL_OBJECT_PLANE, t_gen);
+ glTexGenfv (GL_S, GL_OBJECT_PLANE, s_gen);
+ glTexGenfv (GL_Q, GL_OBJECT_PLANE, q_gen);
- glTexGeni(GL_S, GL_TEXTURE_GEN_MODE,
- GL_OBJECT_LINEAR);
- glTexGeni(GL_T, GL_TEXTURE_GEN_MODE,
- GL_OBJECT_LINEAR);
- glTexGeni(GL_Q, GL_TEXTURE_GEN_MODE,
- GL_OBJECT_LINEAR);
+ glTexGeni (GL_S, GL_TEXTURE_GEN_MODE,
+ GL_OBJECT_LINEAR);
+ glTexGeni (GL_T, GL_TEXTURE_GEN_MODE,
+ GL_OBJECT_LINEAR);
+ glTexGeni (GL_Q, GL_TEXTURE_GEN_MODE,
+ GL_OBJECT_LINEAR);
- glEnable(GL_TEXTURE_GEN_S);
- glEnable(GL_TEXTURE_GEN_T);
- glEnable(GL_TEXTURE_GEN_Q);
+ glEnable (GL_TEXTURE_GEN_S);
+ glEnable (GL_TEXTURE_GEN_T);
+ glEnable (GL_TEXTURE_GEN_Q);
}
(*GL::activeTexture) (GL_TEXTURE0_ARB);
@@ -1993,17 +1996,17 @@ BlurWindow::glDrawTexture (GLTexture *texture,
glBindTexture (bScreen->target, 0);
(*GL::activeTexture) (GL_TEXTURE0_ARB);
}
-
+
if (iTC)
{
int i;
- for (i = gWindow->geometry().texUnits;
- i < gWindow->geometry().texUnits + (2 * iTC); i++)
+ for (i = gWindow->geometry ().texUnits;
+ i < gWindow->geometry ().texUnits + (2 * iTC); i++)
{
(*GL::activeTexture) (GL_TEXTURE0_ARB + i);
- glDisable(GL_TEXTURE_GEN_S);
- glDisable(GL_TEXTURE_GEN_T);
- glDisable(GL_TEXTURE_GEN_Q);
+ glDisable (GL_TEXTURE_GEN_S);
+ glDisable (GL_TEXTURE_GEN_T);
+ glDisable (GL_TEXTURE_GEN_Q);
}
(*GL::activeTexture) (GL_TEXTURE0_ARB);
}
diff --git a/plugins/blur/src/blur.h b/plugins/blur/src/blur.h
index 4f31ff6..980fb25 100644
--- a/plugins/blur/src/blur.h
+++ b/plugins/blur/src/blur.h
@@ -74,7 +74,6 @@ class BlurScreen :
public BlurOptions
{
public:
-
BlurScreen (CompScreen *screen);
~BlurScreen ();
@@ -84,7 +83,7 @@ class BlurScreen :
virtual void matchExpHandlerChanged ();
virtual void matchPropertyChanged (CompWindow *window);
-
+
void preparePaint (int);
void donePaint ();
diff --git a/plugins/commands/src/commands.cpp b/plugins/commands/src/commands.cpp
index dd9ecd6..11df0d0 100644
--- a/plugins/commands/src/commands.cpp
+++ b/plugins/commands/src/commands.cpp
@@ -42,7 +42,7 @@ CommandsScreen::runCommand (CompAction *action,
cs = CommandsScreen::get (screen);
- screen->runCommand (cs->mOptions[commandOption].value (). s());
+ screen->runCommand (cs->mOptions[commandOption].value (). s ());
return true;
}
diff --git a/plugins/composite/include/composite/composite.h b/plugins/composite/include/composite/composite.h
index 4378f53..97fd46c 100644
--- a/plugins/composite/include/composite/composite.h
+++ b/plugins/composite/include/composite/composite.h
@@ -108,7 +108,7 @@ class CompositeScreen :
bool compositingActive ();
int damageEvent ();
-
+
void damageScreen ();
void damageRegion (const CompRegion &);
void damagePending ();
@@ -130,7 +130,7 @@ class CompositeScreen :
int getTimeToNextRedraw (struct timeval *tv);
int redrawTime ();
-
+
bool handlePaintTimeout ();
WRAPABLE_HND (0, CompositeScreenInterface, void, preparePaint, int);
@@ -226,7 +226,7 @@ class CompositeWindow :
void unredirect ();
bool redirected ();
bool overlayWindow ();
-
+
void damageTransformedRect (float xScale,
float yScale,
float xTranslate,
@@ -254,7 +254,7 @@ class CompositeWindow :
friend class PrivateCompositeWindow;
friend class CompositeScreen;
-
+
private:
PrivateCompositeWindow *priv;
};
diff --git a/plugins/composite/src/privates.h b/plugins/composite/src/privates.h
index 5247f1e..3f3468d 100644
--- a/plugins/composite/src/privates.h
+++ b/plugins/composite/src/privates.h
@@ -82,7 +82,7 @@ class PrivateCompositeScreen :
unsigned long damageMask;
CompRegion tmpRegion;
-
+
Window overlay;
Window output;
@@ -126,7 +126,6 @@ class PrivateCompositeWindow : WindowInterface
int height);
public:
-
CompWindow *window;
CompositeWindow *cWindow;
CompositeScreen *cScreen;
@@ -143,7 +142,7 @@ class PrivateCompositeWindow : WindowInterface
unsigned short opacity;
unsigned short brightness;
unsigned short saturation;
-
+
XRectangle *damageRects;
int sizeDamage;
int nDamage;
diff --git a/plugins/composite/src/screen.cpp b/plugins/composite/src/screen.cpp
index 8947847..b2d97bd 100644
--- a/plugins/composite/src/screen.cpp
+++ b/plugins/composite/src/screen.cpp
@@ -99,7 +99,7 @@ PrivateCompositeScreen::handleEvent (XEvent *event)
}
break;
}
-
+
screen->handleEvent (event);
switch (event->type) {
@@ -222,7 +222,7 @@ CompositeScreen::CompositeScreen (CompScreen *s) :
}
if (!XDamageQueryExtension (s->dpy (), &priv->damageEvent,
- &priv->damageError))
+ &priv->damageError))
{
compLogMessage ("core", CompLogLevelFatal,
"No damage extension");
@@ -403,8 +403,9 @@ CompositeScreen::registerPaintHandler (PaintHandler *pHnd)
showOutputWindow ();
priv->paintTimer.start
- (boost::bind(&CompositeScreen::handlePaintTimeout, this),
+ (boost::bind (&CompositeScreen::handlePaintTimeout, this),
priv->optimalRedrawTime, MAXSHORT);
+
return true;
}
@@ -545,7 +546,7 @@ CompositeScreen::updateOutputWindow ()
Display *dpy = screen->dpy ();
XserverRegion region;
CompRegion tmpRegion (screen->region ());
-
+
for (CompWindowList::reverse_iterator rit =
screen->windows ().rbegin ();
rit != screen->windows ().rend (); rit++)
@@ -553,7 +554,7 @@ CompositeScreen::updateOutputWindow ()
{
tmpRegion -= (*rit)->region ();
}
-
+
XShapeCombineRegion (dpy, priv->output, ShapeBounding,
0, 0, tmpRegion.handle (), ShapeSet);
@@ -630,7 +631,7 @@ PrivateCompositeScreen::detectRefreshRate ()
value.set ((int) 0);
- if (screen->XRandr())
+ if (screen->XRandr ())
{
XRRScreenConfiguration *config;
@@ -777,7 +778,7 @@ CompositeScreen::handlePaintTimeout ()
}
priv->tmpRegion = priv->damage & screen->region ();
-
+
if (priv->damageMask & COMPOSITE_SCREEN_DAMAGE_REGION_MASK)
{
if (priv->tmpRegion == screen->region ())
@@ -790,7 +791,7 @@ CompositeScreen::handlePaintTimeout ()
priv->damageMask = 0;
CompOutput::ptrList outputs (0);
-
+
if (priv->optionGetForceIndependentOutputPainting ()
|| !screen->hasOverlappingOutputs ())
{
@@ -801,7 +802,7 @@ CompositeScreen::handlePaintTimeout ()
outputs.push_back (&screen->fullscreenOutput ());
paint (outputs, mask);
-
+
priv->lastRedraw = tv;
donePaint ();
@@ -833,17 +834,17 @@ CompositeScreen::handlePaintTimeout ()
void
CompositeScreen::preparePaint (int msSinceLastPaint)
- WRAPABLE_HND_FUNC(0, preparePaint, msSinceLastPaint)
+ WRAPABLE_HND_FUNC (0, preparePaint, msSinceLastPaint)
void
CompositeScreen::donePaint ()
- WRAPABLE_HND_FUNC(1, donePaint)
+ WRAPABLE_HND_FUNC (1, donePaint)
void
CompositeScreen::paint (CompOutput::ptrList &outputs,
unsigned int mask)
{
- WRAPABLE_HND_FUNC(2, paint, outputs, mask)
+ WRAPABLE_HND_FUNC (2, paint, outputs, mask)
if (priv->pHnd)
priv->pHnd->paintOutputs (outputs, mask, priv->tmpRegion);
diff --git a/plugins/composite/src/window.cpp b/plugins/composite/src/window.cpp
index 94dd36b..aa9331f 100644
--- a/plugins/composite/src/window.cpp
+++ b/plugins/composite/src/window.cpp
@@ -45,7 +45,7 @@ CompositeWindow::CompositeWindow (CompWindow *w) :
priv->opacity = OPAQUE;
if (!(w->type () & CompWindowTypeDesktopMask))
- priv->opacity = s->getWindowProp32 (w->id (),
+ priv->opacity = s->getWindowProp32 (w->id (),
Atoms::winOpacity, OPAQUE);
priv->brightness = s->getWindowProp32 (w->id (),
@@ -53,7 +53,7 @@ CompositeWindow::CompositeWindow (CompWindow *w) :
priv->saturation = s->getWindowProp32 (w->id (),
Atoms::winSaturation, COLOR);
-
+
if (w->isViewable ())
priv->damaged = true;
}
@@ -478,9 +478,9 @@ CompositeWindow::saturation ()
bool
CompositeWindow::damageRect (bool initial,
- const CompRect &rect)
+ const CompRect &rect)
{
- WRAPABLE_HND_FUNC_RETURN(0, bool, damageRect, initial, rect)
+ WRAPABLE_HND_FUNC_RETURN (0, bool, damageRect, initial, rect)
return false;
}
@@ -535,7 +535,6 @@ PrivateCompositeWindow::windowNotify (CompWindowNotify n)
}
default:
break;
-
}
window->windowNotify (n);
diff --git a/plugins/copytex/src/copytex.cpp b/plugins/copytex/src/copytex.cpp
index f3d4ea1..95188c3 100644
--- a/plugins/copytex/src/copytex.cpp
+++ b/plugins/copytex/src/copytex.cpp
@@ -92,7 +92,7 @@ CopyPixmap::~CopyPixmap ()
CopyTexture::CopyTexture (CopyPixmap *cp, CompRect dim) :
cp (cp),
dim (dim),
- damage (0, 0, dim.width(), dim.height ())
+ damage (0, 0, dim.width (), dim.height ())
{
GLenum target;
GLTexture::Matrix matrix = _identity_matrix;
@@ -172,35 +172,36 @@ CopyTexture::update ()
tmpPix = XCreatePixmap (screen->dpy (), cp->pixmap, damage.width (),
damage.height (), cp->depth);
- XCopyArea(screen->dpy (), cp->pixmap, tmpPix, gc, dim.x () + damage.x (),
- dim.y () + damage.y (), damage.width (), damage.height (), 0, 0);
- XSync(screen->dpy (), FALSE);
+ XCopyArea (screen->dpy (), cp->pixmap, tmpPix, gc,
+ dim.x () + damage.x (), dim.y () + damage.y (),
+ damage.width (), damage.height (), 0, 0);
+ XSync (screen->dpy (), FALSE);
if (cs->useShm)
addr = cs->shmInfo.shmaddr;
else
{
- image = XGetImage(screen->dpy (), tmpPix, 0, 0, damage.width(),
- damage.height (), AllPlanes, ZPixmap);
+ image = XGetImage (screen->dpy (), tmpPix, 0, 0, damage.width (),
+ damage.height (), AllPlanes, ZPixmap);
if (image)
addr = image->data;
}
glBindTexture (target (), name ());
- glTexSubImage2D(target (), 0, damage.x (), damage.y (), damage.width (),
- damage.height (), GL_BGRA,
+ glTexSubImage2D (target (), 0, damage.x (), damage.y (),
+ damage.width (), damage.height (), GL_BGRA,
#if IMAGE_BYTE_ORDER == MSBFirst
- GL_UNSIGNED_INT_8_8_8_8_REV,
+ GL_UNSIGNED_INT_8_8_8_8_REV,
#else
- GL_UNSIGNED_BYTE,
+ GL_UNSIGNED_BYTE,
#endif
- addr);
+ addr);
glBindTexture (target (), 0);
- XFreePixmap(screen->dpy (), tmpPix);
- XFreeGC(screen->dpy (), gc);
+ XFreePixmap (screen->dpy (), tmpPix);
+ XFreeGC (screen->dpy (), gc);
if (image)
- XDestroyImage(image);
+ XDestroyImage (image);
damage.setGeometry (0, 0, 0, 0);
}
@@ -249,7 +250,7 @@ CopytexScreen::handleEvent (XEvent *event)
y1 = MIN (y1, t->damage.y1 ());
y2 = MAX (y2, t->damage.y2 ());
}
-
+
if (x1 < x2 && y1 < y2)
t->damage.setGeometry (x1, y1, x2 - x1, y2 - y1);
@@ -271,7 +272,7 @@ CopytexScreen::CopytexScreen (CompScreen *screen) :
if (b)
useShm = true;
}
-
+
if (useShm)
{
shmInfo.shmid = shmget (IPC_PRIVATE, SHM_SIZE, IPC_CREAT | 0600);
@@ -298,7 +299,7 @@ CopytexScreen::CopytexScreen (CompScreen *screen) :
if (useShm)
{
shmInfo.readOnly = FALSE;
- if (!XShmAttach(screen->dpy (), &shmInfo))
+ if (!XShmAttach (screen->dpy (), &shmInfo))
{
shmdt (shmInfo.shmaddr);
shmctl (shmInfo.shmid, IPC_RMID, 0);
@@ -321,9 +322,9 @@ CopytexScreen::~CopytexScreen ()
{
if (useShm)
{
- XShmDetach(screen->dpy (), &shmInfo);
+ XShmDetach (screen->dpy (), &shmInfo);
shmdt (shmInfo.shmaddr);
- shmctl (shmInfo.shmid, IPC_RMID, 0);
+ shmctl (shmInfo.shmid, IPC_RMID, 0);
}
GLScreen::get (screen)->unregisterBindPixmap (hnd);
}
diff --git a/plugins/copytex/src/copytex.h b/plugins/copytex/src/copytex.h
index 4bb83a2..6d35685 100644
--- a/plugins/copytex/src/copytex.h
+++ b/plugins/copytex/src/copytex.h
@@ -49,7 +49,7 @@ class CopyPixmap {
~CopyPixmap ();
- static GLTexture::List bindPixmapToTexture (Pixmap pixmap,
+ static GLTexture::List bindPixmapToTexture (Pixmap pixmap,
int width,
int height,
int depth);
@@ -87,7 +87,6 @@ class CopytexScreen :
public PluginClassHandler<CopytexScreen,CompScreen>
{
public:
-
CopytexScreen (CompScreen *screen);
~CopytexScreen ();
@@ -110,7 +109,6 @@ class CopytexPluginVTable :
public CompPlugin::VTableForScreen<CopytexScreen>
{
public:
-
bool init ();
-}; \ No newline at end of file
+};
diff --git a/plugins/decor/src/decor.cpp b/plugins/decor/src/decor.cpp
index 34d762b..892631a 100644
--- a/plugins/decor/src/decor.cpp
+++ b/plugins/decor/src/decor.cpp
@@ -244,7 +244,7 @@ computeQuadBox (decor_quad_t *q,
if (q->stretch & STRETCH_X)
{
- sx = (float)q->max_width / ((float)(x2 - x1));
+ sx = (float) q->max_width / ((float) (x2 - x1));
}
else if (q->max_width < x2 - x1)
{
@@ -256,7 +256,7 @@ computeQuadBox (decor_quad_t *q,
if (q->stretch & STRETCH_Y)
{
- sy = (float)q->max_height / ((float)(y2 - y1));
+ sy = (float) q->max_height / ((float) (y2 - y1));
}
else if (q->max_height < y2 - y1)
{
@@ -691,7 +691,7 @@ DecorWindow::update (bool allowDecoration)
}
else
{
-
+
if (dScreen->dmSupports & WINDOW_DECORATION_TYPE_PIXMAP &&
dScreen->cmActive &&
!(dScreen->dmSupports & WINDOW_DECORATION_TYPE_WINDOW &&
@@ -766,7 +766,7 @@ DecorWindow::update (bool allowDecoration)
wd = NULL;
updateFrame ();
-
+
memset (&emptyExtents, 0, sizeof (CompWindowExtents));
window->setWindowFrameExtents (&emptyExtents);
@@ -1017,7 +1017,7 @@ DecorWindow::updateOutputFrame ()
XChangeProperty (screen->dpy (), window->id (),
dScreen->outputFrameAtom, XA_WINDOW, 32,
PropModeReplace, (unsigned char *) &outputFrame, 1);
-
+
if (screen->XShape ())
XShapeSelectInput (screen->dpy (), outputFrame,
ShapeNotifyMask);
@@ -1133,7 +1133,7 @@ DecorScreen::checkForDm (bool updateWindows)
if (!dmSupports)
dmWin = None;
-
+
XFree (data);
}
else
@@ -1253,7 +1253,7 @@ DecorScreen::handleEvent (XEvent *event)
if (frames.find (de->drawable) != frames.end ())
frames[de->drawable]->cWindow->damageOutputExtents ();
-
+
foreach (DecorTexture *t, textures)
{
if (t->pixmap == de->drawable)
@@ -1468,7 +1468,7 @@ DecorWindow::getOutputExtents (CompWindowExtents& output)
output.bottom = e->bottom;
}
}
-
+
bool
DecorScreen::setOption (const CompString &name,
CompOption::Value &value)
@@ -1505,7 +1505,7 @@ DecorScreen::setOption (const CompString &name,
matchString = optionGetShadowMatch ().toString ();
if (matchString.find ("rgba=") == CompString::npos)
{
- CompMatch rgbaMatch("rgba=0");
+ CompMatch rgbaMatch ("rgba=0");
optionGetShadowMatch () &= rgbaMatch;
}
}
diff --git a/plugins/decor/src/decor.h b/plugins/decor/src/decor.h
index 28379f4..bef0be1 100644
--- a/plugins/decor/src/decor.h
+++ b/plugins/decor/src/decor.h
@@ -120,7 +120,6 @@ class DecorScreen :
DecorTexture * getTexture (Pixmap);
void releaseTexture (DecorTexture *);
-
void checkForDm (bool);
bool decoratorStartTimeout ();
@@ -199,7 +198,7 @@ class DecorWindow :
GLWindow *gWindow;
CompositeWindow *cWindow;
DecorScreen *dScreen;
-
+
WindowDecoration *wd;
Decoration *decor;
diff --git a/plugins/imgpng/src/imgpng.cpp b/plugins/imgpng/src/imgpng.cpp
index b7826e5..ae2abd4 100644
--- a/plugins/imgpng/src/imgpng.cpp
+++ b/plugins/imgpng/src/imgpng.cpp
@@ -95,7 +95,7 @@ PngScreen::readPngData (png_struct *png,
png_set_gray_1_2_4_to_8 (png);
/* transform transparency to alpha */
- if (png_get_valid(png, info, PNG_INFO_tRNS))
+ if (png_get_valid (png, info, PNG_INFO_tRNS))
png_set_tRNS_to_alpha (png);
if (depth == 16)
diff --git a/plugins/imgsvg/src/imgsvg.cpp b/plugins/imgsvg/src/imgsvg.cpp
index a252d46..a97aafd 100644
--- a/plugins/imgsvg/src/imgsvg.cpp
+++ b/plugins/imgsvg/src/imgsvg.cpp
@@ -213,7 +213,7 @@ SvgWindow::~SvgWindow ()
if (context)
{
finiTexture (context->texture[0]);
- delete context;
+ delete context;
}
}
diff --git a/plugins/ini/src/ini.cpp b/plugins/ini/src/ini.cpp
index 0c8c3e0..7c3948a 100644
--- a/plugins/ini/src/ini.cpp
+++ b/plugins/ini/src/ini.cpp
@@ -465,7 +465,7 @@ IniScreen::fileChanged (const char *name)
CompString
IniScreen::getHomeDir ()
{
- char *home = getenv("HOME");
+ char *home = getenv ("HOME");
CompString retval;
if (home)
diff --git a/plugins/move/src/move.cpp b/plugins/move/src/move.cpp
index 87cd059..6556416 100644
--- a/plugins/move/src/move.cpp
+++ b/plugins/move/src/move.cpp
@@ -185,7 +185,7 @@ moveTerminate (CompAction *action,
}
action->setState (action->state () & ~(CompAction::StateTermKey |
- CompAction::StateTermButton));
+ CompAction::StateTermButton));
return false;
}
@@ -221,7 +221,7 @@ moveGetYConstrainRegion (CompScreen *s)
XUnionRegion (&r, region, region);
- for (i = 0; i < s->outputDevs ().size(); i++)
+ for (i = 0; i < s->outputDevs ().size (); i++)
{
XUnionRegion (s->outputDevs ()[i].region (), region, region);
@@ -296,7 +296,7 @@ moveHandleMotionEvent (CompScreen *s,
CompWindow *w;
w = ms->w;
-
+
wX = w->serverGeometry ().x ();
wY = w->serverGeometry ().y ();
wWidth = w->serverGeometry ().width () +
@@ -665,12 +665,12 @@ MoveScreen::MoveScreen (CompScreen *screen) :
region (NULL),
status (RectangleOut),
releaseButton (0),
- grab(NULL),
+ grab (NULL),
hasCompositing (false)
{
updateOpacity ();
-
+
for (unsigned int i = 0; i < NUM_KEYS; i++)
key[i] = XKeysymToKeycode (screen->dpy (),
XStringToKeysym (mKeys[i].name));
diff --git a/plugins/move/src/move.h b/plugins/move/src/move.h
index 8e49e5f..bfc228d 100644
--- a/plugins/move/src/move.h
+++ b/plugins/move/src/move.h
@@ -55,14 +55,13 @@ class MoveScreen :
public MoveOptions
{
public:
-
MoveScreen (CompScreen *screen);
~MoveScreen ();
-
+
void updateOpacity ();
void handleEvent (XEvent *);
-
+
CompWindow *w;
int savedX;
int savedY;
@@ -75,7 +74,7 @@ class MoveScreen :
int releaseButton;
GLushort moveOpacity;
-
+
CompScreen::GrabHandle grab;
Cursor moveCursor;
diff --git a/plugins/opengl/include/opengl/opengl.h b/plugins/opengl/include/opengl/opengl.h
index 8d73f47..3fe84cc 100644
--- a/plugins/opengl/include/opengl/opengl.h
+++ b/plugins/opengl/include/opengl/opengl.h
@@ -287,7 +287,7 @@ class GLScreen :
GLTexture::BindPixmapHandle registerBindPixmap (GLTexture::BindPixmapProc);
void unregisterBindPixmap (GLTexture::BindPixmapHandle);
-
+
GLFBConfig * glxPixmapFBConfig (unsigned int depth);
GLTexture *defaultIcon ();
@@ -355,7 +355,7 @@ class GLWindow :
~Geometry ();
void reset ();
-
+
bool moreVertices (int newSize);
bool moreIndices (int newSize);
@@ -370,7 +370,7 @@ class GLWindow :
int texCoordSize;
int indexCount;
};
-
+
static GLWindowPaintAttrib defaultPaintAttrib;
public:
@@ -410,7 +410,7 @@ class GLWindow :
friend class GLScreen;
friend class PrivateGLScreen;
-
+
private:
PrivateGLWindow *priv;
};
diff --git a/plugins/opengl/include/opengl/texture.h b/plugins/opengl/include/opengl/texture.h
index 1a32757..eb64dba 100644
--- a/plugins/opengl/include/opengl/texture.h
+++ b/plugins/opengl/include/opengl/texture.h
@@ -81,7 +81,6 @@ class GLTexture : public CompRect {
typedef unsigned int BindPixmapHandle;
public:
-
GLuint name () const;
GLenum target () const;
GLenum filter () const;
diff --git a/plugins/opengl/src/fragment.cpp b/plugins/opengl/src/fragment.cpp
index 3546be3..d964478 100644
--- a/plugins/opengl/src/fragment.cpp
+++ b/plugins/opengl/src/fragment.cpp
@@ -84,7 +84,7 @@ namespace GLFragment {
class HeaderOp {
public:
- HeaderOp () : type(OpTypeHeaderTemp), name ("") {};
+ HeaderOp () : type (OpTypeHeaderTemp), name ("") {};
public:
OpType type;
CompString name;
@@ -93,7 +93,7 @@ namespace GLFragment {
class BodyOp {
public:
BodyOp () :
- type(OpTypeData),
+ type (OpTypeData),
data (""),
dst (""),
src (""),
@@ -296,7 +296,7 @@ namespace GLFragment {
offset, &colorDone, &blendDone,
callBack);
- if (bodyOp.dst.compare("output"))
+ if (bodyOp.dst.compare ("output"))
{
dataOp.type = OpTypeDataStore;
dataOp.data =
@@ -486,7 +486,7 @@ namespace GLFragment {
addFetchOffsetVariables (BodyOp *op,
int index,
bool *indices,
- CompString *data)
+ CompString *data)
{
if (op->type == OpTypeDataOffset)
{
@@ -780,7 +780,7 @@ namespace GLFragment {
FunctionData::addColorOp (const char *dst, const char *src)
{
BodyOp b;
-
+
b.type = OpTypeColor;
b.dst = CompString (dst);
b.src = CompString (src);
@@ -793,12 +793,12 @@ namespace GLFragment {
{
BodyOp b;
va_list ap;
-
+
b.type = OpTypeData;
va_start (ap, str);
- b.data = compPrintf(str, ap);
+ b.data = compPrintf (str, ap);
va_end (ap);
-
+
priv->body.push_back (b);
}
@@ -807,12 +807,12 @@ namespace GLFragment {
{
BodyOp b;
va_list ap;
-
+
b.type = OpTypeDataBlend;
va_start (ap, str);
- b.data = compPrintf(str, ap);
+ b.data = compPrintf (str, ap);
va_end (ap);
-
+
priv->body.push_back (b);
}
@@ -824,7 +824,6 @@ namespace GLFragment {
CompString validName = name;
unsigned int i = 0;
-
while (findFragmentFunctionWithName (s, validName))
{
validName = compPrintf ("%s%d", name, i++);
diff --git a/plugins/opengl/src/matrix.cpp b/plugins/opengl/src/matrix.cpp
index 2dc7d6f..656afef 100644
--- a/plugins/opengl/src/matrix.cpp
+++ b/plugins/opengl/src/matrix.cpp
@@ -113,7 +113,7 @@ GLMatrix::reset ()
memcpy (m, identity, sizeof (m));
}
-const float *
+const float *
GLMatrix::getMatrix () const
{
return m;
diff --git a/plugins/opengl/src/paint.cpp b/plugins/opengl/src/paint.cpp
index 376cf4e..458fd4c 100644
--- a/plugins/opengl/src/paint.cpp
+++ b/plugins/opengl/src/paint.cpp
@@ -49,7 +49,7 @@ GLScreen::glApplyTransform (const GLScreenPaintAttrib &sAttrib,
CompOutput *output,
GLMatrix *transform)
{
- WRAPABLE_HND_FUNC(2, glApplyTransform, sAttrib, output, transform)
+ WRAPABLE_HND_FUNC (2, glApplyTransform, sAttrib, output, transform)
transform->translate (sAttrib.xTranslate,
sAttrib.yTranslate,
@@ -119,7 +119,7 @@ PrivateGLScreen::paintBackground (const CompRegion &region,
}
glVertexPointer (2, GL_FLOAT, sizeof (GLfloat) * 2, data + 2);
-
+
glColor4us (0, 0, 0, 0);
glDrawArrays (GL_QUADS, 0, nBox * 4);
glColor4usv (defaultColor);
@@ -213,9 +213,7 @@ PrivateGLScreen::paintOutputRegion (const GLMatrix &transform,
CompWindowList::reverse_iterator rit;
unredirectFS = CompositeScreen::get (screen)->
- getOption("unredirect_fullscreen_windows")->value ().b ();
-
-
+ getOption ("unredirect_fullscreen_windows")->value ().b ();
if (mask & PAINT_SCREEN_TRANSFORMED_MASK)
{
@@ -233,7 +231,7 @@ PrivateGLScreen::paintOutputRegion (const GLMatrix &transform,
if (!(mask & PAINT_SCREEN_NO_OCCLUSION_DETECTION_MASK))
{
/* detect occlusions */
- for (rit = pl.rbegin (); rit != pl.rend(); rit++)
+ for (rit = pl.rbegin (); rit != pl.rend (); rit++)
{
w = (*rit);
gw = GLWindow::get (w);
@@ -252,7 +250,7 @@ PrivateGLScreen::paintOutputRegion (const GLMatrix &transform,
gw->priv->clip = tmpRegion;
odMask = PAINT_WINDOW_OCCLUSION_DETECTION_MASK;
-
+
if ((cScreen->windowPaintOffset ().x () != 0 ||
cScreen->windowPaintOffset ().x () != 0) &&
!w->onAllViewports ())
@@ -264,7 +262,7 @@ PrivateGLScreen::paintOutputRegion (const GLMatrix &transform,
vTransform = transform;
vTransform.translate (offXY.x (), offXY.y (), 0);
- gw->priv->clip.translate (-offXY.x (), -offXY. y());
+ gw->priv->clip.translate (-offXY.x (), -offXY. y ());
odMask |= PAINT_WINDOW_WITH_OFFSET_MASK;
status = gw->glPaint (gw->paintAttrib (), vTransform,
@@ -358,7 +356,7 @@ GLScreen::glEnableOutputClipping (const GLMatrix &transform,
const CompRegion &region,
CompOutput *output)
{
- WRAPABLE_HND_FUNC(3, glEnableOutputClipping, transform, region, output)
+ WRAPABLE_HND_FUNC (3, glEnableOutputClipping, transform, region, output)
GLdouble h = screen->height ();
@@ -397,7 +395,7 @@ GLScreen::glEnableOutputClipping (const GLMatrix &transform,
void
GLScreen::glDisableOutputClipping ()
{
- WRAPABLE_HND_FUNC(4, glDisableOutputClipping)
+ WRAPABLE_HND_FUNC (4, glDisableOutputClipping)
glDisable (GL_CLIP_PLANE0);
glDisable (GL_CLIP_PLANE1);
@@ -415,8 +413,8 @@ GLScreen::glPaintTransformedOutput (const GLScreenPaintAttrib &sAttrib,
CompOutput *output,
unsigned int mask)
{
- WRAPABLE_HND_FUNC(1, glPaintTransformedOutput, sAttrib, transform,
- region, output, mask)
+ WRAPABLE_HND_FUNC (1, glPaintTransformedOutput, sAttrib, transform,
+ region, output, mask)
GLMatrix sTransform = transform;
@@ -462,8 +460,8 @@ GLScreen::glPaintOutput (const GLScreenPaintAttrib &sAttrib,
CompOutput *output,
unsigned int mask)
{
- WRAPABLE_HND_FUNC_RETURN(0, bool, glPaintOutput, sAttrib, transform,
- region, output, mask)
+ WRAPABLE_HND_FUNC_RETURN (0, bool, glPaintOutput, sAttrib, transform,
+ region, output, mask)
GLMatrix sTransform = transform;
@@ -579,7 +577,7 @@ GLScreen::glPaintOutput (const GLScreenPaintAttrib &sAttrib,
void
GLWindow::glDrawGeometry ()
{
- WRAPABLE_HND_FUNC(4, glDrawGeometry)
+ WRAPABLE_HND_FUNC (4, glDrawGeometry)
int texUnit = priv->geometry.texUnits;
int currentTexUnit = 0;
@@ -624,7 +622,7 @@ GLWindow::glAddGeometry (const GLTexture::MatrixList &matrix,
const CompRegion &region,
const CompRegion &clip)
{
- WRAPABLE_HND_FUNC(2, glAddGeometry, matrix, region, clip)
+ WRAPABLE_HND_FUNC (2, glAddGeometry, matrix, region, clip)
BoxRec full;
int nMatrix = matrix.size ();
@@ -1064,7 +1062,7 @@ GLWindow::glDrawTexture (GLTexture *texture,
GLFragment::Attrib &attrib,
unsigned int mask)
{
- WRAPABLE_HND_FUNC(3, glDrawTexture, texture, attrib, mask)
+ WRAPABLE_HND_FUNC (3, glDrawTexture, texture, attrib, mask)
GLTexture::Filter filter;
@@ -1090,7 +1088,8 @@ GLWindow::glDraw (const GLMatrix &transform,
const CompRegion &region,
unsigned int mask)
{
- WRAPABLE_HND_FUNC_RETURN(1, bool, glDraw, transform, fragment, region, mask)
+ WRAPABLE_HND_FUNC_RETURN (1, bool, glDraw, transform,
+ fragment, region, mask)
const CompRegion reg = (mask & PAINT_WINDOW_TRANSFORMED_MASK) ?
infiniteRegion : region;
@@ -1108,7 +1107,7 @@ GLWindow::glDraw (const GLMatrix &transform,
mask |= PAINT_WINDOW_BLEND_MASK;
GLTexture::MatrixList ml (1);
-
+
if (priv->textures.size () == 1)
{
ml[0] = priv->matrices[0];
@@ -1140,7 +1139,7 @@ GLWindow::glPaint (const GLWindowPaintAttrib &attrib,
const CompRegion &region,
unsigned int mask)
{
- WRAPABLE_HND_FUNC_RETURN(0, bool, glPaint, attrib, transform, region, mask)
+ WRAPABLE_HND_FUNC_RETURN (0, bool, glPaint, attrib, transform, region, mask)
GLFragment::Attrib fragment (attrib);
bool status;
diff --git a/plugins/opengl/src/privates.h b/plugins/opengl/src/privates.h
index 0d39907..3aebaf0 100644
--- a/plugins/opengl/src/privates.h
+++ b/plugins/opengl/src/privates.h
@@ -42,7 +42,7 @@ class GLIcon
{
public:
GLIcon () : icon (NULL) {};
-
+
CompIcon *icon;
GLTexture::List textures;
};
@@ -135,7 +135,7 @@ class PrivateGLWindow :
void resizeNotify (int dx, int dy, int dwidth, int dheight);
void moveNotify (int dx, int dy, bool now);
void updateFrameRegion (CompRegion &region);
-
+
void setWindowMatrix ();
void updateWindowRegions ();
@@ -148,9 +148,9 @@ class PrivateGLWindow :
GLTexture::MatrixList matrices;
CompRegion::Vector regions;
bool updateReg;
-
+
CompRegion clip;
-
+
bool bindFailed;
bool overlayWindow;
diff --git a/plugins/opengl/src/screen.cpp b/plugins/opengl/src/screen.cpp
index e15dc84..37d1833 100644
--- a/plugins/opengl/src/screen.cpp
+++ b/plugins/opengl/src/screen.cpp
@@ -624,7 +624,7 @@ frustum (GLfloat *m,
c = -(farval + nearval) / ( farval - nearval);
d = -(2.0 * farval * nearval) / (farval - nearval);
-#define M(row,col) m[col*4+row]
+#define M(row,col) m[col * 4 + row]
M(0,0) = x; M(0,1) = 0.0f; M(0,2) = a; M(0,3) = 0.0f;
M(1,0) = 0.0f; M(1,1) = y; M(1,2) = b; M(1,3) = 0.0f;
M(2,0) = 0.0f; M(2,1) = 0.0f; M(2,2) = c; M(2,3) = d;
@@ -998,7 +998,7 @@ PrivateGLScreen::paintOutputs (CompOutput::ptrList &outputs,
r.height = output->height ();
if (lastViewport.x != r.x ||
- lastViewport.y != r.y ||
+ lastViewport.y != r.y ||
lastViewport.width != r.width ||
lastViewport.height != r.height)
{
@@ -1154,7 +1154,7 @@ GLScreen::defaultIcon ()
if (!i)
return NULL;
-
+
if (!i->width () || !i->height ())
return NULL;
diff --git a/plugins/opengl/src/texture.cpp b/plugins/opengl/src/texture.cpp
index 3e7b015..5728caa 100644
--- a/plugins/opengl/src/texture.cpp
+++ b/plugins/opengl/src/texture.cpp
@@ -296,6 +296,7 @@ PrivateTexture::loadImageData (const char *image,
rv[0] = t;
GLTexture::Matrix matrix = _identity_matrix;
+ CompOption *opt;
GLint internalFormat;
GLenum target;
bool mipmap;
@@ -324,9 +325,11 @@ PrivateTexture::loadImageData (const char *image,
glBindTexture (target, t->name ());
- internalFormat =
- (GLScreen::get(screen)->getOption ("texture_compression")->value ().b ()
- && GL::textureCompression ? GL_COMPRESSED_RGBA_ARB : GL_RGBA);
+ opt = GLScreen::get (screen)->getOption ("texture_compression");
+ if (opt->value ().b () && GL::textureCompression)
+ internalFormat = GL_COMPRESSED_RGBA_ARB;
+ else
+ internalFormat = GL_RGBA;
glTexImage2D (target, 0, internalFormat, width, height, 0,
format, type, image);
@@ -482,7 +485,7 @@ TfpTexture::bindPixmapToTexture (Pixmap pixmap,
else if (config->textureTargets & GLX_TEXTURE_RECTANGLE_BIT_EXT)
target = GLX_TEXTURE_RECTANGLE_EXT;
- /* Workaround for broken texture from pixmap implementations,
+ /* Workaround for broken texture from pixmap implementations,
that don't advertise any texture target in the fbconfig. */
if (!target)
{
diff --git a/plugins/opengl/src/window.cpp b/plugins/opengl/src/window.cpp
index 52a4488..c822b51 100644
--- a/plugins/opengl/src/window.cpp
+++ b/plugins/opengl/src/window.cpp
@@ -32,7 +32,7 @@ GLWindow::GLWindow (CompWindow *w) :
priv (new PrivateGLWindow (w, this))
{
CompositeWindow *cw = CompositeWindow::get (w);
-
+
priv->paint.opacity = cw->opacity ();
priv->paint.brightness = cw->brightness ();
priv->paint.saturation = cw->saturation ();
@@ -78,7 +78,7 @@ PrivateGLWindow::setWindowMatrix ()
{
if (textures.size () != matrices.size ())
matrices.resize (textures.size ());
-
+
for (unsigned int i = 0; i < textures.size (); i++)
{
matrices[i] = textures[i]->matrix ();
@@ -206,7 +206,6 @@ PrivateGLWindow::windowNotify (CompWindowNotify n)
break;
default:
break;
-
}
window->windowNotify (n);
@@ -321,7 +320,7 @@ GLWindow::getIcon (int width, int height)
foreach (GLIcon &icon, priv->icons)
if (icon.icon == i)
return icon.textures[0];
-
+
icon.icon = i;
icon.textures = GLTexture::imageBufferToTexture ((char *) i->data (), *i);
diff --git a/plugins/place/src/place.cpp b/plugins/place/src/place.cpp
index 6640950..33297a4 100644
--- a/plugins/place/src/place.cpp
+++ b/plugins/place/src/place.cpp
@@ -56,7 +56,7 @@ PlaceScreen::handleScreenSizeChange (int width,
{
if (!w->managed ())
continue;
-
+
if (w->wmType () & (CompWindowTypeDockMask |
CompWindowTypeDesktopMask))
continue;
@@ -85,7 +85,7 @@ PlaceScreen::handleScreenSizeChange (int width,
shiftX += width - x - extents.width ();
if (y + extents.height () > height)
shiftY += height - y - extents.height ();
-
+
if (shiftX)
{
mask |= CWX;
diff --git a/plugins/regex/src/regex.cpp b/plugins/regex/src/regex.cpp
index f906ce3..ae7fd56 100644
--- a/plugins/regex/src/regex.cpp
+++ b/plugins/regex/src/regex.cpp
@@ -51,7 +51,7 @@ class RegexExp : public CompMatch::Expression
Type type;
unsigned int flags;
} Prefix;
-
+
static const Prefix prefix[];
Type mType;
diff --git a/plugins/resize/src/resize.cpp b/plugins/resize/src/resize.cpp
index 25a9837..8ac3f1b 100644
--- a/plugins/resize/src/resize.cpp
+++ b/plugins/resize/src/resize.cpp
@@ -81,10 +81,10 @@ ResizeScreen::getStretchRectangle (BoxPtr pBox)
getPaintRectangle (&box);
ResizeWindow::get (w)->getStretchScale (&box, &xScale, &yScale);
- pBox->x1 = (int)(box.x1 - (w->output ().left - w->input ().left) * xScale);
- pBox->y1 = (int)(box.y1 - (w->output ().top - w->input ().top) * yScale);
- pBox->x2 = (int)(box.x2 + w->output ().right * xScale);
- pBox->y2 = (int)(box.y2 + w->output ().bottom * yScale);
+ pBox->x1 = (int) (box.x1 - (w->output ().left - w->input ().left) * xScale);
+ pBox->y1 = (int) (box.y1 - (w->output ().top - w->input ().top) * yScale);
+ pBox->x2 = (int) (box.x2 + w->output ().right * xScale);
+ pBox->y2 = (int) (box.y2 + w->output ().bottom * yScale);
}
void
@@ -170,7 +170,7 @@ ResizeScreen::updateWindowProperty ()
XChangeProperty (screen->dpy (), w->id (), resizeInformationAtom,
XA_CARDINAL, 32, PropModeReplace,
- (unsigned char*) data, 4);
+ (unsigned char*) data, 4);
}
void
@@ -204,7 +204,7 @@ resizeInitiate (CompAction *action,
RESIZE_SCREEN (screen);
CompWindow::Geometry server = w->serverGeometry ();
-
+
x = CompOption::getIntOptionNamed (options, "x", pointerX);
y = CompOption::getIntOptionNamed (options, "y", pointerY);
@@ -467,7 +467,7 @@ resizeTerminate (CompAction *action,
}
action->setState (action->state () & ~(CompAction::StateTermKey |
- CompAction::StateTermButton));
+ CompAction::StateTermButton));
return false;
}
@@ -787,7 +787,7 @@ ResizeScreen::handleEvent (XEvent *event)
CompOption::TypeInt));
o.push_back (CompOption ("button",
CompOption::TypeInt));
-
+
o[1].value ().set ((int) mods);
o[2].value ().set
((int) event->xclient.data.l[0]);
@@ -798,7 +798,7 @@ ResizeScreen::handleEvent (XEvent *event)
o[5].value ().set
((int) (event->xclient.data.l[3] ?
event->xclient.data.l[3] : -1));
-
+
resizeInitiate (&optionGetInitiateButton (),
CompAction::StateInitButton, o);
diff --git a/plugins/resize/src/resize.h b/plugins/resize/src/resize.h
index e2eee68..f04ac63 100644
--- a/plugins/resize/src/resize.h
+++ b/plugins/resize/src/resize.h
@@ -116,7 +116,7 @@ class ResizeScreen :
int pointerDx;
int pointerDy;
KeyCode key[NUM_KEYS];
-
+
CompScreen::GrabHandle grabIndex;
Cursor leftCursor;
@@ -140,7 +140,7 @@ class ResizeWindow :
public:
ResizeWindow (CompWindow *w);
~ResizeWindow ();
-
+
void resizeNotify (int, int, int, int);
bool damageRect (bool, const CompRect &);
@@ -150,9 +150,7 @@ class ResizeWindow :
void getStretchScale (BoxPtr pBox, float *xScale, float *yScale);
-
public:
-
CompWindow *window;
GLWindow *gWindow;
CompositeWindow *cWindow;
diff --git a/plugins/scale/include/scale/scale.h b/plugins/scale/include/scale/scale.h
index f31fe71..85d11c5 100644
--- a/plugins/scale/include/scale/scale.h
+++ b/plugins/scale/include/scale/scale.h
@@ -76,7 +76,7 @@ class ScaleScreen :
WRAPABLE_HND (0, ScaleScreenInterface, bool,
layoutSlotsAndAssignWindows)
-
+
friend class ScaleWindow;
friend class PrivateScaleScreen;
friend class PrivateScaleWindow;
@@ -112,11 +112,11 @@ class ScaleWindow :
WRAPABLE_HND (1, ScaleWindowInterface, bool, setScaledPaintAttributes,
GLWindowPaintAttrib &)
WRAPABLE_HND (2, ScaleWindowInterface, void, scaleSelectWindow)
-
+
friend class ScaleScreen;
friend class PrivateScaleScreen;
friend class PrivateScaleWindow;
-
+
private:
PrivateScaleWindow *priv;
};
diff --git a/plugins/scale/src/privates.h b/plugins/scale/src/privates.h
index a0e65c3..8ef94b0 100644
--- a/plugins/scale/src/privates.h
+++ b/plugins/scale/src/privates.h
@@ -169,16 +169,15 @@ class PrivateScaleWindow :
bool adjustScaleVelocity ();
static bool compareWindowsDistance (ScaleWindow *, ScaleWindow *);
-
- public:
+ public:
CompWindow *window;
CompositeWindow *cWindow;
GLWindow *gWindow;
ScaleWindow *sWindow;
ScaleScreen *sScreen;
PrivateScaleScreen *spScreen;
-
+
ScaleSlot *slot;
int sid;
diff --git a/plugins/scale/src/scale.cpp b/plugins/scale/src/scale.cpp
index 0615fd1..e3accee 100644
--- a/plugins/scale/src/scale.cpp
+++ b/plugins/scale/src/scale.cpp
@@ -38,11 +38,6 @@
#define EDGE_STATE (CompAction::StateInitEdge)
-#define WIN_X(w) ((w)->attrib.x - (w)->input.left)
-#define WIN_Y(w) ((w)->attrib.y - (w)->input.top)
-#define WIN_W(w) ((w)->width + (w)->input.left + (w)->input.right)
-#define WIN_H(w) ((w)->height + (w)->input.top + (w)->input.bottom)
-
class ScalePluginVTable :
public CompPlugin::VTableForScreenAndWindow<ScaleScreen, ScaleWindow>
{
@@ -134,7 +129,7 @@ ScaleWindow::scalePaintDecoration (const GLWindowPaintAttrib& attrib,
const CompRegion& region,
unsigned int mask)
{
- WRAPABLE_HND_FUNC(0, scalePaintDecoration, attrib, transform, region, mask)
+ WRAPABLE_HND_FUNC (0, scalePaintDecoration, attrib, transform, region, mask)
if (priv->spScreen->optionGetOverlayIcon () != ScaleOptions::OverlayIconNone)
{
@@ -230,12 +225,12 @@ ScaleWindow::scalePaintDecoration (const GLWindowPaintAttrib& attrib,
GLTexture::MatrixList ml (1);
ml[0] = icon->matrix ();
- priv->gWindow->geometry().reset ();
+ priv->gWindow->geometry ().reset ();
if (width && height)
priv->gWindow->glAddGeometry (ml, iconReg, iconReg);
- if (priv->gWindow->geometry().vCount)
+ if (priv->gWindow->geometry ().vCount)
{
GLFragment::Attrib fragment (sAttrib);
GLMatrix wTransform (transform);
@@ -285,7 +280,7 @@ ScaleWindow::setScaledPaintAttributes (GLWindowPaintAttrib& attrib)
attrib.brightness = attrib.brightness / 2;
}
- /* hide windows on the outputs used for scaling
+ /* hide windows on the outputs used for scaling
that are not in scale mode */
if (!priv->isNeverScaleWin ())
{
@@ -490,7 +485,7 @@ PrivateScaleScreen::layoutSlots ()
moMode = optionGetMultioutputMode ();
- /* if we have only one head, we don't need the
+ /* if we have only one head, we don't need the
additional effort of the all outputs mode */
if (screen->outputDevs ().size () == 1)
moMode = ScaleOptions::MultioutputModeOnCurrentOutputDevice;
@@ -950,7 +945,7 @@ PrivateScaleScreen::scaleTerminate (CompAction *action,
if (::screen->activeWindow () != ss->priv->previousActiveWindow)
{
CompWindow *w;
-
+
w = ::screen->findWindow (ss->priv->previousActiveWindow);
if (w)
w->moveInputFocusTo ();
@@ -1045,7 +1040,6 @@ PrivateScaleScreen::scaleInitiateCommon (CompAction *action,
if (match.isEmpty ())
match = optionGetWindowMatch ();
- /* TODO: match.update() ? */
currentMatch = match;
if (!layoutThumbs ())
@@ -1110,7 +1104,7 @@ ScaleWindowInterface::scaleSelectWindow ()
void
ScaleWindow::scaleSelectWindow ()
{
- WRAPABLE_HND_FUNC(2, scaleSelectWindow)
+ WRAPABLE_HND_FUNC (2, scaleSelectWindow)
if (priv->spScreen->selectedWindow != priv->window->id ())
{
@@ -1249,7 +1243,7 @@ ScaleScreen::relayoutSlots (const CompMatch& match)
priv->state = ScaleScreen::Out;
priv->moveFocusWindow (0, 0);
}
-
+
priv->cScreen->damageScreen ();
}
@@ -1314,7 +1308,7 @@ PrivateScaleScreen::hoverTimeout ()
o.push_back (CompOption ("root", CompOption::TypeInt));
o[0].value ().set ((int) screen->root ());
-
+
scaleTerminate (&optionGetInitiateEdge (), 0, o);
scaleTerminate (&optionGetInitiateKey (), 0, o);
}
diff --git a/plugins/switcher/src/switcher.cpp b/plugins/switcher/src/switcher.cpp
index e645d40..647c879 100644
--- a/plugins/switcher/src/switcher.cpp
+++ b/plugins/switcher/src/switcher.cpp
@@ -481,16 +481,12 @@ SwitchScreen::initiate (SwitchWindowSelection selection,
{
CompWindow *w;
-
w = screen->findWindow (popupWindow);
if (w && (w->state () & CompWindowStateHiddenMask))
- {
w->unminimize ();
- }
else
- {
XMapWindow (screen->dpy (), popupWindow);
- }
+
setSelectedWindowHint ();
}
@@ -669,7 +665,7 @@ SwitchScreen::windowRemove (Window id)
it++;
if (it == windows.end ())
selected = windows.front ()->id ();
- else
+ else
selected = (*it)->id ();
it--;
}
diff --git a/plugins/switcher/src/switcher.h b/plugins/switcher/src/switcher.h
index cb895a4..f9a53e6 100644
--- a/plugins/switcher/src/switcher.h
+++ b/plugins/switcher/src/switcher.h
@@ -60,7 +60,6 @@ class SwitchScreen :
public SwitcherOptions
{
public:
-
SwitchScreen (CompScreen *screen);
~SwitchScreen ();
diff --git a/plugins/water/src/water.cpp b/plugins/water/src/water.cpp
index 19b8330..08fffeb 100644
--- a/plugins/water/src/water.cpp
+++ b/plugins/water/src/water.cpp
@@ -310,7 +310,7 @@ WaterScreen::fboEpilogue ()
glLoadIdentity ();
glDepthRange (0, 1);
glViewport (-1, -1, 2, 2);
-
+
gScreen->resetRasterPos ();
gScreen->setDefaultViewport ();
@@ -868,7 +868,7 @@ WaterWindow::glDrawTexture (GLTexture *texture,
GL::programEnvParameter4f (GL_FRAGMENT_PROGRAM_ARB, param,
texture->matrix ().yy *
- wScreen->offsetScale,
+ wScreen->offsetScale,
-texture->matrix ().xx *
wScreen->offsetScale,
0.0f, 0.0f);
diff --git a/plugins/water/src/water.h b/plugins/water/src/water.h
index 4172034..567a0d3 100644
--- a/plugins/water/src/water.h
+++ b/plugins/water/src/water.h
@@ -73,7 +73,6 @@ class WaterScreen :
public WaterOptions
{
public:
-
WaterScreen (CompScreen *screen);
~WaterScreen ();
@@ -109,7 +108,7 @@ class WaterScreen :
bool wiperTimeout ();
void waterReset ();
-
+
void handleMotionEvent ();
CompositeScreen *cScreen;
diff --git a/plugins/zoom/src/zoom.h b/plugins/zoom/src/zoom.h
index 90e4449..e040da3 100644
--- a/plugins/zoom/src/zoom.h
+++ b/plugins/zoom/src/zoom.h
@@ -57,7 +57,7 @@ class ZoomScreen :
public ZoomOptions
{
public:
-
+
ZoomScreen (CompScreen *screen);
~ZoomScreen ();
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) ||