aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-06-03 18:46:26 +0100
committerGitHub <noreply@github.com>2018-06-03 18:46:26 +0100
commit4bc88772ec15ce0070fb06fe3c242cb65dc34b01 (patch)
treeaed41175b26f4ad2f8be21e9ae634f4b2998699c
parentebe0b668c9749dcd857f2b6b248b3f6cb3322b8f (diff)
parentd02e9aa4bc96cab2fb5e8b5968853b31cc4fa947 (diff)
Merge pull request #2100 from RyanDwyer/fix-workspace-orientation
Fix initial workspace orientation on a rotated output
-rw-r--r--sway/tree/output.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sway/tree/output.c b/sway/tree/output.c
index 6c7044a2..8823eba0 100644
--- a/sway/tree/output.c
+++ b/sway/tree/output.c
@@ -8,10 +8,6 @@
struct sway_container *output_create(
struct sway_output *sway_output) {
- struct wlr_box size;
- wlr_output_effective_resolution(sway_output->wlr_output, &size.width,
- &size.height);
-
const char *name = sway_output->wlr_output->name;
char identifier[128];
output_get_identifier(identifier, sizeof(identifier), sway_output);
@@ -54,6 +50,12 @@ struct sway_container *output_create(
container_add_child(&root_container, output);
load_swaybars();
+ struct wlr_box size;
+ wlr_output_effective_resolution(sway_output->wlr_output, &size.width,
+ &size.height);
+ output->width = size.width;
+ output->height = size.height;
+
// Create workspace
char *ws_name = workspace_next_name(output->name);
wlr_log(L_DEBUG, "Creating default workspace %s", ws_name);