mirror of
https://github.com/swaywm/sway.git
synced 2026-03-27 07:58:40 -04:00
Use noop output when there's no outputs connected
Instead of having NULL workspace->output pointers, use a noop output. This should be safer.
This commit is contained in:
parent
ab0248a545
commit
2301349ad5
8 changed files with 29 additions and 28 deletions
|
|
@ -518,9 +518,10 @@ static struct sway_workspace *select_workspace(struct sway_view *view) {
|
|||
return node->sway_container->workspace;
|
||||
}
|
||||
|
||||
// If there's no focus_inactive workspace then we must be running without
|
||||
// any outputs connected
|
||||
return root->saved_workspaces->items[0];
|
||||
// When there's no outputs connected, the above should match a workspace on
|
||||
// the noop output.
|
||||
sway_assert(false, "Expected to find a workspace");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static bool should_focus(struct sway_view *view) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue