[PATCH weston v2 5/8] libinput: don't use weston_config when configuring input devices

Quentin Glidic sardemff7+wayland at sardemff7.net
Thu Jun 2 09:01:22 UTC 2016


On 02/06/2016 10:58, Giulio Camuffo wrote:
> 2016-06-02 11:44 GMT+03:00 Quentin Glidic <sardemff7+wayland at sardemff7.net>:
>> On 01/06/2016 20:43, Giulio Camuffo wrote:
>>>
>>> Instead add callbacks to the drm and fbdev backends and pass that to
>>> the input backens so that when a new device needs to be configured
>>> that is called and the compositor can configure it.
>>>
>>> Signed-off-by: Giulio Camuffo <giuliocamuffo at gmail.com>
>>> ---
>>>  Makefile.am            |  3 ++-
>>>  src/compositor-drm.c   |  3 ++-
>>>  src/compositor-drm.h   | 11 +++++++++++
>>>  src/compositor-fbdev.c |  3 ++-
>>>  src/compositor-fbdev.h | 11 +++++++++++
>>>  src/compositor-rpi.c   |  2 +-
>>>  src/libinput-device.c  | 31 +------------------------------
>>>  src/libinput-device.h  |  2 ++
>>>  src/libinput-seat.c    |  7 ++++++-
>>>  src/libinput-seat.h    |  9 ++++++++-
>>>  src/main.c             | 27 +++++++++++++++++++++++++++
>>>  11 files changed, 73 insertions(+), 36 deletions(-)
>>>
>>
>> Just one comment (applying three times to this patch).
>>
>>
>>> [snip]
>>>
>>> diff --git a/src/compositor-drm.h b/src/compositor-drm.h
>>> index 3f150db..1266031 100644
>>> --- a/src/compositor-drm.h
>>> +++ b/src/compositor-drm.h
>>> @@ -36,6 +36,8 @@ extern "C" {
>>>
>>>  #define WESTON_DRM_BACKEND_CONFIG_VERSION 1
>>>
>>> +struct libinput_device;
>>> +
>>
>>
>> I guess the idea is to avoid #include <libinput.h> here. Is that really a
>> problem? Just add it to the Requires.private: in weston.pc.
>> Actually, for libweston, libinput *must* be in libweston.pc
>> Requires.private, otherwise you cannot link to libweston statically.
>
> I guess that's a habit i learnt due to the high C++ build times, to
> not include unnecessary headers in headers. Here it's not necessary as
> the forward declaration is enough. though including it would probably
> not harm.
> Regarding libinput missing from Requires.private, i think that's
> unrelated to this patch so it should be a follow up imho.

Actually, I realized it should definitely not be in Requires.private, 
because libinput is only used in backends, and only them link to libinput.
So:
Reviewed-by: Quentin Glidic <sardemff7+git at sardemff7.net>

-- 

Quentin “Sardem FF7” Glidic


More information about the wayland-devel mailing list