Re: [PATCH weston v3] Copying xkb_info when creating a seat causes problems

2013-09-11 Thread Kristian Høgsberg
On Fri, Sep 06, 2013 at 08:29:12AM +, Andrew Wedgbury wrote: > Sorry, I missed updating use of xkb_info in compositor-x11.c. > I've updated the patch. Argh, and I ended up applying and pushing v2 before seeing this. Oh well, I've applied the compositor-x11.c part of the patch and the x11 back

Re: [PATCH weston v2] Copying xkb_info when creating a seat causes problems

2013-09-11 Thread Kristian Høgsberg
On Thu, Sep 05, 2013 at 01:31:40PM +, Andrew Wedgbury wrote: > Hi Kristian, > > Here's a new patch for ref counting weston_xkb_info, as suggested. > So a seat created with a NULL keymap will now point to the global xkb_info. Andrew, that looks great. It's a nice cleanup in itself and of cour

[PATCH weston v3] Copying xkb_info when creating a seat causes problems

2013-09-06 Thread Andrew Wedgbury
Sorry, I missed updating use of xkb_info in compositor-x11.c. I've updated the patch. --- src/compositor-x11.c |2 +- src/compositor.h |5 ++-- src/input.c | 77 +++--- src/text-backend.c |4 +-- 4 files changed, 54 insertio

[PATCH weston v2] Copying xkb_info when creating a seat causes problems

2013-09-05 Thread Andrew Wedgbury
Hi Kristian, Here's a new patch for ref counting weston_xkb_info, as suggested. So a seat created with a NULL keymap will now point to the global xkb_info. --- src/compositor.h |5 ++-- src/input.c| 77 src/text-backend.c |

Re: [PATCH weston] Copying xkb_info when creating a seat causes problems

2013-09-04 Thread Kristian Høgsberg
On Wed, Sep 4, 2013 at 5:49 AM, Andrew Wedgbury wrote: > A simpler fix would be to not call xkb_info_destroy() when releasing a seat > in the case where the xkb_info for the seat was copied from the global > compositor settings (which can be determined by checking if keymap_fd is the > same) >

[PATCH weston] Copying xkb_info when creating a seat causes problems

2013-09-04 Thread Andrew Wedgbury
A simpler fix would be to not call xkb_info_destroy() when releasing a seat in the case where the xkb_info for the seat was copied from the global compositor settings (which can be determined by checking if keymap_fd is the same) In this case, xkb_map_unref() should still be called to unref the

Copying xkb_info when creating a seat causes problems

2013-09-03 Thread Andrew Wedgbury
Hi, 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 s