From fa5de2876e3e8db4966d3404f01ba9600204d75b Mon Sep 17 00:00:00 2001
From: Ryan Dwyer <ryandwyer1@gmail.com>
Date: Tue, 1 May 2018 17:36:12 +1000
Subject: [PATCH] Move docblock and fix indenting of switch/case.

---
 include/sway/tree/view.h |  4 ++++
 sway/tree/view.c         | 42 ++++++++++++++++++----------------------
 2 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h
index 352a62bc..4395e94a 100644
--- a/include/sway/tree/view.h
+++ b/include/sway/tree/view.h
@@ -167,6 +167,10 @@ const char *view_get_instance(struct sway_view *view);
 void view_configure(struct sway_view *view, double ox, double oy, int width,
 	int height);
 
+/**
+ * Configure the view's position and size based on the swayc's position and
+ * size, taking borders into consideration.
+ */
 void view_autoconfigure(struct sway_view *view);
 
 void view_set_activated(struct sway_view *view, bool activated);
diff --git a/sway/tree/view.c b/sway/tree/view.c
index 26902c23..4903b3a4 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -74,10 +74,6 @@ void view_configure(struct sway_view *view, double ox, double oy, int width,
 	}
 }
 
-/**
- * Configure the view's position and size based on the swayc's position and
- * size, taking borders into consideration.
- */
 void view_autoconfigure(struct sway_view *view) {
 	if (!sway_assert(view->swayc,
 				"Called view_autoconfigure() on a view without a swayc")) {
@@ -93,25 +89,25 @@ void view_autoconfigure(struct sway_view *view) {
 
 	double x, y, width, height;
 	switch (view->border) {
-		case B_NONE:
-			x = view->swayc->x;
-			y = view->swayc->y;
-			width = view->swayc->width;
-			height = view->swayc->height;
-			break;
-		case B_PIXEL:
-			x = view->swayc->x + view->border_thickness;
-			y = view->swayc->y + view->border_thickness;
-			width = view->swayc->width - view->border_thickness * 2;
-			height = view->swayc->height - view->border_thickness * 2;
-			break;
-		case B_NORMAL:
-			// TODO: Size the title bar by checking the font
-			x = view->swayc->x + view->border_thickness;
-			y = view->swayc->y + 20;
-			width = view->swayc->width - view->border_thickness * 2;
-			height = view->swayc->height - view->border_thickness - 20;
-			break;
+	case B_NONE:
+		x = view->swayc->x;
+		y = view->swayc->y;
+		width = view->swayc->width;
+		height = view->swayc->height;
+		break;
+	case B_PIXEL:
+		x = view->swayc->x + view->border_thickness;
+		y = view->swayc->y + view->border_thickness;
+		width = view->swayc->width - view->border_thickness * 2;
+		height = view->swayc->height - view->border_thickness * 2;
+		break;
+	case B_NORMAL:
+		// TODO: Size the title bar by checking the font
+		x = view->swayc->x + view->border_thickness;
+		y = view->swayc->y + 20;
+		width = view->swayc->width - view->border_thickness * 2;
+		height = view->swayc->height - view->border_thickness - 20;
+		break;
 	}
 
 	view->x = x;