If we want to use the `org.freedesktop.a11y.KeyboardMonitor` protocol on
Pop!_OS, there is no need to support the Cosmic-specific protocol that
requires an `at-spi2-core` patch.
Previously we ignored when we had no output configuration
**and** failed to apply the automatically created one.
This leads to two problems:
- If this happens on startup, we end up with no outputs being added to the shell and we quit.
- If this happens later, we might end up in an inconsistent state, where the shell thinks we have an output, when it didn't light up for similar reasons.
Thus `read_outputs` is failable and handling that very much depends on
the where is was called from, because `read_outputs` doesn't know what
configuration was active before.
Thus make it failable and provide useful mitigations everywhere
possible:
- Try to enable just one output in case we fail on startup.
- Don't enable any additional outputs, when we fail on hotplug.
- Log the error like previously in any other case (and come up with more
mitigations, once we understand these cases better).
Adds support for cosmic-workspace-v2 pin, unpin, move_after, and
move_before requests.
Both features need some work with workspaces span displays mode, so that
will need more fixes later.
We also want to generate a unique id for pinned workspaces to send in
the ext-workspace-v1 protocol. But that isn't a strict requirement for
anything. So I haven't yet fully implemented that. We'll also want to
persist other things, like workspace naming when that's added.
Overall, though, with separate workspaces per display, this is working
pretty well.
Make numlock state on boot configurable
This will expose 3 settings for numlock behavior:
1. Numlock is off on boot (this is the current default behavior)
2. Numlock is on on boot
3. Numlock will restore the state from the last boot
Fixes#369
* Address comments:
Get keyboard after create_seat called rather than returning from
create_seat.
Use constants rather than magic numbers for keypress.
Only save updated modifier state after keypresses are handled/skipped.
* Remove unused import, fold other into existing use block.