client: Add new API to handle pending events 79/293679/2
authorJoonbum Ko <joonbum.ko@samsung.com>
Fri, 2 Jun 2023 03:52:14 +0000 (12:52 +0900)
committerJoonbum Ko <joonbum.ko@samsung.com>
Thu, 8 Jun 2023 04:20:32 +0000 (13:20 +0900)
commitee8218e9f75c5289371661c3a13bfa2d48e02af1
tree4192fd41dca0185a57634b79261a12f3987f20ba
parentfd3d0651f56d606845f5c5317b99bd1f7baa06e6
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