uint32_t h,
uint32_t w_mm,
uint32_t h_mm,
- uint32_t connection)
+ uint32_t connection,
+ uint32_t skip,
+ uint32_t attribute,
+ uint32_t attribute_state,
+ uint32_t error)
{
EomWaylandClientInfo *eom_client_info = (EomWaylandClientInfo *) data;
EomWaylandOutput *eom_wl_output = NULL;
INFO("INFO - id : %d, type : %d, mode : %d, w : %d, h : %d, w_mm : %d, h_mm : %d, conn : %d\n",
output_id, type, mode, w, h, w_mm, h_mm, connection);
- /* make external output info */
- eom_wl_output = calloc(1, sizeof(EomWaylandOutput));
- if (!eom_wl_output) {
- ERR("Fail to allocate the eom_output.\n");
- return;
- }
+ eom_wl_output = _eom_wayland_client_find_output_from_wl_output(
+ &eom_client_info->eom_wl_output_list, output_id);
+ if (eom_wl_output) {
+ eom_wl_output->width = w;
+ eom_wl_output->height = h;
+ eom_wl_output->physical_width = w_mm;
+ eom_wl_output->physical_height = h_mm;
+
+ /* save the output type */
+ if (eom_wl_output->eom_type != type)
+ eom_wl_output->eom_type = type;
+
+ /* check the connection status and call the notify */
+ if (eom_wl_output->eom_status != connection) {
+ eom_wl_output->eom_status = connection;
+
+ INFO("INFO send connection: %d", connection);
+
+ if (connection == WL_EOM_STATUS_CONNECTION)
+ _eom_wayland_client_call_notify(eom_wl_output,
+ EOM_OUTPUT_NOTIFY_ADD);
+ else if (connection == WL_EOM_STATUS_DISCONNECTION)
+ _eom_wayland_client_call_notify(eom_wl_output,
+ EOM_OUTPUT_NOTIFY_REMOVE);
+ }
+
+ /* check the eom mode and call the notify */
+ if (eom_wl_output->eom_mode != mode) {
+ eom_wl_output->eom_mode = mode;
+
+ INFO("INFO send mode:%d", mode);
+
+ _eom_wayland_client_call_notify(eom_wl_output,
+ EOM_OUTPUT_NOTIFY_MODE_CHANGED);
+ }
+
+ if (skip)
+ return;
+
+ /* check the eom attribute and call the notify */
+ if ((eom_wl_output->eom_attribute != attribute) ||
+ (eom_wl_output->eom_attribute_state != attribute_state)) {
+ eom_wl_output->eom_attribute = attribute;
+ eom_wl_output->eom_attribute_state = attribute_state;
- eom_wl_output->id = output_id;
- eom_wl_output->eom_type = type;
- eom_wl_output->eom_mode = mode;
- eom_wl_output->width = w;
- eom_wl_output->height = h;
- eom_wl_output->physical_width = w_mm;
- eom_wl_output->physical_height = h_mm;
- eom_wl_output->eom_status = connection;
- eom_wl_output->client_info = &wl_client_info;
- eom_wl_output->error = WL_EOM_ERROR_NONE;
-
- wl_list_insert(&eom_client_info->eom_wl_output_list, &eom_wl_output->link);
+ INFO("INFO NEW send attribute:%d", attribute);
+ INFO("INFO NEW send attribute state:%d", attribute_state);
+
+ _eom_wayland_client_call_notify(eom_wl_output,
+ EOM_OUTPUT_NOTIFY_ATTRIBUTE_CHANGED);
+ }
+
+ eom_wl_output->error = error;
+ } else {
+ /* make external output info */
+ eom_wl_output = calloc(1, sizeof(EomWaylandOutput));
+ if (!eom_wl_output) {
+ ERR("Fail to allocate the eom_output.\n");
+ return;
+ }
+
+ eom_wl_output->id = output_id;
+ eom_wl_output->eom_type = type;
+ eom_wl_output->eom_mode = mode;
+ eom_wl_output->width = w;
+ eom_wl_output->height = h;
+ eom_wl_output->physical_width = w_mm;
+ eom_wl_output->physical_height = h_mm;
+ eom_wl_output->eom_status = connection;
+ eom_wl_output->client_info = &wl_client_info;
+ eom_wl_output->error = WL_EOM_ERROR_NONE;
+
+ wl_list_insert(&eom_client_info->eom_wl_output_list, &eom_wl_output->link);
+ }
}
/*LCOV_EXCL_STOP*/
/*LCOV_EXCL_START*/
NULL,
NULL,
NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
&xdg_surface_interface,
NULL,
&wl_shell_surface_interface,
static const struct wl_message wl_eom_requests[] = {
{ "set_attribute", "uu", types + 0 },
- { "set_xdg_window", "uo", types + 8 },
- { "set_shell_window", "uo", types + 10 },
+ { "set_xdg_window", "uo", types + 12 },
+ { "set_shell_window", "uo", types + 14 },
{ "get_output_info", "u", types + 0 },
};
static const struct wl_message wl_eom_events[] = {
{ "output_count", "u", types + 0 },
- { "output_info", "uuuuuuuu", types + 0 },
+ { "output_info", "uuuuuuuuuuuu", types + 0 },
{ "output_type", "uuu", types + 0 },
{ "output_mode", "uu", types + 0 },
{ "output_attribute", "uuuu", types + 0 },