changeset 58:27fe66ab381f

Raise.c: clang-format, c style
author ng0@n0.is
date Fri, 03 May 2019 21:13:40 +0000
parents 0c71b3505f6e
children 71d7a5e06997
files Raise.c
diffstat 1 files changed, 46 insertions(+), 31 deletions(-) [+]
line wrap: on
line diff
--- a/Raise.c	Fri May 03 21:11:08 2019 +0000
+++ b/Raise.c	Fri May 03 21:13:40 2019 +0000
@@ -39,7 +39,7 @@
  * SOFTWARE.
  */
 
- 
+
 /*
  * MODIFICATION HISTORY
  *
@@ -49,42 +49,57 @@
  * 002 -- Loretta Guarino Reid, DEC Ultrix Engineering Group
  *  Western Software Lab. Convert to X11.
  */
- 
+
 #ifndef lint
 static char *sccsid = "@(#)Raise.c	3.8	1/24/86";
 #endif
- 
+
 #include "uwm.h"
 #include <stdbool.h>
 
-bool Raise(window, mask, button, x, y)
-Window window;                          /* Event window. */
-int mask;                               /* Button/key mask. */
-int button;                           /* Button event detail. */
-int x, y;                               /* Event mouse position. */
- 
+/*
+ * Window window: Event window.
+ * int mask: Button/key mask.
+ * int button: Button event detail.
+ * int x, y: Event mouse position.
+ */
+bool
+Raise (Window window, int mask, int button, int x, int y)
 {
-XWindowAttributes winfo;			/* Window details for warp */
-int status;
- 
-    /*
-     * If the window is not the root window, raise the window and return.
-     */
-    if (window != RootWindow(dpy, scr)) {
-        XRaiseWindow(dpy, window);
-	/*
-	 * Optionally warp the mouse to the upper left corner of the window.
-	 */
-	if (WarpOnRaise) {
-	    status = XGetWindowAttributes (dpy, window, &winfo);
-            if (status == FAILURE) return(FALSE);
- 
-	    status = XWarpPointer (dpy, None, window, 
-	    		 0, 0, 0, 0,
-			 winfo.width >= 7 ? winfo.width - 7 : winfo.width / 2,
-                         winfo.height >= 10 ? 10 : winfo.height / 2);
-            if (status == FAILURE) return(FALSE);
+        XWindowAttributes winfo; /* Window details for warp */
+        int status;
+
+        /*
+         * If the window is not the root window, raise the window and return.
+         */
+        if (window != RootWindow (dpy, scr))
+        {
+                XRaiseWindow (dpy, window);
+                /*
+                 * Optionally warp the mouse to the upper left corner of the
+                 * window.
+                 */
+                if (WarpOnRaise)
+                {
+                        status = XGetWindowAttributes (dpy, window, &winfo);
+                        if (status == FAILURE)
+                                return (FALSE);
+
+                        status =
+                          XWarpPointer (dpy,
+                                        None,
+                                        window,
+                                        0,
+                                        0,
+                                        0,
+                                        0,
+                                        winfo.width >= 7 ? winfo.width - 7
+                                                         : winfo.width / 2,
+                                        winfo.height >= 10 ? 10
+                                                           : winfo.height / 2);
+                        if (status == FAILURE)
+                                return (FALSE);
+                }
         }
-    }
-    return(FALSE);
+        return (FALSE);
 }