mirror of
https://github.com/swaywm/sway.git
synced 2026-04-16 08:21:30 -04:00
Merge branch 'master' into smarter-auto-orientation
This commit is contained in:
commit
0aa4db6e7d
1 changed files with 12 additions and 6 deletions
|
|
@ -202,8 +202,10 @@ static bool workspace_valid_on_output(const char *output_name,
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < wsc->outputs->length; i++) {
|
for (int i = 0; i < wsc->outputs->length; i++) {
|
||||||
if (output_match_name_or_id(output, wsc->outputs->items[i])) {
|
struct sway_output *ws_output =
|
||||||
return true;
|
output_by_name_or_id(wsc->outputs->items[i]);
|
||||||
|
if (ws_output) {
|
||||||
|
return ws_output == output;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -320,10 +322,14 @@ char *workspace_next_name(const char *output_name) {
|
||||||
}
|
}
|
||||||
bool found = false;
|
bool found = false;
|
||||||
for (int j = 0; j < wsc->outputs->length; ++j) {
|
for (int j = 0; j < wsc->outputs->length; ++j) {
|
||||||
if (output_match_name_or_id(output, wsc->outputs->items[j])) {
|
struct sway_output *ws_output =
|
||||||
found = true;
|
output_by_name_or_id(wsc->outputs->items[j]);
|
||||||
free(target);
|
if (ws_output) {
|
||||||
target = strdup(wsc->workspace);
|
if (ws_output == output) {
|
||||||
|
found = true;
|
||||||
|
free(target);
|
||||||
|
target = strdup(wsc->workspace);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue