[PATCH libinput v2 3/3] Change the logging system to be per-context

Peter Hutterer peter.hutterer at who-t.net
Thu Jun 19 15:37:03 PDT 2014


On Thu, Jun 19, 2014 at 12:49:08PM +0200, Hans de Goede wrote:
> Hi,
> 
> On 06/19/2014 10:34 AM, Peter Hutterer wrote:
> > On Thu, Jun 19, 2014 at 10:02:30AM +0200, Hans de Goede wrote:
> >> Hi,
> >>
> >> On 06/19/2014 06:57 AM, Peter Hutterer wrote:
> >>> Rather than a single global logging function, make the logging dependent on
> >>> the individual context. This way we won't stomp on each other's feet in the
> >>> (admittedly unusual) case of having multiple libinput contexts.
> >>>
> >>> The userdata argument to the log handler was dropped. The caller has a ref to
> >>> the libinput context now, any userdata can be attached to that context
> >>> instead.
> >>>
> >>> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> >>
> >> Hmm, you've removed the user_data argument to the log-handler how is
> >> a custom log-handler supposed to get to any specific (dynamic) data it
> >> may need ?
> > 
> > The libinput context is now available to the logging function, and that 
> > context can be passed to libinput_get_user_data()*. tbh, I didn't see quite
> > the need to have a separate userdata for logging.
> 
> Ah I did not know the user could store user_data in the libinput context,
> now that I do, this patch is:
> 
> Reviewed-by: Hans de Goede <hdegoede at redhat.com>

Thanks. I've dropped the const struct libinput* from this patch, they're all
just struct libinput * now.

Cheers,
   Peter


More information about the wayland-devel mailing list