mirror of
https://github.com/swaywm/sway.git
synced 2025-11-16 06:59:49 -05:00
Make workspace back_and_forth seat-specific
* When using multiple seats, each seat has its own prev_workspace_name for the purpose of workspace back_and_forth. * Removes prev_workspace_name global variable. * Removes unused next_name_map function in tree/workspace.c. * Fixes memory leak in seat_destroy (seat was not freed).
This commit is contained in:
parent
3f02218b54
commit
c5a6c37275
8 changed files with 32 additions and 33 deletions
|
|
@ -116,8 +116,8 @@ static void container_swap(struct sway_container *con1,
|
|||
output_get_active_workspace(con2->workspace->output);
|
||||
|
||||
char *stored_prev_name = NULL;
|
||||
if (prev_workspace_name) {
|
||||
stored_prev_name = strdup(prev_workspace_name);
|
||||
if (seat->prev_workspace_name) {
|
||||
stored_prev_name = strdup(seat->prev_workspace_name);
|
||||
}
|
||||
|
||||
swap_places(con1, con2);
|
||||
|
|
@ -132,8 +132,8 @@ static void container_swap(struct sway_container *con1,
|
|||
swap_focus(con1, con2, seat, focus);
|
||||
|
||||
if (stored_prev_name) {
|
||||
free(prev_workspace_name);
|
||||
prev_workspace_name = stored_prev_name;
|
||||
free(seat->prev_workspace_name);
|
||||
seat->prev_workspace_name = stored_prev_name;
|
||||
}
|
||||
|
||||
if (fs1) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue