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

Pekka Paalanen ppaalanen at gmail.com
Tue May 19 23:39:54 PDT 2015


On Wed, 20 May 2015 08:34:32 +0200
Hardening <rdp.effort at gmail.com> wrote:

> 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 ?

I'm assuming that after this patch, this actually can legally happen,
and in that case we should just ignore it, because we are getting
keyboard leave for something we already left by actively destroying it
to begin with. Right?


Thanks,
pq


More information about the wayland-devel mailing list