From 618b3df0513dd2c63f6e64db1e125a609e1ec6b9 Mon Sep 17 00:00:00 2001 From: Luminarys Date: Sat, 15 Aug 2015 13:55:06 -0500 Subject: Fixed workspace switching in multimonitor layouts --- sway/container.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sway/container.c') diff --git a/sway/container.c b/sway/container.c index 1c17e92f..3fa9f490 100644 --- a/sway/container.c +++ b/sway/container.c @@ -69,7 +69,7 @@ swayc_t *new_workspace(swayc_t * output, const char *name) { workspace->layout = L_HORIZ; // TODO:default layout workspace->width = output->width; workspace->height = output->height; - workspace->name = strdup(name); + workspace->name = strdup(name); workspace->visible = true; add_child(output, workspace); @@ -82,10 +82,10 @@ swayc_t *new_container(swayc_t *child, enum swayc_layouts layout) { sway_log(L_DEBUG, "creating container %p around %p", cont, child); cont->layout = layout; - cont->width = child->width; + cont->width = child->width; cont->height = child->height; - cont->x = child->x; - cont->y = child->y; + cont->x = child->x; + cont->y = child->y; cont->visible = child->visible; swayc_t *parent = replace_child(child, cont); @@ -110,7 +110,7 @@ swayc_t *new_view(swayc_t *sibling, wlc_handle handle) { handle, title, type, sibling, sibling?sibling->type:0); //Setup values view->handle = handle; - view->name = strdup(title); + view->name = strdup(title); view->visible = true; //Case of focused workspace, just create as child of it -- cgit v1.2.3 From 9b0196e7ede3e91b8a4829f1f66990f4c588014b Mon Sep 17 00:00:00 2001 From: Luminarys Date: Sat, 15 Aug 2015 14:02:03 -0500 Subject: Style fixes --- sway/container.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sway/container.c') diff --git a/sway/container.c b/sway/container.c index 3fa9f490..c033f118 100644 --- a/sway/container.c +++ b/sway/container.c @@ -69,7 +69,7 @@ swayc_t *new_workspace(swayc_t * output, const char *name) { workspace->layout = L_HORIZ; // TODO:default layout workspace->width = output->width; workspace->height = output->height; - workspace->name = strdup(name); + workspace->name = strdup(name); workspace->visible = true; add_child(output, workspace); @@ -82,10 +82,10 @@ swayc_t *new_container(swayc_t *child, enum swayc_layouts layout) { sway_log(L_DEBUG, "creating container %p around %p", cont, child); cont->layout = layout; - cont->width = child->width; + cont->width = child->width; cont->height = child->height; - cont->x = child->x; - cont->y = child->y; + cont->x = child->x; + cont->y = child->y; cont->visible = child->visible; swayc_t *parent = replace_child(child, cont); -- cgit v1.2.3 From 9ba914747ea2d73aebaa67fae6a164612a4efe11 Mon Sep 17 00:00:00 2001 From: Luminarys Date: Sat, 15 Aug 2015 14:10:44 -0500 Subject: Removed alignment --- sway/container.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'sway/container.c') diff --git a/sway/container.c b/sway/container.c index c033f118..1f0d02aa 100644 --- a/sway/container.c +++ b/sway/container.c @@ -44,9 +44,9 @@ swayc_t *new_output(wlc_handle handle) { const struct wlc_size* size = wlc_output_get_resolution(handle); swayc_t *output = new_swayc(C_OUTPUT); - output->width = size->w; - output->height = size->h; - output->handle = handle; + output->width = size->w; + output->height = size->h; + output->handle = handle; add_child(&root_container, output); @@ -66,10 +66,10 @@ swayc_t *new_workspace(swayc_t * output, const char *name) { sway_log(L_DEBUG, "Added workspace %s for output %d", name, output->handle); swayc_t *workspace = new_swayc(C_WORKSPACE); - workspace->layout = L_HORIZ; // TODO:default layout - workspace->width = output->width; - workspace->height = output->height; - workspace->name = strdup(name); + workspace->layout = L_HORIZ; // TODO:default layout + workspace->width = output->width; + workspace->height = output->height; + workspace->name = strdup(name); workspace->visible = true; add_child(output, workspace); @@ -81,12 +81,12 @@ swayc_t *new_container(swayc_t *child, enum swayc_layouts layout) { sway_log(L_DEBUG, "creating container %p around %p", cont, child); - cont->layout = layout; - cont->width = child->width; - cont->height = child->height; - cont->x = child->x; - cont->y = child->y; - cont->visible = child->visible; + cont->layout = layout; + cont->width = child->width; + cont->height = child->height; + cont->x = child->x; + cont->y = child->y; + cont->visible = child->visible; swayc_t *parent = replace_child(child, cont); if (parent) { @@ -109,8 +109,8 @@ swayc_t *new_view(swayc_t *sibling, wlc_handle handle) { sway_log(L_DEBUG, "Adding new view %d:%s:%d to container %p %d", handle, title, type, sibling, sibling?sibling->type:0); //Setup values - view->handle = handle; - view->name = strdup(title); + view->handle = handle; + view->name = strdup(title); view->visible = true; //Case of focused workspace, just create as child of it -- cgit v1.2.3 From b97d8756a811b3a93e73629a9e12fc78cdd3acf2 Mon Sep 17 00:00:00 2001 From: Luminarys Date: Sat, 15 Aug 2015 14:12:42 -0500 Subject: Minor style fix --- sway/container.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sway/container.c') diff --git a/sway/container.c b/sway/container.c index 1f0d02aa..6054b4a3 100644 --- a/sway/container.c +++ b/sway/container.c @@ -82,7 +82,7 @@ swayc_t *new_container(swayc_t *child, enum swayc_layouts layout) { sway_log(L_DEBUG, "creating container %p around %p", cont, child); cont->layout = layout; - cont->width = child->width; + cont->width = child->width; cont->height = child->height; cont->x = child->x; cont->y = child->y; -- cgit v1.2.3