[PATCH] weston: release keyboard/touch/pointer objects

Hardening rdp.effort at gmail.com
Thu Oct 8 23:45:22 PDT 2015


Le 08/10/2015 05:14, Jonas Ådahl a écrit :
> On Tue, Oct 06, 2015 at 10:59:32AM +0200, David FORT wrote:
>> This patch adds the missing calls to release when the seat has capabilities
>> changes. It also fixes a missing release of the touch object.
>> ---
>>  clients/window.c | 23 +++++++++++++++++++----
>>  1 file changed, 19 insertions(+), 4 deletions(-)
>>
>> diff --git a/clients/window.c b/clients/window.c
>> index 47a79aa..7469259 100644
>> --- a/clients/window.c
>> +++ b/clients/window.c
>> @@ -79,6 +79,10 @@ typedef void *EGLContext;
>>  #include "ivi-application-client-protocol.h"
>>  #define IVI_SURFACE_ID 9000
>>  
>> +#define WL_KEYBOARD_RELEASE_SINCE_VERSION 3
>> +#define WL_POINTER_RELEASE_SINCE_VERSION 3
>> +#define WL_TOUCH_RELEASE_SINCE_VERSION 3
> 
> The code below looks good, but I don't think we should define macros
> prefixed with WL_ since that'd be something wayland might do.
> I just sent a patch (CC:ed you on it) that makes scanner.c generate
> these for us, just sa we do with events. If we don't go with generating
> the _SINCE_VERSION macros for requests, then you should probably prefix
> them in some way.
> 

Totally agree. Right now, there's several places where it's magic
numbers that are used.

So if people could review the straightforward patch here:
http://lists.freedesktop.org/archives/wayland-devel/2015-October/024742.html
so that it lands quickly.



-- 
David FORT
website: http://www.hardening-consulting.com/



More information about the wayland-devel mailing list