aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Half-Shot <half-shot@molrams.com>2015-08-20 22:29:36 +0100
committerLibravatar Half-Shot <half-shot@molrams.com>2015-08-20 22:29:36 +0100
commit68213d57c5c758d05582ef8a9f0db226ddbaefc7 (patch)
treee177cdcf8066e7e55b5698b44c7d959af9aff247
parentFew stray bits (diff)
downloadsway-68213d57c5c758d05582ef8a9f0db226ddbaefc7.tar.gz
sway-68213d57c5c758d05582ef8a9f0db226ddbaefc7.tar.zst
sway-68213d57c5c758d05582ef8a9f0db226ddbaefc7.zip
Fixed style errors
-rw-r--r--sway/commands.c8
-rw-r--r--sway/layout.c14
2 files changed, 10 insertions, 12 deletions
diff --git a/sway/commands.c b/sway/commands.c
index 5d79104f..af4cd56f 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -206,7 +206,7 @@ static bool cmd_floating(struct sway_config *config, int argc, char **argv) {
206 if (!view->is_floating) { 206 if (!view->is_floating) {
207 // Remove view from its current location 207 // Remove view from its current location
208 destroy_container(remove_child(view)); 208 destroy_container(remove_child(view));
209 209
210 // and move it into workspace floating 210 // and move it into workspace floating
211 add_floating(active_workspace,view); 211 add_floating(active_workspace,view);
212 view->x = (active_workspace->width - view->width)/2; 212 view->x = (active_workspace->width - view->width)/2;
@@ -356,11 +356,9 @@ static bool cmd_move(struct sway_config *config, int argc, char **argv) {
356 move_container(view,&root_container,MOVE_UP); 356 move_container(view,&root_container,MOVE_UP);
357 } else if (strcasecmp(argv[0], "down") == 0) { 357 } else if (strcasecmp(argv[0], "down") == 0) {
358 move_container(view,&root_container,MOVE_DOWN); 358 move_container(view,&root_container,MOVE_DOWN);
359 } else 359 } else {
360 {
361 return false; 360 return false;
362 } 361 }
363
364 return true; 362 return true;
365} 363}
366 364
@@ -606,7 +604,7 @@ static struct cmd_handler handlers[] = {
606 { "kill", cmd_kill }, 604 { "kill", cmd_kill },
607 { "layout", cmd_layout }, 605 { "layout", cmd_layout },
608 { "log_colors", cmd_log_colors }, 606 { "log_colors", cmd_log_colors },
609 { "move",cmd_move}, 607 { "move", cmd_move},
610 { "reload", cmd_reload }, 608 { "reload", cmd_reload },
611 { "set", cmd_set }, 609 { "set", cmd_set },
612 { "split", cmd_split }, 610 { "split", cmd_split },
diff --git a/sway/layout.c b/sway/layout.c
index 0c1f736d..a7536727 100644
--- a/sway/layout.c
+++ b/sway/layout.c
@@ -118,34 +118,34 @@ void move_container(swayc_t *container,swayc_t* root,enum movement_direction dir
118 //Rearrange 118 //Rearrange
119 for (i = 0; i < clength; ++i) { 119 for (i = 0; i < clength; ++i) {
120 swayc_t *child = root->children->items[i]; 120 swayc_t *child = root->children->items[i];
121 if(child->handle == container->handle){ 121 if (child->handle == container->handle){
122 if(clength == 1){ 122 if (clength == 1){
123 //Only one container, meh. 123 //Only one container, meh.
124 break; 124 break;
125 } 125 }
126 if(direction == MOVE_LEFT && i > 0){ 126 if (direction == MOVE_LEFT && i > 0){
127 temp = root->children->items[i-1]; 127 temp = root->children->items[i-1];
128 root->children->items[i] = temp; 128 root->children->items[i] = temp;
129 root->children->items[i-1] = container; 129 root->children->items[i-1] = container;
130 arrange_windows(&root_container,-1,-1); 130 arrange_windows(&root_container,-1,-1);
131 } 131 }
132 else if(direction == MOVE_RIGHT && i < clength-1){ 132 else if (direction == MOVE_RIGHT && i < clength-1){
133 temp = root->children->items[i+1]; 133 temp = root->children->items[i+1];
134 root->children->items[i] = temp; 134 root->children->items[i] = temp;
135 root->children->items[i+1] = container; 135 root->children->items[i+1] = container;
136 arrange_windows(&root_container,-1,-1); 136 arrange_windows(&root_container,-1,-1);
137 137
138 } 138 }
139 else if(direction == MOVE_UP){ 139 else if (direction == MOVE_UP){
140 sway_log(L_INFO, "Moving up not implemented"); 140 sway_log(L_INFO, "Moving up not implemented");
141 } 141 }
142 else if(direction == MOVE_DOWN){ 142 else if (direction == MOVE_DOWN){
143 sway_log(L_INFO, "Moving down not implemented"); 143 sway_log(L_INFO, "Moving down not implemented");
144 } 144 }
145 145
146 break; 146 break;
147 } 147 }
148 else if(child->children != NULL){ 148 else if (child->children != NULL){
149 move_container(container,child,direction); 149 move_container(container,child,direction);
150 } 150 }
151 } 151 }