Merge pull request #101 from Luminarys/master

Added in basic resizing command.
This commit is contained in:
Drew DeVault 2015-08-21 07:12:05 -04:00
commit 464b49eda2
10 changed files with 453 additions and 32 deletions

View file

@ -33,12 +33,12 @@ struct sway_container {
enum swayc_layouts layout;
// Not including borders or margins
int width, height;
double width, height;
// Used for setting floating geometry
int desired_width, desired_height;
int x, y;
double x, y;
bool visible;
bool is_floating;

View file

@ -34,6 +34,10 @@ extern struct pointer_state {
bool drag;
bool resize;
} floating;
struct pointer_tiling {
bool resize;
swayc_t *init_view;
} tiling;
struct pointer_lock {
bool left;
bool right;

View file

@ -2,14 +2,14 @@
#define _SWAY_IPC_H
enum ipc_command_type {
IPC_COMMAND = 0,
IPC_COMMAND = 0,
IPC_GET_WORKSPACES = 1,
IPC_SUBSCRIBE = 2,
IPC_GET_OUTPUTS = 3,
IPC_GET_TREE = 4,
IPC_GET_MARKS = 5,
IPC_SUBSCRIBE = 2,
IPC_GET_OUTPUTS = 3,
IPC_GET_TREE = 4,
IPC_GET_MARKS = 5,
IPC_GET_BAR_CONFIG = 6,
IPC_GET_VERSION = 7,
IPC_GET_VERSION = 7,
};
void ipc_init(void);

View file

@ -18,7 +18,7 @@ swayc_t *replace_child(swayc_t *child, swayc_t *new_child);
swayc_t *remove_child(swayc_t *child);
// Layout
void arrange_windows(swayc_t *container, int width, int height);
void arrange_windows(swayc_t *container, double width, double height);
// Focus
void unfocus_all(swayc_t *container);
@ -29,4 +29,6 @@ swayc_t *get_focused_container(swayc_t *parent);
swayc_t *get_swayc_for_handle(wlc_handle handle, swayc_t *parent);
swayc_t *get_swayc_in_direction(swayc_t *container, enum movement_direction dir);
void recursive_resize(swayc_t *container, double amount, enum wlc_resize_edge edge);
#endif