swayfx/sway
Jarkko Oranen 924ed6464c Prevent "move next" and "move prev" commands from crashing
Fixes #1120

When the parent of a view is C_WORKSPACE and the movement direction
is either MOVE_PREV or MOVE_NEXT, the code would attempt to move the
views to the next output, but swayc_adjacent_output can't accept
non-directional movement commands and causes undefined behaviour and
a segfault.

If the code is simply skipped, we end up in an infinite loop.

Instead, we can allow containers whose parent is a C_WORKSPACE take the
path that handles MOVE_PREV and MOVE_NEXT, which behaves as you would
expect.

I'm not certain that this fix is entirely correct as the desired behaviour
of move_container is not very well defined, but it seems to work.
2017-03-19 16:58:39 +02:00
..
commands remove unnecessary todo item 2017-03-18 17:26:59 -04:00
border.c Display instance (if present) in nested layouts 2017-01-19 03:45:23 +02:00
CMakeLists.txt Revise IPC security configuration 2017-02-19 02:56:59 -05:00
commands.c Merge branch 'master' of git://github.com/SirCmpwn/sway into new-command-aliases 2017-03-13 07:35:12 -04:00
config.c Allow also 444 for security file mode 2017-03-16 15:12:22 +00:00
container.c The default layout of a workspace should follow the output 2017-03-19 16:57:05 +02:00
criteria.c UnGNUify the codebase 2017-03-10 23:41:24 -05:00
debug_log.c Added Awesome/Monad type "auto" layouts 2016-12-29 20:31:30 +01:00
extensions.c Add redshift support 2016-12-28 02:04:51 -05:00
focus.c prevent dereference of freed workspace 2016-10-02 22:03:52 -05:00
handlers.c prevent fullscreen focus thievery 2017-03-18 17:55:50 -04:00
input.c UnGNUify the codebase 2017-03-10 23:41:24 -05:00
input_state.c Reorganize includes 2016-09-01 08:18:37 -04:00
ipc-json.c Add window instance support 2017-01-19 03:14:59 +02:00
ipc-server.c UnGNUify the codebase 2017-03-10 23:41:24 -05:00
layout.c Prevent "move next" and "move prev" commands from crashing 2017-03-19 16:58:39 +02:00
main.c UnGNUify the codebase 2017-03-10 23:41:24 -05:00
output.c Add output wrapping 2017-01-13 16:06:10 -08:00
security.c UnGNUify the codebase 2017-03-10 23:41:24 -05:00
sway-bar.5.txt Implement configurable wrapping on bar ws scroll 2016-07-17 11:26:38 -04:00
sway-input.5.txt Add left_handed support for input devices 2016-10-25 22:06:23 +02:00
sway-security.7.txt Allow also 444 for security file mode 2017-03-16 15:12:22 +00:00
sway.1.txt document all xkb settings handled by wlc 2016-08-09 10:41:06 -04:00
sway.5.txt Merge branch 'master' of git://github.com/SirCmpwn/sway into new-command-aliases 2017-03-13 07:35:12 -04:00
workspace.c UnGNUify the codebase 2017-03-10 23:41:24 -05:00