Fixed style errors
This commit is contained in:
parent
713bf29ec9
commit
68213d57c5
|
@ -206,7 +206,7 @@ static bool cmd_floating(struct sway_config *config, int argc, char **argv) {
|
||||||
if (!view->is_floating) {
|
if (!view->is_floating) {
|
||||||
// Remove view from its current location
|
// Remove view from its current location
|
||||||
destroy_container(remove_child(view));
|
destroy_container(remove_child(view));
|
||||||
|
|
||||||
// and move it into workspace floating
|
// and move it into workspace floating
|
||||||
add_floating(active_workspace,view);
|
add_floating(active_workspace,view);
|
||||||
view->x = (active_workspace->width - view->width)/2;
|
view->x = (active_workspace->width - view->width)/2;
|
||||||
|
@ -356,11 +356,9 @@ static bool cmd_move(struct sway_config *config, int argc, char **argv) {
|
||||||
move_container(view,&root_container,MOVE_UP);
|
move_container(view,&root_container,MOVE_UP);
|
||||||
} else if (strcasecmp(argv[0], "down") == 0) {
|
} else if (strcasecmp(argv[0], "down") == 0) {
|
||||||
move_container(view,&root_container,MOVE_DOWN);
|
move_container(view,&root_container,MOVE_DOWN);
|
||||||
} else
|
} else {
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -606,7 +604,7 @@ static struct cmd_handler handlers[] = {
|
||||||
{ "kill", cmd_kill },
|
{ "kill", cmd_kill },
|
||||||
{ "layout", cmd_layout },
|
{ "layout", cmd_layout },
|
||||||
{ "log_colors", cmd_log_colors },
|
{ "log_colors", cmd_log_colors },
|
||||||
{ "move",cmd_move},
|
{ "move", cmd_move},
|
||||||
{ "reload", cmd_reload },
|
{ "reload", cmd_reload },
|
||||||
{ "set", cmd_set },
|
{ "set", cmd_set },
|
||||||
{ "split", cmd_split },
|
{ "split", cmd_split },
|
||||||
|
|
|
@ -118,34 +118,34 @@ void move_container(swayc_t *container,swayc_t* root,enum movement_direction dir
|
||||||
//Rearrange
|
//Rearrange
|
||||||
for (i = 0; i < clength; ++i) {
|
for (i = 0; i < clength; ++i) {
|
||||||
swayc_t *child = root->children->items[i];
|
swayc_t *child = root->children->items[i];
|
||||||
if(child->handle == container->handle){
|
if (child->handle == container->handle){
|
||||||
if(clength == 1){
|
if (clength == 1){
|
||||||
//Only one container, meh.
|
//Only one container, meh.
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(direction == MOVE_LEFT && i > 0){
|
if (direction == MOVE_LEFT && i > 0){
|
||||||
temp = root->children->items[i-1];
|
temp = root->children->items[i-1];
|
||||||
root->children->items[i] = temp;
|
root->children->items[i] = temp;
|
||||||
root->children->items[i-1] = container;
|
root->children->items[i-1] = container;
|
||||||
arrange_windows(&root_container,-1,-1);
|
arrange_windows(&root_container,-1,-1);
|
||||||
}
|
}
|
||||||
else if(direction == MOVE_RIGHT && i < clength-1){
|
else if (direction == MOVE_RIGHT && i < clength-1){
|
||||||
temp = root->children->items[i+1];
|
temp = root->children->items[i+1];
|
||||||
root->children->items[i] = temp;
|
root->children->items[i] = temp;
|
||||||
root->children->items[i+1] = container;
|
root->children->items[i+1] = container;
|
||||||
arrange_windows(&root_container,-1,-1);
|
arrange_windows(&root_container,-1,-1);
|
||||||
|
|
||||||
}
|
}
|
||||||
else if(direction == MOVE_UP){
|
else if (direction == MOVE_UP){
|
||||||
sway_log(L_INFO, "Moving up not implemented");
|
sway_log(L_INFO, "Moving up not implemented");
|
||||||
}
|
}
|
||||||
else if(direction == MOVE_DOWN){
|
else if (direction == MOVE_DOWN){
|
||||||
sway_log(L_INFO, "Moving down not implemented");
|
sway_log(L_INFO, "Moving down not implemented");
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if(child->children != NULL){
|
else if (child->children != NULL){
|
||||||
move_container(container,child,direction);
|
move_container(container,child,direction);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue