sway/sway/input
emersion 3b7a7462a2 Fix crash in cursor_rebase with multiple screens
Designing the output configuration sequence without invalid state is tricky.

We have one function, apply_output_config, that takes an output and (besides
other things) performs a modeset and inserts the output in the output layout.
The modeset can fail, in which case we don't want the output to be enabled.
We also have an output_enable function, which calls output_apply_config and
also configures the output's workspace and inserts it in the root container.

Now, we have two choices.

Either we configure the output before it's been inserted in the root container
and then, if the modeset was successful, we insert it and create the workspace.
The main issue with this approach is that configuring the output triggers a
handful of signals, namely wlr_output.mode and wlr_output_layout.change. In
those event handlers, we need to make sure to ignore these outputs in the
process of being configured.

Either we first insert the output, create the workspace and then try to
configure it. It means we need to undo everything if the modeset fails. The
main issue with this solution is that it enables and disables the output very
quickly, creates a workspace and immediately destroys it, and maybe moves
views back and forth (see output_evacuate).

I've tried to make it so an output isn't enabled then immediately disabled. We
already have code for ignoring outputs when the output is being destructed.

Fixes https://github.com/swaywm/sway/issues/3462
2019-01-19 08:29:46 +01:00
..
cursor.c Fix crash in cursor_rebase with multiple screens 2019-01-19 08:29:46 +01:00
input-manager.c reload: reset input configs 2019-01-09 11:24:15 -05:00
keyboard.c Disarm key repeat on reload 2019-01-14 20:15:23 +01:00
seat.c Disarm key repeat on reload 2019-01-14 20:15:23 +01:00
seatop_down.c seatop_begin_down: raise floating 2019-01-15 22:45:01 +01:00
seatop_move_floating.c Refactor seat operations to use an interface 2019-01-10 22:04:42 +10:00
seatop_move_tiling.c Refactor seat operations to use an interface 2019-01-10 22:04:42 +10:00
seatop_resize_floating.c Refactor seat operations to use an interface 2019-01-10 22:04:42 +10:00
seatop_resize_tiling.c Resize only current and immediate siblings rather than all siblings 2019-01-15 08:01:21 +10:00