This commit is contained in:
Half-Shot 2015-08-18 21:42:28 +01:00
commit f314d95103
10 changed files with 262 additions and 142 deletions

View file

@ -413,7 +413,7 @@ static bool cmd_fullscreen(struct sway_config *config, int argc, char **argv) {
return false;
}
swayc_t *container = get_focused_container(&root_container);
swayc_t *container = get_focused_view(&root_container);
bool current = (wlc_view_get_state(container->handle) & WLC_BIT_FULLSCREEN) > 0;
wlc_view_set_state(container->handle, WLC_BIT_FULLSCREEN, !current);
//Resize workspace if going from fullscreen -> notfullscreen
@ -512,7 +512,7 @@ static char **split_directive(char *line, int *argc) {
if (!*line) return parts;
int in_string = 0, in_character = 0;
int i, j;
int i, j, _;
for (i = 0, j = 0; line[i]; ++i) {
if (line[i] == '\\') {
++i;
@ -525,7 +525,7 @@ static char **split_directive(char *line, int *argc) {
char *item = malloc(i - j + 1);
strncpy(item, line + j, i - j);
item[i - j] = '\0';
strip_whitespace(item);
item = strip_whitespace(item, &_);
if (item[0] == '\0') {
free(item);
} else {
@ -543,7 +543,7 @@ static char **split_directive(char *line, int *argc) {
char *item = malloc(i - j + 1);
strncpy(item, line + j, i - j);
item[i - j] = '\0';
strip_whitespace(item);
item = strip_whitespace(item, &_);
if (*argc == capacity) {
capacity++;
parts = realloc(parts, sizeof(char *) * capacity);