[waffle] [PATCH 3/4] wayland: do not link against wayland-egl
Emil Velikov
emil.l.velikov at gmail.com
Mon Feb 23 12:32:27 PST 2015
Instead use the function pointers that we fetched upon the platform
setup.
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
cmake/Modules/WafflePrintConfigurationSummary.cmake | 1 -
src/waffle/CMakeLists.txt | 1 -
src/waffle/wayland/wayland_window.c | 15 +++++++++++----
3 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/cmake/Modules/WafflePrintConfigurationSummary.cmake b/cmake/Modules/WafflePrintConfigurationSummary.cmake
index 1f38db5..27aa8dc 100644
--- a/cmake/Modules/WafflePrintConfigurationSummary.cmake
+++ b/cmake/Modules/WafflePrintConfigurationSummary.cmake
@@ -62,7 +62,6 @@ if(waffle_has_wayland)
message(" wayland-client_INCLUDE_DIRS: ${wayland-client_INCLUDE_DIRS}")
message(" wayland-client_LDFLAGS: ${wayland-client_LDFLAGS}")
message(" wayland-egl_INCLUDE_DIRS: ${wayland-egl_INCLUDE_DIRS}")
- message(" wayland-egl_LDFLAGS: ${wayland-egl_LDFLAGS}")
endif()
if(waffle_has_x11)
message(" x11-xcb_INCLUDE_DIRS: ${x11-xcb_INCLUDE_DIRS}")
diff --git a/src/waffle/CMakeLists.txt b/src/waffle/CMakeLists.txt
index ac9b415..4a473be 100644
--- a/src/waffle/CMakeLists.txt
+++ b/src/waffle/CMakeLists.txt
@@ -44,7 +44,6 @@ if(waffle_on_linux)
if(waffle_has_wayland)
list(APPEND waffle_libdeps
${wayland-client_LDFLAGS}
- ${wayland-egl_LDFLAGS}
)
endif()
if(waffle_has_x11)
diff --git a/src/waffle/wayland/wayland_window.c b/src/waffle/wayland/wayland_window.c
index 011b0c2..2cdf8e6 100644
--- a/src/waffle/wayland/wayland_window.c
+++ b/src/waffle/wayland/wayland_window.c
@@ -39,11 +39,14 @@
#include "wegl_config.h"
#include "wayland_display.h"
+#include "wayland_platform.h"
#include "wayland_window.h"
bool
wayland_window_destroy(struct wcore_window *wc_self)
{
+ struct wcore_platform *wc_plat = wc_self->display->platform;
+ struct wayland_platform *plat = wayland_platform(wegl_platform(wc_plat));
struct wayland_window *self = wayland_window(wc_self);
bool ok = true;
@@ -53,7 +56,7 @@ wayland_window_destroy(struct wcore_window *wc_self)
ok &= wegl_window_teardown(&self->wegl);
if (self->wl_window)
- wl_egl_window_destroy(self->wl_window);
+ plat->wl_egl_window_destroy(self->wl_window);
if (self->wl_shell_surface)
wl_shell_surface_destroy(self->wl_shell_surface);
@@ -102,6 +105,7 @@ wayland_window_create(struct wcore_platform *wc_plat,
const intptr_t attrib_list[])
{
struct wayland_window *self;
+ struct wayland_platform *plat = wayland_platform(wegl_platform(wc_plat));
struct wayland_display *dpy = wayland_display(wc_config->display);
bool ok = true;
@@ -142,7 +146,8 @@ wayland_window_create(struct wcore_platform *wc_plat,
&shell_surface_listener,
NULL);
- self->wl_window = wl_egl_window_create(self->wl_surface, width, height);
+ self->wl_window = plat->wl_egl_window_create(self->wl_surface,
+ width, height);
if (!self->wl_window) {
wcore_errorf(WAFFLE_ERROR_UNKNOWN, "wl_egl_window_create failed");
goto error;
@@ -203,10 +208,12 @@ wayland_window_resize(struct wcore_window *wc_self,
int32_t width, int32_t height)
{
struct wayland_window *self = wayland_window(wc_self);
+ struct wcore_platform *wc_plat = wc_self->display->platform;
+ struct wayland_platform *plat = wayland_platform(wegl_platform(wc_plat));
struct wayland_display *dpy = wayland_display(self->wegl.wcore.display);
- wl_egl_window_resize(wayland_window(wc_self)->wl_window,
- width, height, 0, 0);
+ plat->wl_egl_window_resize(wayland_window(wc_self)->wl_window,
+ width, height, 0, 0);
if (!wayland_display_sync(dpy))
return false;
--
2.3.0
More information about the waffle
mailing list