Adjust move command to account for changed coordinate system

This commit is contained in:
Ryan Dwyer 2018-05-29 22:46:43 +10:00
parent f24087d104
commit f7cadf2333

View file

@ -13,16 +13,14 @@
#include "stringop.h" #include "stringop.h"
#include "list.h" #include "list.h"
static const char* expected_syntax = static const char* expected_syntax =
"Expected 'move <left|right|up|down> <[px] px>' or " "Expected 'move <left|right|up|down> <[px] px>' or "
"'move <container|window> to workspace <name>' or " "'move <container|window> to workspace <name>' or "
"'move <container|window|workspace> to output <name|direction>' or " "'move <container|window|workspace> to output <name|direction>' or "
"'move position mouse'"; "'move position mouse'";
static struct sway_container *output_in_direction(const char *direction, static struct sway_container *output_in_direction(const char *direction,
struct wlr_output *reference, int ref_ox, int ref_oy) { struct wlr_output *reference, int ref_lx, int ref_ly) {
int ref_lx = ref_ox + reference->lx,
ref_ly = ref_oy + reference->ly;
struct { struct {
char *name; char *name;
enum wlr_direction direction; enum wlr_direction direction;