The ivi surface-id is made configurable by fetching it from the
environment variables. An environment variable IVI_SURFACE_ID needs to
be set to the required surface-id. In case it is not set then the code
will take 1 as the default surface-id.
Signed-off-by: Kshitij Kadam <Kshitij.Kadam@ifm.com>
The current order of protocol selection is xdg_base followed by
ivi_application followed by fullscreen_shell. As a result xdg_base
protocol will be selected even if ivi_application protocol is needed.
The order is now changed to ivi_application followed by fullscreen_shell
followed by xdg_base. It is now possible to select any one of the three
protocols by appropriately defining BUILD_IVI and BUILD_FULLSCREEN_SHELL
macro.
Signed-off-by: Kshitij Kadam <Kshitij.Kadam@ifm.com>
pass window and buffer index to buffer_release listener, so that it
fetches actual pointer to released buffer by wayland, instead of
directly passing a pointer to the UwacBuffer, which could result in
heap-use-after-free
`UwacWindowShmAllocBuffers()` allocates memory with `mmap` and never frees it
resulting in SIGBUS errors and running out of memory after some time.
Adding a corresponding `munmap` fixes this issue.
If pendingBuffer is set when it was otherwise NULL, then
UwacWindowSubmitBuffer will forever bail early, waiting for a frame
callback that will never come.
* Buffer submit now ignores duplicate buffer submit again.
* Frame callback is cleaned up in the callback function now.
* Damage region is currently ignored as there are screen artifacts otherwise.
The wayland buffer size always matches the current window size.
That might be different from the actual remote framebuffer size,
to when copying always use the correct strides to avoid distorted
screen content.
leaked_storage: Variable "data" going out of scope leaks the storage it points to.
copy_paste_error: "opaque_region" in "w->opaque_region" looks like a copy-paste error.