summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2007-08-05 19:30:46 +0200
committerDanny Baumann <dannybaumann@web.de>2007-08-05 19:30:46 +0200
commitc7b1987c142369731963cb25549dbf941873e7c2 (patch)
treecc8c1bcc96eea52ec5e7257d383846fed9c8f354
parent43b9b2b60b02076e058b56c961b1890f8f9e0566 (diff)
downloadextrawm-c7b1987c142369731963cb25549dbf941873e7c2.tar.gz
extrawm-c7b1987c142369731963cb25549dbf941873e7c2.tar.bz2
Compiz indention.
-rw-r--r--extrawm.c253
1 files changed, 125 insertions, 128 deletions
diff --git a/extrawm.c b/extrawm.c
index aec2ba8..057d39f 100644
--- a/extrawm.c
+++ b/extrawm.c
@@ -25,193 +25,190 @@
#include <compiz.h>
#include "extrawm_options.h"
-
static Bool
-activateWin (CompDisplay * d,
- CompAction * action,
+activateWin (CompDisplay *d,
+ CompAction *action,
CompActionState state,
- CompOption * option,
- int nOption)
+ CompOption *option,
+ int nOption)
{
- CompWindow *w;
- Window xid;
-
- xid = getIntOptionNamed(option, nOption, "window", 0);
+ CompWindow *w;
+ Window xid;
- w = findWindowAtDisplay(d, xid);
- if (w)
- sendWindowActivationRequest(w->screen, w->id);
+ xid = getIntOptionNamed (option, nOption, "window", 0);
+ w = findWindowAtDisplay (d, xid);
+ if (w)
+ sendWindowActivationRequest (w->screen, w->id);
- return TRUE;
+ return TRUE;
}
static void
-fullscreenWindow (CompWindow * w,
- int state)
+fullscreenWindow (CompWindow *w,
+ int state)
{
- unsigned int newState = w->state;
+ unsigned int newState = w->state;
- if (w->attrib.override_redirect)
- return;
+ if (w->attrib.override_redirect)
+ return;
- /* It would be a bug, to put a shaded window to fullscreen. */
- if (w->shaded)
- return;
+ /* It would be a bug, to put a shaded window to fullscreen. */
+ if (w->shaded)
+ return;
- state = constrainWindowState(state, w->actions);
- state &= CompWindowStateFullscreenMask;
+ state = constrainWindowState (state, w->actions);
+ state &= CompWindowStateFullscreenMask;
- if (state == (w->state & CompWindowStateFullscreenMask))
- return;
+ if (state == (w->state & CompWindowStateFullscreenMask))
+ return;
- newState &= ~CompWindowStateFullscreenMask;
- newState |= state;
+ newState &= ~CompWindowStateFullscreenMask;
+ newState |= state;
- changeWindowState(w, newState);
- recalcWindowType(w);
- recalcWindowActions(w);
- updateWindowAttributes(w, CompStackingUpdateModeNormal);
+ changeWindowState (w, newState);
+ recalcWindowType (w);
+ recalcWindowActions (w);
+ updateWindowAttributes (w, CompStackingUpdateModeNormal);
}
static Bool
-toggleFullscreen (CompDisplay * d,
- CompAction * action,
+toggleFullscreen (CompDisplay *d,
+ CompAction *action,
CompActionState state,
- CompOption * option,
- int nOption)
+ CompOption *option,
+ int nOption)
{
- CompWindow *w;
- Window xid;
+ CompWindow *w;
+ Window xid;
- xid = getIntOptionNamed(option, nOption, "window", 0);
+ xid = getIntOptionNamed (option, nOption, "window", 0);
- w = findTopLevelWindowAtDisplay(d, xid);
- if (w && (w->actions & CompWindowActionFullscreenMask))
- fullscreenWindow(w, w->state ^ CompWindowStateFullscreenMask);
+ w = findTopLevelWindowAtDisplay (d, xid);
+ if (w && (w->actions & CompWindowActionFullscreenMask))
+ fullscreenWindow (w, w->state ^ CompWindowStateFullscreenMask);
- return TRUE;
+ return TRUE;
}
static Bool
-toggleRedirect (CompDisplay * d,
- CompAction * action,
+toggleRedirect (CompDisplay *d,
+ CompAction *action,
CompActionState state,
- CompOption * option,
- int nOption)
+ CompOption *option,
+ int nOption)
{
- CompWindow *w;
- Window xid;
-
- xid = getIntOptionNamed(option, nOption, "window", 0);
-
- w = findTopLevelWindowAtDisplay(d, xid);
- if (w)
- {
- if (w->redirected)
- unredirectWindow(w);
- else
- redirectWindow(w);
- }
-
- return TRUE;
+ CompWindow *w;
+ Window xid;
+
+ xid = getIntOptionNamed (option, nOption, "window", 0);
+ w = findTopLevelWindowAtDisplay (d, xid);
+ if (w)
+ {
+ if (w->redirected)
+ unredirectWindow (w);
+ else
+ redirectWindow (w);
+ }
+
+ return TRUE;
}
static Bool
-toggleAlwaysOnTop (CompDisplay * d,
- CompAction * action,
+toggleAlwaysOnTop (CompDisplay *d,
+ CompAction *action,
CompActionState state,
- CompOption * option,
- int nOption)
+ CompOption *option,
+ int nOption)
{
- CompWindow *w;
- Window xid;
-
- xid = getIntOptionNamed(option, nOption, "window", 0);
-
- w = findTopLevelWindowAtDisplay(d, xid);
- if (w)
- {
- unsigned int newState;
- newState = w->state ^ CompWindowStateAboveMask;
- changeWindowState (w, newState);
- updateWindowAttributes (w, CompStackingUpdateModeNormal);
- }
-
- return TRUE;
+ CompWindow *w;
+ Window xid;
+
+ xid = getIntOptionNamed (option, nOption, "window", 0);
+ w = findTopLevelWindowAtDisplay (d, xid);
+ if (w)
+ {
+ unsigned int newState;
+ newState = w->state ^ CompWindowStateAboveMask;
+ changeWindowState (w, newState);
+ updateWindowAttributes (w, CompStackingUpdateModeNormal);
+ }
+
+ return TRUE;
}
static Bool
-toggleSticky (CompDisplay * d,
- CompAction * action,
+toggleSticky (CompDisplay *d,
+ CompAction *action,
CompActionState state,
- CompOption * option,
- int nOption)
+ CompOption *option,
+ int nOption)
{
- CompWindow *w;
- Window xid;
-
- xid = getIntOptionNamed(option, nOption, "window", 0);
-
- w = findTopLevelWindowAtDisplay(d, xid);
- if (w && (w->actions & CompWindowActionStickMask))
- {
- unsigned int newState;
- newState = w->state ^ CompWindowStateStickyMask;
- changeWindowState(w, newState);
- }
-
- return TRUE;
+ CompWindow *w;
+ Window xid;
+
+ xid = getIntOptionNamed (option, nOption, "window", 0);
+ w = findTopLevelWindowAtDisplay (d, xid);
+ if (w && (w->actions & CompWindowActionStickMask))
+ {
+ unsigned int newState;
+ newState = w->state ^ CompWindowStateStickyMask;
+ changeWindowState (w, newState);
+ }
+
+ return TRUE;
}
static Bool
-extraWMInit(CompPlugin * p)
+extraWMInit (CompPlugin *p)
{
- return TRUE;
+ return TRUE;
}
static void
-extraWMFini(CompPlugin * p)
+extraWMFini (CompPlugin *p)
{
}
static Bool
-extraWMInitDisplay (CompPlugin *p,
+extraWMInitDisplay (CompPlugin *p,
CompDisplay *d)
{
- extrawmSetToggleRedirectInitiate (d, toggleRedirect);
- extrawmSetToggleAlwaysOnTopInitiate (d, toggleAlwaysOnTop);
- extrawmSetToggleStickyInitiate (d, toggleSticky);
- extrawmSetToggleFullscreenInitiate (d, toggleFullscreen);
- extrawmSetActivateInitiate (d, activateWin);
+ extrawmSetToggleRedirectInitiate (d, toggleRedirect);
+ extrawmSetToggleAlwaysOnTopInitiate (d, toggleAlwaysOnTop);
+ extrawmSetToggleStickyInitiate (d, toggleSticky);
+ extrawmSetToggleFullscreenInitiate (d, toggleFullscreen);
+ extrawmSetActivateInitiate (d, activateWin);
- return TRUE;
+ return TRUE;
}
-static int extraWMGetVersion (CompPlugin * p,
- int version)
+static int
+extraWMGetVersion (CompPlugin *p,
+ int version)
{
- return ABIVERSION;
+ return ABIVERSION;
}
CompPluginVTable extraWMVTable = {
- "extrawm",
- extraWMGetVersion,
- 0,
- extraWMInit,
- extraWMFini,
- extraWMInitDisplay,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0
+ "extrawm",
+ extraWMGetVersion,
+ 0,
+ extraWMInit,
+ extraWMFini,
+ extraWMInitDisplay,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0
};
-CompPluginVTable *getCompPluginInfo(void)
+CompPluginVTable*
+getCompPluginInfo (void)
{
- return &extraWMVTable;
+ return &extraWMVTable;
}