[PATCH] compositor-x11: Flush xcb connection from x11_output_destroy()

Armin Krezović krezovic.armin at gmail.com
Fri Jul 8 18:59:48 UTC 2016


On 04.07.2016 12:13, Pekka Paalanen wrote:
> On Thu, 30 Jun 2016 06:29:00 +0200
> Armin Krezović <krezovic.armin at gmail.com> wrote:
> 
>> Current code flushes the connection when it receives
>> a delete window request. This means that a destroyed
>> window will remain available when X11 output gets
>> removed differently (ie, from a testing module).
>>
>> Signed-off-by: Armin Krezović <krezovic.armin at gmail.com>
>> ---
>>  libweston/compositor-x11.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/libweston/compositor-x11.c b/libweston/compositor-x11.c
>> index a3319b4..e2e6110 100644
>> --- a/libweston/compositor-x11.c
>> +++ b/libweston/compositor-x11.c
>> @@ -519,6 +519,8 @@ x11_output_destroy(struct weston_output *output_base)
>>  
>>  	xcb_destroy_window(backend->conn, output->window);
>>  
>> +	xcb_flush(backend->conn);
>> +
>>  	weston_output_destroy(&output->base);
>>  
>>  	free(output);
>> @@ -982,8 +984,6 @@ x11_backend_delete_window(struct x11_backend *b, xcb_window_t window)
>>  	if (output)
>>  		x11_output_destroy(&output->base);
>>  
>> -	xcb_flush(b->conn);
>> -
>>  	if (wl_list_empty(&b->compositor->output_list))
>>  		weston_compositor_exit(b->compositor);
>>  }
> 
> Hi,
> 
> so x11_backend_delete_window() no longer guarantees that xcb_flush() is
> called, but as far as I can see, it is ok. Pushed:
>    0da12b8..ad27693  master -> master
> 
> 
> Thanks,
> pq
> 

It calls x11_output_destroy, which is responsible for destroying the window.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 855 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20160708/0cefd774/attachment.sig>


More information about the wayland-devel mailing list