@ -9,6 +9,7 @@
# include <wlr/types/wlr_primary_selection.h>
# include <wlr/types/wlr_primary_selection.h>
# include <wlr/types/wlr_xcursor_manager.h>
# include <wlr/types/wlr_xcursor_manager.h>
# include "config.h"
# include "config.h"
# include "list.h"
# include "log.h"
# include "log.h"
# include "sway/desktop.h"
# include "sway/desktop.h"
# include "sway/input/cursor.h"
# include "sway/input/cursor.h"
@ -51,6 +52,10 @@ void seat_destroy(struct sway_seat *seat) {
wl_list_remove ( & seat - > request_set_primary_selection . link ) ;
wl_list_remove ( & seat - > request_set_primary_selection . link ) ;
wl_list_remove ( & seat - > link ) ;
wl_list_remove ( & seat - > link ) ;
wlr_seat_destroy ( seat - > wlr_seat ) ;
wlr_seat_destroy ( seat - > wlr_seat ) ;
for ( int i = 0 ; i < seat - > deferred_bindings - > length ; i + + ) {
free_sway_binding ( seat - > deferred_bindings - > items [ i ] ) ;
}
list_free ( seat - > deferred_bindings ) ;
free ( seat - > prev_workspace_name ) ;
free ( seat - > prev_workspace_name ) ;
free ( seat ) ;
free ( seat ) ;
}
}
@ -445,6 +450,8 @@ struct sway_seat *seat_create(const char *seat_name) {
root_for_each_workspace ( collect_focus_workspace_iter , seat ) ;
root_for_each_workspace ( collect_focus_workspace_iter , seat ) ;
root_for_each_container ( collect_focus_container_iter , seat ) ;
root_for_each_container ( collect_focus_container_iter , seat ) ;
seat - > deferred_bindings = create_list ( ) ;
if ( ! wl_list_empty ( & server . input - > seats ) ) {
if ( ! wl_list_empty ( & server . input - > seats ) ) {
// Since this is not the first seat, attempt to set initial focus
// Since this is not the first seat, attempt to set initial focus
struct sway_seat * current_seat = input_manager_current_seat ( ) ;
struct sway_seat * current_seat = input_manager_current_seat ( ) ;