From 5c75ac0a96cd819bc8b8540ddc04621ba7c6da9a Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 17 Mar 2019 15:07:32 +0530 Subject: [PATCH] GLFW Wayland backend: Dont fire resize events for Wayland configure events that dont change the window size. Fixes #1473 --- glfw/wl_window.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/glfw/wl_window.c b/glfw/wl_window.c index 18286708a..daa65b641 100644 --- a/glfw/wl_window.c +++ b/glfw/wl_window.c @@ -101,8 +101,10 @@ static void handleConfigure(void* data, height = window->maxheight; } - _glfwInputWindowSize(window, width, height); - _glfwPlatformSetWindowSize(window, width, height); + if (width != window->wl.width || height != window->wl.height) { + _glfwInputWindowSize(window, width, height); + _glfwPlatformSetWindowSize(window, width, height); + } _glfwInputWindowDamage(window); } @@ -628,8 +630,10 @@ static void xdgToplevelHandleConfigure(void* data, } } - _glfwInputWindowSize(window, width, height); - _glfwPlatformSetWindowSize(window, width, height); + if (width != window->wl.width || height != window->wl.height) { + _glfwInputWindowSize(window, width, height); + _glfwPlatformSetWindowSize(window, width, height); + } _glfwInputWindowDamage(window); }