From 7b65ecf77c6980d8d9a39bb38dad688cf4dac86c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Mon, 20 Jun 2022 22:57:18 +0200 Subject: [PATCH] Wayland: Use enum type to store enum value (cherry picked from commit 80dc0533cf7234517328537a54b7675f0588713c) --- src/wl_platform.h | 2 +- src/wl_window.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/wl_platform.h b/src/wl_platform.h index bd59fcd1..2146e2ad 100644 --- a/src/wl_platform.h +++ b/src/wl_platform.h @@ -224,7 +224,7 @@ typedef struct _GLFWwindowWayland struct { struct wl_buffer* buffer; _GLFWdecorationWayland top, left, right, bottom; - int focus; + _GLFWdecorationSideWayland focus; } decorations; } _GLFWwindowWayland; diff --git a/src/wl_window.c b/src/wl_window.c index d11e5f93..84d371c2 100644 --- a/src/wl_window.c +++ b/src/wl_window.c @@ -1019,9 +1019,9 @@ static char* readDataOfferAsString(struct wl_data_offer* offer, const char* mime } static _GLFWwindow* findWindowFromDecorationSurface(struct wl_surface* surface, - int* which) + _GLFWdecorationSideWayland* which) { - int focus; + _GLFWdecorationSideWayland focus; _GLFWwindow* window = _glfw.windowListHead; if (!which) which = &focus; @@ -1063,7 +1063,7 @@ static void pointerHandleEnter(void* userData, if (!surface) return; - int focus = 0; + _GLFWdecorationSideWayland focus = mainWindow; _GLFWwindow* window = wl_surface_get_user_data(surface); if (!window) {