client: Add new API to handle pending events 54/303454/1
authorJoonbum Ko <joonbum.ko@samsung.com>
Fri, 2 Jun 2023 03:52:14 +0000 (12:52 +0900)
committerJoonbum Ko <joonbum.ko@samsung.com>
Thu, 28 Dec 2023 03:40:59 +0000 (12:40 +0900)
commit68675d3dc273f94e19f88cebcb8abe7a913ff5b0
treecbf36b4be37794c80b3197a3abcb397236fce1db
parent8184afa7e6b07b06ae251f54f909070cde6ea68d
client: Add new API to handle pending events

 - If the FD is obtained through tdm_client_get_fd() and
 the client POLL the fd directly, the events in the default queue
 may not be processed if the wl_display_roundtrip_queue() is called.

 1. client get fd and poll
 2. client call tdm_client_output_create_vblank()
  <- 3. display server send event (default queue)
 4. wl_display_roundtrip_queue() is called inside
   tdm_client_output_create_vblank() (private queue)
   4.1. read_events/queue_events done
   4.2. dispatch events only in private queue
 5. client locked up because vblank event in default queue
   cannot be processed.

 - This problem can be solved by providing a new API that
  allows to handle the pending events in default queue.

Change-Id: Ife737cf43edd5aa9d4c0cc464cc9f88bb69840a1
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
client/tdm_client.c
client/tdm_client.h