[PATCH weston] compositor-wayland: Handle window close events more gracefully

Hardening rdp.effort at gmail.com
Tue May 19 23:34:32 PDT 2015


Le 20/05/2015 01:41, Bryce Harrington a écrit :
> On Mon, May 18, 2015 at 11:14:16PM -0700, Dima Ryazanov wrote:
>> When a compositor window is closed, remove the output instead of just exiting.
>>
>> (The "if (!input->output)" checks are kind of ugly - but I couldn't find
>> a better way to handle the output going away.)
>>
>> Signed-off-by: Dima Ryazanov <dima at gmail.com>
> Reviewed-by: Bryce Harrington <bryce at osg.samsung.com>
> 
>> ---
>>  src/compositor-wayland.c | 22 +++++++++++++++++++---
>>  1 file changed, 19 insertions(+), 3 deletions(-)
>>
[...]

>>  
>>  		if (frame_status(input->output->frame) & FRAME_STATUS_REPAINT)
>>  			weston_output_schedule_repaint(&input->output->base);
>> @@ -1521,7 +1537,7 @@ input_handle_keyboard_leave(void *data,
>>  
>>  	focus = input->keyboard_focus;
>>  	if (!focus)
>> -		return; /* This shouldn't happen */
>> +		return;

Just a remark, if it's something that shouldn't happen it's a failing
assert not a silent return, isn't it ?

Regards

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



More information about the wayland-devel mailing list