aboutsummaryrefslogtreecommitdiff
path: root/src/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.c')
-rw-r--r--src/client.c144
1 files changed, 108 insertions, 36 deletions
diff --git a/src/client.c b/src/client.c
index 14c214c..df66b5b 100644
--- a/src/client.c
+++ b/src/client.c
@@ -44,11 +44,15 @@ static void RestoreTransients(ClientNode *np, int raise);
static void KillClientHandler(ClientNode *np);
/** Initialize client data. */
-void InitializeClients() {
+void
+InitializeClients()
+{
}
/** Load windows that are already mapped. */
-void StartupClients() {
+void
+StartupClients()
+{
XWindowAttributes attr;
Window rootReturn, parentReturn, *childrenReturn;
@@ -89,7 +93,9 @@ void StartupClients() {
}
/** Release client windows. */
-void ShutdownClients() {
+void
+ShutdownClients()
+{
int x;
@@ -102,11 +108,15 @@ void ShutdownClients() {
}
/** Destroy client data. */
-void DestroyClients() {
+void
+DestroyClients()
+{
}
/** Set the focus to the window currently under the mouse pointer. */
-void LoadFocus() {
+void
+LoadFocus()
+{
ClientNode *np;
Window rootReturn, childReturn;
@@ -261,7 +271,9 @@ ClientNode *AddClientWindow(Window w, int alreadyMapped, int notOwner) {
}
/** Minimize a client window and all of its transients. */
-void MinimizeClient(ClientNode *np) {
+void
+MinimizeClient(ClientNode *np)
+{
Assert(np);
@@ -277,7 +289,9 @@ void MinimizeClient(ClientNode *np) {
}
/** Minimize all transients as well as the specified client. */
-void MinimizeTransients(ClientNode *np) {
+void
+MinimizeTransients(ClientNode *np)
+{
ClientNode *tp;
int x;
@@ -313,7 +327,9 @@ void MinimizeTransients(ClientNode *np) {
}
/** Shade a client. */
-void ShadeClient(ClientNode *np) {
+void
+ShadeClient(ClientNode *np)
+{
int north, south, east, west;
@@ -347,7 +363,9 @@ void ShadeClient(ClientNode *np) {
}
/** Unshade a client. */
-void UnshadeClient(ClientNode *np) {
+void
+UnshadeClient(ClientNode *np)
+{
int bsize;
@@ -385,7 +403,9 @@ void UnshadeClient(ClientNode *np) {
}
/** Set a client's state to withdrawn. */
-void SetClientWithdrawn(ClientNode *np) {
+void
+SetClientWithdrawn(ClientNode *np)
+{
Assert(np);
@@ -415,7 +435,9 @@ void SetClientWithdrawn(ClientNode *np) {
}
/** Restore a window with its transients (helper method). */
-void RestoreTransients(ClientNode *np, int raise) {
+void
+RestoreTransients(ClientNode *np, int raise)
+{
ClientNode *tp;
int x;
@@ -455,7 +477,9 @@ void RestoreTransients(ClientNode *np, int raise) {
}
/** Restore a client window and its transients. */
-void RestoreClient(ClientNode *np, int raise) {
+void
+RestoreClient(ClientNode *np, int raise)
+{
Assert(np);
@@ -468,7 +492,9 @@ void RestoreClient(ClientNode *np, int raise) {
}
/** Set the client layer. This will affect transients. */
-void SetClientLayer(ClientNode *np, unsigned int layer) {
+void
+SetClientLayer(ClientNode *np, unsigned int layer)
+{
ClientNode *tp, *next;
int x;
@@ -532,7 +558,9 @@ void SetClientLayer(ClientNode *np, unsigned int layer) {
}
/** Set a client's sticky status. This will update transients. */
-void SetClientSticky(ClientNode *np, int isSticky) {
+void
+SetClientSticky(ClientNode *np, int isSticky)
+{
ClientNode *tp;
int old;
@@ -585,7 +613,9 @@ void SetClientSticky(ClientNode *np, int isSticky) {
}
/** Set a client's desktop. This will update transients. */
-void SetClientDesktop(ClientNode *np, unsigned int desktop) {
+void
+SetClientDesktop(ClientNode *np, unsigned int desktop)
+{
ClientNode *tp;
int x;
@@ -621,7 +651,9 @@ void SetClientDesktop(ClientNode *np, unsigned int desktop) {
}
/** Hide a client without unmapping. This will NOT update transients. */
-void HideClient(ClientNode *np) {
+void
+HideClient(ClientNode *np)
+{
Assert(np);
@@ -636,7 +668,9 @@ void HideClient(ClientNode *np) {
}
/** Show a hidden client. This will NOT update transients. */
-void ShowClient(ClientNode *np) {
+void
+ShowClient(ClientNode *np)
+{
Assert(np);
@@ -653,7 +687,9 @@ void ShowClient(ClientNode *np) {
}
/** Maximize a client window. */
-void MaximizeClient(ClientNode *np) {
+void
+MaximizeClient(ClientNode *np)
+{
int north, south, east, west;
@@ -693,7 +729,9 @@ void MaximizeClient(ClientNode *np) {
}
/** Set a client's full screen state. */
-void SetClientFullScreen(ClientNode *np, int fullScreen) {
+void
+SetClientFullScreen(ClientNode *np, int fullScreen)
+{
XEvent event;
int north, south, east, west;
@@ -752,7 +790,9 @@ void SetClientFullScreen(ClientNode *np, int fullScreen) {
}
/** Set the active client. */
-void FocusClient(ClientNode *np) {
+void
+FocusClient(ClientNode *np)
+{
Assert(np);
@@ -791,7 +831,9 @@ void FocusClient(ClientNode *np) {
}
/** Focus the next client in the stacking order. */
-void FocusNextStacked(ClientNode *np) {
+void
+FocusNextStacked(ClientNode *np)
+{
int x;
ClientNode *tp;
@@ -818,7 +860,9 @@ void FocusNextStacked(ClientNode *np) {
}
/** Refocus the active client (if there is one). */
-void RefocusClient() {
+void
+RefocusClient()
+{
if(activeClient) {
FocusClient(activeClient);
@@ -827,7 +871,9 @@ void RefocusClient() {
}
/** Send a delete message to a client. */
-void DeleteClient(ClientNode *np) {
+void
+DeleteClient(ClientNode *np)
+{
ClientProtocolType protocols;
@@ -844,7 +890,9 @@ void DeleteClient(ClientNode *np) {
}
/** Callback to kill a client after a confirm dialog. */
-void KillClientHandler(ClientNode *np) {
+void
+KillClientHandler(ClientNode *np)
+{
Assert(np);
@@ -865,7 +913,9 @@ void KillClientHandler(ClientNode *np) {
}
/** Kill a client window. */
-void KillClient(ClientNode *np) {
+void
+KillClient(ClientNode *np)
+{
Assert(np);
@@ -876,7 +926,9 @@ void KillClient(ClientNode *np) {
}
/** Move the cursor to the middle of the client. **/
-void MoveMouseToClient(ClientNode *np) {
+void
+MoveMouseToClient(ClientNode *np)
+{
int height, width, x, y;
@@ -898,7 +950,9 @@ void MoveMouseToClient(ClientNode *np) {
}
/** Raise the client. This will affect transients. */
-void RaiseClient(ClientNode *np) {
+void
+RaiseClient(ClientNode *np)
+{
ClientNode *tp, *next;
int x;
@@ -956,7 +1010,9 @@ void RaiseClient(ClientNode *np) {
}
/** Lower the client. This will not affect transients. */
-void LowerClient(ClientNode *np) {
+void
+LowerClient(ClientNode *np)
+{
ClientNode *tp;
@@ -988,7 +1044,9 @@ void LowerClient(ClientNode *np) {
}
/** Restack the clients according the way we want them. */
-void RestackClients() {
+void
+RestackClients()
+{
TrayType *tp;
ClientNode *np;
@@ -1039,7 +1097,9 @@ void RestackClients() {
}
/** Send a client message to a window. */
-void SendClientMessage(Window w, AtomType type, AtomType message) {
+void
+SendClientMessage(Window w, AtomType type, AtomType message)
+{
XEvent event;
int status;
@@ -1061,7 +1121,9 @@ void SendClientMessage(Window w, AtomType type, AtomType message) {
/** Set the border shape for windows using the shape extension. */
#ifdef USE_SHAPE
-void SetShape(ClientNode *np) {
+void
+SetShape(ClientNode *np)
+{
XRectangle rect[4];
int north, south, east, west;
@@ -1126,7 +1188,9 @@ void SetShape(ClientNode *np) {
#endif /* USE_SHAPE */
/** Remove a client window from management. */
-void RemoveClient(ClientNode *np) {
+void
+RemoveClient(ClientNode *np)
+{
ColormapNode *cp;
@@ -1248,7 +1312,9 @@ ClientNode *FindClientByParent(Window p) {
}
/** Reparent a client window. */
-void ReparentClient(ClientNode *np, int notOwner) {
+void
+ReparentClient(ClientNode *np, int notOwner)
+{
XSetWindowAttributes attr;
int attrMask;
@@ -1352,7 +1418,9 @@ void ReparentClient(ClientNode *np, int notOwner) {
/** Determine if a window uses the shape extension. */
#ifdef USE_SHAPE
-void CheckShape(ClientNode *np) {
+void
+CheckShape(ClientNode *np)
+{
int xb, yb;
int xc, yc;
@@ -1371,7 +1439,9 @@ void CheckShape(ClientNode *np) {
#endif
/** Send a configure event to a client window. */
-void SendConfigureEvent(ClientNode *np) {
+void
+SendConfigureEvent(ClientNode *np)
+{
XConfigureEvent event;
const ScreenType *sp;
@@ -1409,7 +1479,9 @@ void SendConfigureEvent(ClientNode *np) {
* client changed. This will change the active colormap(s) if the given
* client is active.
*/
-void UpdateClientColormap(ClientNode *np) {
+void
+UpdateClientColormap(ClientNode *np)
+{
XWindowAttributes attr;
ColormapNode *cp;