Remove enum movement_direction

There's no point having both movement_direction and wlr_direction. This
replaces the former with the latter.

As movement_direction also contained MOVE_PARENT and MOVE_CHILD items,
these are now checked specifically in the focus command and handled in
separate functions, just like the other focus variants.
This commit is contained in:
Ryan Dwyer 2018-10-30 23:27:49 +10:00
parent b90af33570
commit 7be309710d
7 changed files with 86 additions and 114 deletions

View file

@ -62,7 +62,7 @@ void output_begin_destroy(struct sway_output *output);
struct sway_output *output_from_wlr_output(struct wlr_output *output);
struct sway_output *output_get_in_direction(struct sway_output *reference,
enum movement_direction direction);
enum wlr_direction direction);
void output_add_workspace(struct sway_output *output,
struct sway_workspace *workspace);

View file

@ -36,7 +36,6 @@ struct sway_output;
struct sway_workspace;
struct sway_view;
enum movement_direction;
enum wlr_direction;
struct sway_container_state {
@ -287,8 +286,6 @@ void container_detach(struct sway_container *child);
void container_replace(struct sway_container *container,
struct sway_container *replacement);
bool sway_dir_to_wlr(enum movement_direction dir, enum wlr_direction *out);
struct sway_container *container_split(struct sway_container *child,
enum sway_container_layout layout);

View file

@ -7,15 +7,6 @@
#include <wlr/types/wlr_output_layout.h>
#include <xkbcommon/xkbcommon.h>
enum movement_direction {
MOVE_LEFT,
MOVE_RIGHT,
MOVE_UP,
MOVE_DOWN,
MOVE_PARENT,
MOVE_CHILD,
};
/**
* Wrap i into the range [0, max[
*/
@ -77,6 +68,4 @@ bool parse_boolean(const char *boolean, bool current);
*/
char* resolve_path(const char* path);
bool sway_dir_to_wlr(enum movement_direction dir, enum wlr_direction *out);
#endif