Copying xkb_info when creating a seat causes problems

Andrew Wedgbury andrew.wedgbury at
Tue Sep 3 08:27:35 PDT 2013


I noticed that when creating a seat, calling weston_seat_init_keyboard() with a NULL keymap argument copies the global xkb_info struct from the compositor. This causes a problem if you then delete the seat, since the code in xkb_info_destroy() munmaps keymap_area and closes keymap_fd (the same pointer and fd as the global xkb_info). At this point keyboard input stops working, and trying to create another seat causes weston to crash.

Not entirely sure what the best solution is. Perhaps it should reference the global compositor settings somehow, rather than copy the struct?

Andrew Wedgbury <andrew.wedgbury at>

More information about the wayland-devel mailing list