aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-10-30 23:27:49 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-10-30 23:27:49 +1000
commit7be309710dcd679e0b570bc2f076ac00ae9ad65d (patch)
tree66f53dddfcd94217beedf25272fe427a34ab665f /common
parentMerge pull request #3020 from emersion/swaymsg-return-status (diff)
downloadsway-7be309710dcd679e0b570bc2f076ac00ae9ad65d.tar.gz
sway-7be309710dcd679e0b570bc2f076ac00ae9ad65d.tar.zst
sway-7be309710dcd679e0b570bc2f076ac00ae9ad65d.zip
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.
Diffstat (limited to 'common')
-rw-r--r--common/util.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/common/util.c b/common/util.c
index 561b3804..467aa4b5 100644
--- a/common/util.c
+++ b/common/util.c
@@ -175,24 +175,3 @@ failed:
175 free(current); 175 free(current);
176 return NULL; 176 return NULL;
177} 177}
178
179bool sway_dir_to_wlr(enum movement_direction dir, enum wlr_direction *out) {
180 switch (dir) {
181 case MOVE_UP:
182 *out = WLR_DIRECTION_UP;
183 break;
184 case MOVE_DOWN:
185 *out = WLR_DIRECTION_DOWN;
186 break;
187 case MOVE_LEFT:
188 *out = WLR_DIRECTION_LEFT;
189 break;
190 case MOVE_RIGHT:
191 *out = WLR_DIRECTION_RIGHT;
192 break;
193 default:
194 return false;
195 }
196
197 return true;
198}