From 08dccc390db164b787afd1f5338cfdb38bdcabe5 Mon Sep 17 00:00:00 2001 From: Ricardo Vieira Date: Thu, 10 Jul 2014 22:05:54 +0100 Subject: [PATCH 1/3] wayland: Remove unused code --- src/wl_init.c | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/src/wl_init.c b/src/wl_init.c index bde0f98a..53638470 100644 --- a/src/wl_init.c +++ b/src/wl_init.c @@ -38,31 +38,6 @@ #include "xkb_unicode.h" -static void handlePing(void* data, - struct wl_shell_surface* shellSurface, - uint32_t serial) -{ - wl_shell_surface_pong(shellSurface, serial); -} - -static void handleConfigure(void* data, - struct wl_shell_surface* shellSurface, - uint32_t edges, - int32_t width, - int32_t height) -{ -} - -static void handlePopupDone(void *data, struct wl_shell_surface *shell_surface) -{ -} - -static const struct wl_shell_surface_listener shellSurfaceListener = { - handlePing, - handleConfigure, - handlePopupDone -}; - static void pointerHandleEnter(void* data, struct wl_pointer* pointer, uint32_t serial, From 2c5c6a1ff55d49183a8c6feeaadf5fd2994b5a9f Mon Sep 17 00:00:00 2001 From: Ricardo Vieira Date: Thu, 10 Jul 2014 22:07:30 +0100 Subject: [PATCH 2/3] wayland: Add support for resizing windows --- src/wl_window.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/wl_window.c b/src/wl_window.c index d3373cb5..85ca5d59 100644 --- a/src/wl_window.c +++ b/src/wl_window.c @@ -45,6 +45,11 @@ static void handleConfigure(void* data, int32_t width, int32_t height) { + _GLFWwindow* window = data; + _glfwInputFramebufferSize(window, width, height); + _glfwInputWindowSize(window, width, height); + _glfwPlatformSetWindowSize(window, width, height); + _glfwInputWindowDamage(window); } static void handlePopupDone(void* data, From acf6bfb1f6f589b9edfda88d7665f3b57001279a Mon Sep 17 00:00:00 2001 From: Ricardo Vieira Date: Thu, 10 Jul 2014 22:08:28 +0100 Subject: [PATCH 3/3] wayland: Destroy window context before clearing the egl surface --- src/wl_window.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wl_window.c b/src/wl_window.c index 85ca5d59..6b5b08ee 100644 --- a/src/wl_window.c +++ b/src/wl_window.c @@ -127,11 +127,11 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window, void _glfwPlatformDestroyWindow(_GLFWwindow* window) { + _glfwDestroyContext(window); + if (window->wl.native) wl_egl_window_destroy(window->wl.native); - _glfwDestroyContext(window); - if (window->wl.shell_surface) wl_shell_surface_destroy(window->wl.shell_surface);