From 3d99753e7aac945ede3240679d2f75406b3b55fd Mon Sep 17 00:00:00 2001 From: Junkyeong Kim Date: Mon, 31 Aug 2015 17:07:57 +0900 Subject: [PATCH] remove from output list if output type is none Change-Id: I1931a666af0f2f47f75aa6fd520b261f3469b01f Signed-off-by: Junkyeong Kim --- packaging/libeom.spec | 2 +- src/wayland/eom-wayland.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/packaging/libeom.spec b/packaging/libeom.spec index bdecb49..da816e0 100644 --- a/packaging/libeom.spec +++ b/packaging/libeom.spec @@ -4,7 +4,7 @@ Name: libeom Summary: External Output Manager Library Version: 1.0.1 -Release: 1 +Release: 2 Group: Graphics/X Window System License: MIT Source0: %{name}-%{version}.tar.gz diff --git a/src/wayland/eom-wayland.c b/src/wayland/eom-wayland.c index 9384f0e..31bc2aa 100644 --- a/src/wayland/eom-wayland.c +++ b/src/wayland/eom-wayland.c @@ -620,6 +620,22 @@ _eom_wayland_client_initialize() wl_display_dispatch(wl_client_info.display); wl_display_roundtrip(wl_client_info.display); + /* remove type none eom_wl_outputs */ + if (!wl_list_empty(&wl_client_info.eom_wl_output_list)) { + EomWaylandOutput *eom_wl_output = NULL; + EomWaylandOutput *tmp = NULL; + + wl_list_for_each_safe(eom_wl_output, tmp, &wl_client_info.eom_wl_output_list, link) { + if (eom_wl_output->eom_type == WL_EOM_TYPE_NONE) { + WARN("[EOM_CLIENT] eom_type is NONE. remove.\n"); + wl_output_destroy(eom_wl_output->output); + wl_list_remove(&eom_wl_output->link); + free(eom_wl_output); + eom_wl_output = NULL; + } + } + } + /* output list */ if (wl_list_empty(&wl_client_info.eom_wl_output_list)) WARN("[EOM_CLIENT] no wl output at this device.\n"); -- 2.7.4