diff options
| author | emersion <contact@emersion.fr> | 2018-04-02 15:24:25 -0400 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-04-02 15:24:25 -0400 | 
| commit | 0c0cc79282b5ce29616893977aca629f90521988 (patch) | |
| tree | e06d46f222487c4d266c09892d1907ce80b69a66 /sway/tree | |
| parent | 4134407fa967c7f45cd09554b74a15f28974fca5 (diff) | |
| parent | c7a6524954578977dd8f806713a258a0947a4951 (diff) | |
| download | sway-0c0cc79282b5ce29616893977aca629f90521988.tar.xz | |
Merge pull request #1699 from acrisci/seat-fixes
Seat fixes and cleanup
Diffstat (limited to 'sway/tree')
| -rw-r--r-- | sway/tree/container.c | 2 | ||||
| -rw-r--r-- | sway/tree/layout.c | 14 | ||||
| -rw-r--r-- | sway/tree/workspace.c | 14 | 
3 files changed, 15 insertions, 15 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index 21fe3fb0..ea0b7d5c 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c @@ -162,7 +162,7 @@ struct sway_container *container_output_create(  	struct sway_seat *seat = NULL;  	wl_list_for_each(seat, &input_manager->seats, link) {  		if (!seat->has_focus) { -			sway_seat_set_focus(seat, ws); +			seat_set_focus(seat, ws);  		}  	} diff --git a/sway/tree/layout.c b/sway/tree/layout.c index de210752..62ae0603 100644 --- a/sway/tree/layout.c +++ b/sway/tree/layout.c @@ -157,17 +157,17 @@ void container_move_to(struct sway_container *container,  	}  	wl_signal_emit(&container->events.reparent, old_parent);  	if (container->type == C_WORKSPACE) { -		struct sway_seat *seat = sway_input_manager_get_default_seat( +		struct sway_seat *seat = input_manager_get_default_seat(  				input_manager);  		if (old_parent->children->length == 0) {  			char *ws_name = workspace_next_name(old_parent->name);  			struct sway_container *ws =  				container_workspace_create(old_parent, ws_name);  			free(ws_name); -			sway_seat_set_focus(seat, ws); +			seat_set_focus(seat, ws);  		}  		container_sort_workspaces(new_parent); -		sway_seat_set_focus(seat, new_parent); +		seat_set_focus(seat, new_parent);  	}  	if (old_parent) {  		arrange_windows(old_parent, -1, -1); @@ -430,7 +430,7 @@ static struct sway_container *get_swayc_in_output_direction(  		return NULL;  	} -	struct sway_container *ws = sway_seat_get_focus_inactive(seat, output); +	struct sway_container *ws = seat_get_focus_inactive(seat, output);  	if (ws->type != C_WORKSPACE) {  		ws = container_parent(ws, C_WORKSPACE);  	} @@ -451,7 +451,7 @@ static struct sway_container *get_swayc_in_output_direction(  		case MOVE_UP:  		case MOVE_DOWN: {  			struct sway_container *focused = -				sway_seat_get_focus_inactive(seat, ws); +				seat_get_focus_inactive(seat, ws);  			if (focused && focused->parent) {  				struct sway_container *parent = focused->parent;  				if (parent->layout == L_VERT) { @@ -535,7 +535,7 @@ static struct sway_container *get_swayc_in_direction_under(  		struct sway_container *container, enum movement_direction dir,  		struct sway_seat *seat, struct sway_container *limit) {  	if (dir == MOVE_CHILD) { -		return sway_seat_get_focus_inactive(seat, container); +		return seat_get_focus_inactive(seat, container);  	}  	struct sway_container *parent = container->parent; @@ -595,7 +595,7 @@ static struct sway_container *get_swayc_in_direction_under(  			}  			if (next->children && next->children->length) {  				// TODO consider floating children as well -				return sway_seat_get_focus_inactive(seat, next); +				return seat_get_focus_inactive(seat, next);  			} else {  				return next;  			} diff --git a/sway/tree/workspace.c b/sway/tree/workspace.c index de1bf159..74330884 100644 --- a/sway/tree/workspace.c +++ b/sway/tree/workspace.c @@ -158,7 +158,7 @@ static bool _workspace_by_name(struct sway_container *view, void *data) {  struct sway_container *workspace_by_name(const char *name) {  	struct sway_seat *seat = input_manager_current_seat(input_manager);  	struct sway_container *current_workspace = NULL, *current_output = NULL; -	struct sway_container *focus = sway_seat_get_focus(seat); +	struct sway_container *focus = seat_get_focus(seat);  	if (focus) {  		current_workspace = container_parent(focus, C_WORKSPACE);  		current_output = container_parent(focus, C_OUTPUT); @@ -200,7 +200,7 @@ struct sway_container *workspace_create(const char *name) {  	// Otherwise create a new one  	struct sway_seat *seat = input_manager_current_seat(input_manager);  	struct sway_container *focus = -		sway_seat_get_focus_inactive(seat, &root_container); +		seat_get_focus_inactive(seat, &root_container);  	parent = focus;  	parent = container_parent(parent, C_OUTPUT);  	struct sway_container *new_ws = container_workspace_create(parent, name); @@ -260,7 +260,7 @@ struct sway_container *workspace_output_prev_next_impl(  	}  	struct sway_seat *seat = input_manager_current_seat(input_manager); -	struct sway_container *focus = sway_seat_get_focus_inactive(seat, output); +	struct sway_container *focus = seat_get_focus_inactive(seat, output);  	struct sway_container *workspace = (focus->type == C_WORKSPACE ?  			focus :  			container_parent(focus, C_WORKSPACE)); @@ -345,7 +345,7 @@ bool workspace_switch(struct sway_container *workspace) {  	}  	struct sway_seat *seat = input_manager_current_seat(input_manager);  	struct sway_container *focus = -		sway_seat_get_focus_inactive(seat, &root_container); +		seat_get_focus_inactive(seat, &root_container);  	if (!seat || !focus) {  		return false;  	} @@ -376,11 +376,11 @@ bool workspace_switch(struct sway_container *workspace) {  	wlr_log(L_DEBUG, "Switching to workspace %p:%s",  		workspace, workspace->name); -	struct sway_container *next = sway_seat_get_focus_inactive(seat, workspace); +	struct sway_container *next = seat_get_focus_inactive(seat, workspace);  	if (next == NULL) {  		next = workspace;  	} -	sway_seat_set_focus(seat, next); +	seat_set_focus(seat, next);  	struct sway_container *output = container_parent(workspace, C_OUTPUT);  	arrange_windows(output, -1, -1);  	return true; @@ -389,7 +389,7 @@ bool workspace_switch(struct sway_container *workspace) {  bool workspace_is_visible(struct sway_container *ws) {  	struct sway_container *output = container_parent(ws, C_OUTPUT);  	struct sway_seat *seat = input_manager_current_seat(input_manager); -	struct sway_container *focus = sway_seat_get_focus_inactive(seat, output); +	struct sway_container *focus = seat_get_focus_inactive(seat, output);  	if (focus->type != C_WORKSPACE) {  		focus = container_parent(focus, C_WORKSPACE);  	}  | 
