diff options
-rw-r--r-- | sway/commands.c | 10 | ||||
-rw-r--r-- | sway/container.c | 6 | ||||
-rw-r--r-- | sway/handlers.c | 20 |
3 files changed, 18 insertions, 18 deletions
diff --git a/sway/commands.c b/sway/commands.c index 9a0bc076..ae75ec67 100644 --- a/sway/commands.c +++ b/sway/commands.c | |||
@@ -372,13 +372,13 @@ static bool cmd_output(struct sway_config *config, int argc, char **argv) { | |||
372 | struct output_config *output = calloc(1, sizeof(struct output_config)); | 372 | struct output_config *output = calloc(1, sizeof(struct output_config)); |
373 | output->x = output->y = output->width = output->height = -1; | 373 | output->x = output->y = output->width = output->height = -1; |
374 | output->name = strdup(argv[0]); | 374 | output->name = strdup(argv[0]); |
375 | output->enabled = true; | 375 | output->enabled = true; |
376 | 376 | ||
377 | // TODO: atoi doesn't handle invalid numbers | 377 | // TODO: atoi doesn't handle invalid numbers |
378 | 378 | ||
379 | if (strcmp(argv[1], "disable") == 0) { | 379 | if (strcmp(argv[1], "disable") == 0) { |
380 | output->enabled = false; | 380 | output->enabled = false; |
381 | } | 381 | } |
382 | 382 | ||
383 | int i; | 383 | int i; |
384 | for (i = 1; i < argc; ++i) { | 384 | for (i = 1; i < argc; ++i) { |
diff --git a/sway/container.c b/sway/container.c index 6debeea3..d4f7c693 100644 --- a/sway/container.c +++ b/sway/container.c | |||
@@ -70,9 +70,9 @@ swayc_t *new_output(wlc_handle handle) { | |||
70 | oc = NULL; | 70 | oc = NULL; |
71 | } | 71 | } |
72 | 72 | ||
73 | if (oc && !oc->enabled) { | 73 | if (oc && !oc->enabled) { |
74 | return NULL; | 74 | return NULL; |
75 | } | 75 | } |
76 | 76 | ||
77 | swayc_t *output = new_swayc(C_OUTPUT); | 77 | swayc_t *output = new_swayc(C_OUTPUT); |
78 | if (oc && oc->width != -1 && oc->height != -1) { | 78 | if (oc && oc->width != -1 && oc->height != -1) { |
diff --git a/sway/handlers.c b/sway/handlers.c index 9fca6387..1ff430f2 100644 --- a/sway/handlers.c +++ b/sway/handlers.c | |||
@@ -86,22 +86,22 @@ swayc_t *container_under_pointer(void) { | |||
86 | static bool handle_output_created(wlc_handle output) { | 86 | static bool handle_output_created(wlc_handle output) { |
87 | swayc_t *op = new_output(output); | 87 | swayc_t *op = new_output(output); |
88 | 88 | ||
89 | if (!op) { | 89 | if (!op) { |
90 | return false; | 90 | return false; |
91 | } | 91 | } |
92 | 92 | ||
93 | wlc_output_focus(output); | 93 | wlc_output_focus(output); |
94 | // Switch to workspace if we need to | 94 | // Switch to workspace if we need to |
95 | if (swayc_active_workspace() == NULL) { | 95 | if (swayc_active_workspace() == NULL) { |
96 | sway_log(L_INFO, "Focus switch"); | 96 | sway_log(L_INFO, "Focus switch"); |
97 | swayc_t *ws = op->children->items[0]; | 97 | swayc_t *ws = op->children->items[0]; |
98 | workspace_switch(ws); | 98 | workspace_switch(ws); |
99 | } | 99 | } |
100 | /* | 100 | /* |
101 | if (wlc_output_get_sleep(wlc_get_focused_output())) { | 101 | if (wlc_output_get_sleep(wlc_get_focused_output())) { |
102 | wlc_output_focus(output); | 102 | wlc_output_focus(output); |
103 | } | 103 | } |
104 | */ | 104 | */ |
105 | return true; | 105 | return true; |
106 | } | 106 | } |
107 | 107 | ||