_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);
+ }
}
}