use ecore_wl2 instead of ecore_wayland 14/173214/1
authorJunkyeong Kim <jk0430.kim@samsung.com>
Tue, 20 Mar 2018 04:40:28 +0000 (13:40 +0900)
committerJunkyeong Kim <jk0430.kim@samsung.com>
Tue, 20 Mar 2018 04:53:41 +0000 (13:53 +0900)
Change-Id: Ia6ce7c41c8bd4e3c267b94524734f8a12990ba12
Signed-off-by: Junkyeong Kim <jk0430.kim@samsung.com>
configure.ac
packaging/libeom.spec
protocol/eom.xml
src/eom-wayland.c

index 3287a65..6578c4e 100755 (executable)
@@ -79,10 +79,12 @@ PKG_CHECK_MODULES(XDG_SHELL_CLIENT, xdg-shell-client)
 LIBEOM_CFLAGS="$LIBEOM_CFLAGS $WAYLAND_CLIENT_CFLAGS $XDG_SHELL_CLIENT_CFLAGS"
 LIBEOM_LIBS="$LIBEOM_LIBS $WAYLAND_CLIENT_LIBS $XDG_SHELL_CLIENT_LIBS"
 
-PKG_CHECK_MODULES(ECORE_WAYLAND, ecore-wayland)
+PKG_CHECK_MODULES(ECORE_WAYLAND, ecore-wl2)
 LIBEOM_CFLAGS="$LIBEOM_CFLAGS $ECORE_WAYLAND_CFLAGS"
 LIBEOM_LIBS="$LIBEOM_LIBS $ECORE_WAYLAND_LIBS"
 
+LIBEOM_CFLAGS="$LIBEOM_CFLAGS -DEFL_BETA_API_SUPPORT "
+
 #      WAYLAND_PREFIX=`$PKG_CONFIG --variable=prefix wayland-client`
 #    AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner],,
 #                  [${WAYLAND_PREFIX}/bin$PATH_SEPARATOR$PATH])
index 2412a2c..d8541c4 100644 (file)
@@ -10,7 +10,7 @@ Source0: %{name}-%{version}.tar.gz
 Source1001:    %name.manifest
 
 BuildRequires:  pkgconfig(wayland-client)
-BuildRequires:  pkgconfig(ecore-wayland)
+BuildRequires:  pkgconfig(ecore-wl2)
 BuildRequires:  pkgconfig(xdg-shell-client)
 BuildRequires:  pkgconfig(xdg-shell-server)
 BuildRequires:  pkgconfig(dlog)
index b1fd312..0680029 100644 (file)
         Use shell_surface to external output.
       </description>
       <arg name="output_id" type="uint"/>
-      <arg name="surface" type="object" interface="wl_shell_surface" allow-null="false"/>
+      <arg name="surface" type="object" interface="zxdg_surface_v6" allow-null="false"/>
     </request>
 
     <request name="get_output_info">
index c298281..37e085a 100644 (file)
 #include "eom-private.h"
 #include "eom-client-protocol.h"
 #include "xdg-shell-client-protocol.h"
-#include <Ecore_Wayland.h>
+#include <Ecore_Wl2.h>
 
 typedef struct _EomWaylandClientInfo {
        /* wl */
        struct wl_display *display;
        struct wl_registry *registry;
+       Ecore_Wl2_Display *wl2_display;
 
        struct wl_eom *eom;
 
@@ -790,12 +791,15 @@ _eom_wayland_client_initialize()
 {
        int ecore_count = -1;
 
-       ecore_count = ecore_wl_init(NULL);
+       ecore_count = ecore_wl2_init();
        RETV_IF_FAIL(ecore_count > 0, false);
 
        wl_list_init(&wl_client_info.eom_wl_output_list);
 
-       wl_client_info.display = ecore_wl_display_get();
+       wl_client_info.wl2_display = ecore_wl2_connected_display_get(NULL);
+       GOTO_IF_FAIL(wl_client_info.wl2_display != NULL, fail);
+
+       wl_client_info.display = ecore_wl2_display_get(wl_client_info.wl2_display);
        GOTO_IF_FAIL(wl_client_info.display != NULL, fail);
 
        /* get the registry */
@@ -838,13 +842,16 @@ _eom_wayland_client_initialize()
 
        return true;
 fail:
-
        if (wl_client_info.registry) {
                wl_registry_destroy(wl_client_info.registry);
                wl_client_info.registry = NULL;
        }
 
-       ecore_wl_shutdown();
+       if (wl_client_info.wl2_display) {
+               ecore_wl2_display_disconnect(wl_client_info.wl2_display);
+               wl_client_info.wl2_display = NULL;
+       }
+       ecore_wl2_shutdown();
 
        return false;
 }
@@ -870,7 +877,11 @@ _eom_wayland_client_deinitialize()
                wl_registry_destroy(wl_client_info.registry);
                wl_client_info.registry = NULL;
        }
-       ecore_wl_shutdown();
+       if (wl_client_info.wl2_display) {
+                       ecore_wl2_display_disconnect(wl_client_info.wl2_display);
+                       wl_client_info.wl2_display = NULL;
+       }
+       ecore_wl2_shutdown();
 
        INFO("[EOM_CLIENT] wayland client deinit.");
 }
@@ -1050,15 +1061,14 @@ eom_wayland_client_set_window(eom_output_id output_id, Evas_Object *win)
 {
        GArray *array = NULL;
        GValue v = G_VALUE_INIT;
-       Ecore_Wl_Window *e_wl_win = NULL;
+       Ecore_Wl2_Window *e_wl_win = NULL;
        EomWaylandOutput *eom_wl_output = NULL;
-       struct wl_shell_surface *shell_surface = NULL;
-       struct xdg_surface *xdg_shell_surface = NULL;
+       struct zxdg_surface_v6 *shell_surface = NULL;
        int ret = 0;
 
        evas_object_show(win);
 
-       e_wl_win = elm_win_wl_window_get(win);
+       e_wl_win = (Ecore_Wl2_Window *)elm_win_wl_window_get(win);
        GOTO_IF_FAIL(e_wl_win != NULL, fail);
 
        eom_wl_output = _eom_wayland_client_find_output_from_eom_output(
@@ -1070,17 +1080,12 @@ eom_wayland_client_set_window(eom_output_id output_id, Evas_Object *win)
 #endif
 
        /* set full screen at output */
-       xdg_shell_surface = ecore_wl_window_xdg_surface_get(e_wl_win);
-       if (xdg_shell_surface) {
-               wl_eom_set_xdg_window(wl_client_info.eom, output_id, xdg_shell_surface);
+       shell_surface = ecore_wl2_window_shell_surface_get(e_wl_win);
+       if (shell_surface) {
+               wl_eom_set_shell_window(wl_client_info.eom, output_id, shell_surface);
        } else {
-               shell_surface = ecore_wl_window_shell_surface_get(e_wl_win);
-               if (shell_surface) {
-                       wl_eom_set_shell_window(wl_client_info.eom, output_id, shell_surface);
-               } else {
-                       ERR("no wl surface.\n");
-                       goto fail;
-               }
+               ERR("no wl surface.\n");
+               goto fail;
        }
 
        /* TODO: