Merge remote-tracking branch 'upstream/master' into atomic

This commit is contained in:
Ryan Dwyer 2018-06-11 11:03:43 +10:00
commit 9e96cfd310
17 changed files with 507 additions and 41 deletions

View file

@ -21,6 +21,19 @@ struct sway_seat_container {
struct wl_listener destroy;
};
struct sway_drag_icon {
struct sway_seat *seat;
struct wlr_drag_icon *wlr_drag_icon;
struct wl_list link; // sway_root::drag_icons
double x, y; // in layout-local coordinates
struct wl_listener surface_commit;
struct wl_listener map;
struct wl_listener unmap;
struct wl_listener destroy;
};
struct sway_seat {
struct wlr_seat *wlr_seat;
struct sway_cursor *cursor;
@ -35,8 +48,13 @@ struct sway_seat {
// If exclusive_client is set, no other clients will receive input events
struct wl_client *exclusive_client;
// Last touch point
int32_t touch_id;
double touch_x, touch_y;
struct wl_listener focus_destroy;
struct wl_listener new_container;
struct wl_listener new_drag_icon;
struct wl_list devices; // sway_seat_device::link
@ -114,4 +132,6 @@ struct seat_config *seat_get_config(struct sway_seat *seat);
bool seat_is_input_allowed(struct sway_seat *seat, struct wlr_surface *surface);
void drag_icon_update_position(struct sway_drag_icon *icon);
#endif

View file

@ -4,6 +4,12 @@
struct sway_container;
// Remove gaps around container
void remove_gaps(struct sway_container *c);
// Add gaps around container
void add_gaps(struct sway_container *c);
/**
* Arrange layout for all the children of the given container, and add them to
* the given transaction.

View file

@ -60,6 +60,11 @@ struct sway_container_state {
double swayc_x, swayc_y;
double swayc_width, swayc_height;
bool has_gaps;
double current_gaps;
double gaps_inner;
double gaps_outer;
//struct sway_container *parent;
//list_t *children;
@ -112,6 +117,13 @@ struct sway_container {
double saved_x, saved_y;
double saved_width, saved_height;
// The gaps currently applied to the container.
double current_gaps;
bool has_gaps;
double gaps_inner;
double gaps_outer;
list_t *children;
struct sway_container *parent;

View file

@ -28,6 +28,7 @@ struct sway_root {
struct wl_listener output_layout_change;
struct wl_list xwayland_unmanaged; // sway_xwayland_unmanaged::link
struct wl_list drag_icons; // sway_drag_icon::link
struct wlr_texture *debug_tree;