diff options
author | Markus Ongyerth <ongy@ongy.net> | 2018-05-04 19:10:30 +0200 |
---|---|---|
committer | Markus Ongyerth <ongy@ongy.net> | 2018-07-14 09:40:39 +0200 |
commit | 15870ceb4b0277cc83cdd824bd521de95a77d983 (patch) | |
tree | 9fd093cd3e5d4db4c389006b5ae9a23f622d86f5 /rootston | |
parent | 599f84f736ef617374660c82acf52bff0e95c566 (diff) |
Fix segfaultiness
Diffstat (limited to 'rootston')
-rw-r--r-- | rootston/seat.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/rootston/seat.c b/rootston/seat.c index eb1e7e0b..b7bf28fc 100644 --- a/rootston/seat.c +++ b/rootston/seat.c @@ -111,7 +111,7 @@ static void handle_tablet_tool_position(struct roots_cursor *cursor, } wlr_cursor_warp_absolute(cursor->cursor, tool->device, - change_x ? x : -1 , change_y ? y : -1); + change_x ? x : NAN, change_y ? y : NAN); double sx, sy; struct roots_view *view = NULL; @@ -188,7 +188,6 @@ static void handle_tablet_tool_tool_destroy(struct wl_listener *listener, void * wl_list_remove(&tool->tool_link); wl_list_remove(&tool->tool_destroy.link); - wl_list_remove(&tool->tablet_destroy.link); free(tool); } @@ -221,6 +220,8 @@ static void handle_tool_proximity(struct wl_listener *listener, void *data) { wlr_make_tablet_tool(desktop->tablet_v2, cursor->seat->seat, tool); roots_tool->tool_destroy.notify = handle_tablet_tool_tool_destroy; wl_signal_add(&tool->events.destroy, &roots_tool->tool_destroy); + wl_list_init(&roots_tool->link); + wl_list_init(&roots_tool->tool_link); } handle_tablet_tool_position(cursor, event->device->data, event->tool, |