Hi all,

Since some time I’m working on ivi-shell to add xdg-protocol support by means 
of libweston-desktop. Due to my changes both xdg-protocol applications and 
ivi-shell / ivi-application-protocol applications are supported within 
ivi-shell now. The known functionality is preserved and just extended by a 
further protocol. The advantage is that client applications do not need to be 
edited to generate an id and are also not limited to use the custom 
ivi-application protocol anymore, since the ids are handled by an id agent 
inside of weston now.

As a preparation for the changes the goto labels in ivi-shell have been 
reworked to avoid memory leaks. In ivi-layout I added an interface 
(ivi_layout_surface_set_id) to set the surface-id of an ivi-layout-surface. It 
can be done once after being created by an xdg-protocol application to assign a 
numeric id by means of an id agent for example. Additionally I introduced a new 
event to notify about a desktop surface being configured 
(desktop_surface_configured). An id agent can register to this event and react 
to this accordingly by assigning an id by means of ivi_layout_surface_set_id. 
As a result I also changed the test client applications in the Weston 
repository and removed the ivi-application protocol support since that has only 
been used, if xdg protocol is not supported. Finally hmi-controller has been 
edited to accept desktop surfaces.

There are some things that can be done in the future:  At first it would be 
diligent, if hmi-controller would also use xdg protocol for the GUI itself. 
Then also the surface_configure event could be removed from hmi-controller. 
Secondly the weston unit tests should also test the interface changes for 
surface_set_id and also should stop using the ivi-application protocol.

Thanks for reading and questions are very welcome.

[changes version 2]
Adjustments have been done according to Quentin Glidic's remarks.
* weston_desktop_surface_create_view is used to create a view for toplevel 
desktop surfaces
* weston_desktop_surface_unlink_view is used to destroy a view for toplevel 
desktop surfaces
* weston_desktop_surface_set_user_data and 
weston_desktop_surface_get_user_data() are used instead of loops

Thanks for your review.

Reviewed-by: Emre Ucan <eu...@de.adit-jv.com>
[/changes version 2]

[changes version 3]
The patches have been rebased and adjusted to Weston 4.0.

Reviewed-by: Emre Ucan <eu...@de.adit-jv.com> 
[/changes version 3]

Michael Teyfel (15):
  ivi-shell: rework goto labels to avoid memory leaks
  ivi-shell: removed assert
  ivi-shell: introduction of IVI_INVALID_ID
  layout-interface: added interface to change surface id
  ivi-layout: introduced configure_desktop_changed
  ivi-layout: introduced surface create and configure
  ivi-shell: linked libweston-desktop and added structs
  ivi-layout: use libweston-desktop api for views
  ivi-shell: added libweston-desktop-api implementation
  ivi-shell: remove surface_destroy_listener
  ivi-shell: create weston_desktop in wet_shell_init
  hmi-controller: register for desktop_surface_configured
  simple-egl: remove ivi-application support
  simple-shm: remove ivi-application support
  window client: remove ivi-application support

 Makefile.am                    |  11 +--
 clients/simple-egl.c           |  86 +++---------------
 clients/simple-shm.c           |  40 ---------
 clients/window.c               |  44 +---------
 ivi-shell/hmi-controller.c     |  70 ++++++++-------
 ivi-shell/ivi-layout-export.h  |  18 ++++
 ivi-shell/ivi-layout-private.h |   3 +
 ivi-shell/ivi-layout-shell.h   |   8 ++
 ivi-shell/ivi-layout.c         | 155 +++++++++++++++++++++++++++------
 ivi-shell/ivi-shell.c          | 193 ++++++++++++++++++++++++++++++++++++++---
 ivi-shell/ivi-shell.h          |   2 +
 11 files changed, 395 insertions(+), 235 deletions(-)


wayland-devel mailing list

Reply via email to