summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Antognolli <rafael.antognolli@intel.com>2013-08-31 15:20:22 -0300
committerRafael Antognolli <rafael.antognolli@intel.com>2013-10-10 13:24:22 -0300
commit1cef77bfd784772539a395363b3aecbd3c2655d5 (patch)
tree0afc84c94f10bc843b22e64540d20bc00c218033
parentd201747cc8b0f74035c8069461c7df5704719bfe (diff)
ecore/wayland: Add and initialize subcompositor inside Ecore_Wayland.
-rw-r--r--src/lib/ecore_wayland/Ecore_Wayland.h2
-rw-r--r--src/lib/ecore_wayland/ecore_wl.c7
2 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/ecore_wayland/Ecore_Wayland.h b/src/lib/ecore_wayland/Ecore_Wayland.h
index 05ceb00daf..c9b3e1f6ca 100644
--- a/src/lib/ecore_wayland/Ecore_Wayland.h
+++ b/src/lib/ecore_wayland/Ecore_Wayland.h
@@ -12,6 +12,7 @@
12# include <wayland-client.h> 12# include <wayland-client.h>
13# include <wayland-cursor.h> 13# include <wayland-cursor.h>
14# include <xkbcommon/xkbcommon.h> 14# include <xkbcommon/xkbcommon.h>
15# include <subsurface-client-protocol.h>
15 16
16# ifdef EAPI 17# ifdef EAPI
17# undef EAPI 18# undef EAPI
@@ -101,6 +102,7 @@ struct _Ecore_Wl_Display
101 struct wl_display *display; 102 struct wl_display *display;
102 struct wl_registry *registry; 103 struct wl_registry *registry;
103 struct wl_compositor *compositor; 104 struct wl_compositor *compositor;
105 struct wl_subcompositor *subcompositor;
104 struct wl_shell *shell; 106 struct wl_shell *shell;
105 struct wl_shell *desktop_shell; 107 struct wl_shell *desktop_shell;
106 struct wl_shm *shm; 108 struct wl_shm *shm;
diff --git a/src/lib/ecore_wayland/ecore_wl.c b/src/lib/ecore_wayland/ecore_wl.c
index acce7282fb..acc5988af9 100644
--- a/src/lib/ecore_wayland/ecore_wl.c
+++ b/src/lib/ecore_wayland/ecore_wl.c
@@ -397,6 +397,8 @@ _ecore_wl_shutdown(Eina_Bool close)
397 wl_data_device_manager_destroy(_ecore_wl_disp->wl.data_device_manager); 397 wl_data_device_manager_destroy(_ecore_wl_disp->wl.data_device_manager);
398 if (_ecore_wl_disp->wl.compositor) 398 if (_ecore_wl_disp->wl.compositor)
399 wl_compositor_destroy(_ecore_wl_disp->wl.compositor); 399 wl_compositor_destroy(_ecore_wl_disp->wl.compositor);
400 if (_ecore_wl_disp->wl.subcompositor)
401 wl_compositor_destroy(_ecore_wl_disp->wl.subcompositor);
400 if (_ecore_wl_disp->wl.display) 402 if (_ecore_wl_disp->wl.display)
401 { 403 {
402 wl_registry_destroy(_ecore_wl_disp->wl.registry); 404 wl_registry_destroy(_ecore_wl_disp->wl.registry);
@@ -515,6 +517,11 @@ _ecore_wl_cb_handle_global(void *data, struct wl_registry *registry, unsigned in
515 ewd->wl.compositor = 517 ewd->wl.compositor =
516 wl_registry_bind(registry, id, &wl_compositor_interface, 3); 518 wl_registry_bind(registry, id, &wl_compositor_interface, 3);
517 } 519 }
520 else if (!strcmp(interface, "wl_subcompositor"))
521 {
522 ewd->wl.subcompositor =
523 wl_registry_bind(registry, id, &wl_subcompositor_interface, 1);
524 }
518 else if (!strcmp(interface, "wl_output")) 525 else if (!strcmp(interface, "wl_output"))
519 _ecore_wl_output_add(ewd, id); 526 _ecore_wl_output_add(ewd, id);
520 else if (!strcmp(interface, "wl_seat")) 527 else if (!strcmp(interface, "wl_seat"))