e_hwc_window_queue: unset user when target window must use queue 42/217342/1
authorChangyeon Lee <cyeon.lee@samsung.com>
Thu, 7 Nov 2019 05:41:08 +0000 (14:41 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Fri, 8 Nov 2019 05:23:59 +0000 (14:23 +0900)
Change-Id: Ic83129fee7adcc52d21333b0deaae080ee2aa4e5

src/bin/e_hwc_window_queue.c

index a365b50..9143b8e 100644 (file)
@@ -1071,26 +1071,42 @@ void
 _e_hwc_window_queue_cb_accepted_state_set(void *data, E_Hwc_Window *hwc_window)
 {
    E_Hwc_Window_State state;
+   E_Hwc_Window *tmp_hwc_window;
    E_Hwc_Window_Queue *queue = NULL;
+   Eina_List *l, *ll;
 
    if (!hwc_window->queue) return;
-   if (e_hwc_window_is_target(hwc_window)) return;
 
    queue = hwc_window->queue;
    state = e_hwc_window_accepted_state_get(hwc_window);
 
    if ((state == E_HWC_WINDOW_STATE_DEVICE))
      {
+        if (e_hwc_window_is_target(hwc_window)) return;
+
         if(queue->state == E_HWC_WINDOW_QUEUE_STATE_SET_WAITING_BUFFER)
           _e_hwc_window_queue_set(queue);
      }
    else if ((state == E_HWC_WINDOW_STATE_CLIENT) || (state == E_HWC_WINDOW_STATE_NONE))
      {
-        /* if buffer of queue is commited, hwc_window should be set by Device Type */
-        if (!hwc_window->buffer.tsurface) return;
+        if (e_hwc_window_is_target(hwc_window))
+          {
+             if (queue->state != E_HWC_WINDOW_QUEUE_STATE_SET) return;
+
+             EINA_LIST_FOREACH_SAFE(queue->user_pending_set, l, ll, tmp_hwc_window)
+               e_hwc_window_constraints_reset(tmp_hwc_window);
 
-        if (e_hwc_window_queue_buffer_find(queue, hwc_window->buffer.tsurface))
-          e_hwc_window_constraints_reset(hwc_window);
+             if (queue->user)
+               e_hwc_window_constraints_reset(queue->user);
+          }
+        else
+          {
+             /* if buffer of queue is commited, hwc_window should be set by Device Type */
+             if (!hwc_window->buffer.tsurface) return;
+
+             if (e_hwc_window_queue_buffer_find(queue, hwc_window->buffer.tsurface))
+               e_hwc_window_constraints_reset(hwc_window);
+          }
      }
 }