diff options
| author | Drew DeVault <sir@cmpwn.com> | 2018-04-06 16:16:05 -0400 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-04-06 16:16:05 -0400 | 
| commit | 5c31b06d88135a62bd917a61e770c8219f6d5d72 (patch) | |
| tree | 4323a9130346ca4d836b0ae70c03877e13310bfc /sway/commands | |
| parent | 656ef558a2a8d55cf77cbcc8ce01c861cb78ac97 (diff) | |
| parent | 640232eb225058a18f20190235f679caf678e1f7 (diff) | |
| download | sway-5c31b06d88135a62bd917a61e770c8219f6d5d72.tar.xz | |
Merge pull request #1758 from swaywm/revert-1757-boooooooxes
Revert "Break everything^W^WUse wlr_box for sway_container"
Diffstat (limited to 'sway/commands')
| -rw-r--r-- | sway/commands/layout.c | 2 | ||||
| -rw-r--r-- | sway/commands/move.c | 7 | ||||
| -rw-r--r-- | sway/commands/resize.c | 8 | 
3 files changed, 8 insertions, 9 deletions
diff --git a/sway/commands/layout.c b/sway/commands/layout.c index 162173c5..4c49a627 100644 --- a/sway/commands/layout.c +++ b/sway/commands/layout.c @@ -49,7 +49,7 @@ struct cmd_results *cmd_layout(int argc, char **argv) {  		}  	} -	arrange_windows(parent, parent->box.width, parent->box.height); +	arrange_windows(parent, parent->width, parent->height);  	return cmd_results_new(CMD_SUCCESS, NULL, NULL);  } diff --git a/sway/commands/move.c b/sway/commands/move.c index e8668ce7..c954ab94 100644 --- a/sway/commands/move.c +++ b/sway/commands/move.c @@ -95,8 +95,7 @@ static struct cmd_results *cmd_move_container(struct sway_container *current,  		}  		struct sway_container *source = container_parent(current, C_OUTPUT);  		struct sway_container *destination = output_in_direction(argv[3], -				source->sway_output->wlr_output, -				current->box.x, current->box.y); +				source->sway_output->wlr_output, current->x, current->y);  		if (!destination) {  			return cmd_results_new(CMD_FAILURE, "move workspace",  				"Can't find output with name/direction '%s'", argv[3]); @@ -125,8 +124,8 @@ static struct cmd_results *cmd_move_workspace(struct sway_container *current,  		return cmd_results_new(CMD_INVALID, "move", expected_syntax);  	}  	struct sway_container *source = container_parent(current, C_OUTPUT); -	int center_x = current->box.width / 2 + current->box.x, -		center_y = current->box.height / 2 + current->box.y; +	int center_x = current->width / 2 + current->x, +		center_y = current->height / 2 + current->y;  	struct sway_container *destination = output_in_direction(argv[3],  			source->sway_output->wlr_output, center_x, center_y);  	if (!destination) { diff --git a/sway/commands/resize.c b/sway/commands/resize.c index 8e295f65..93c1fe7d 100644 --- a/sway/commands/resize.c +++ b/sway/commands/resize.c @@ -48,11 +48,11 @@ static enum resize_axis parse_resize_axis(const char *axis) {  }  static int parallel_coord(struct sway_container *c, enum resize_axis a) { -	return a == RESIZE_AXIS_HORIZONTAL ? c->box.x : c->box.y; +	return a == RESIZE_AXIS_HORIZONTAL ? c->x : c->y;  }  static int parallel_size(struct sway_container *c, enum resize_axis a) { -	return a == RESIZE_AXIS_HORIZONTAL ? c->box.width : c->box.height; +	return a == RESIZE_AXIS_HORIZONTAL ? c->width : c->height;  }  static void resize_tiled(int amount, enum resize_axis axis) { @@ -196,10 +196,10 @@ static void resize(int amount, enum resize_axis axis, enum resize_unit unit) {  		float pct = amount / 100.0f;  		switch (axis) {  		case RESIZE_AXIS_HORIZONTAL: -			amount = (float)current->box.width * pct; +			amount = (float)current->width * pct;  			break;  		case RESIZE_AXIS_VERTICAL: -			amount = (float)current->box.height * pct; +			amount = (float)current->height * pct;  			break;  		default:  			sway_assert(0, "invalid resize axis");  | 
