Merge pull request #321 from ricardomv/wayland-resize
Add support for resizing windows on Wayland.
This commit is contained in:
commit
434d0947e5
@ -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,
|
||||
|
@ -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,
|
||||
@ -122,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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user