Wayland: Fix fallback decoration button input

Fallback decoration mouse button actions were performed for both press
and release events.  The requests made using a mouse button release
serials were presumably (and correctly) discarded by the compositor.

This commit removes the generation of these nuisance requests.
This commit is contained in:
Camilla Löwy 2026-01-27 16:53:32 +01:00
parent 0aa77a9a3a
commit abb9db0d75

View File

@ -363,8 +363,12 @@ static void updateFallbackDecorationCursor(_GLFWwindow* window,
static void handleFallbackDecorationButton(_GLFWwindow* window, static void handleFallbackDecorationButton(_GLFWwindow* window,
uint32_t serial, uint32_t serial,
uint32_t button) uint32_t button,
uint32_t state)
{ {
if (state != WL_POINTER_BUTTON_STATE_PRESSED)
return;
const double xpos = wl_fixed_to_double(window->wl.fallback.pointerX); const double xpos = wl_fixed_to_double(window->wl.fallback.pointerX);
const double ypos = wl_fixed_to_double(window->wl.fallback.pointerY); const double ypos = wl_fixed_to_double(window->wl.fallback.pointerY);
@ -1631,7 +1635,7 @@ static void pointerHandleButton(void* userData,
else else
{ {
if (window->wl.fallback.decorations) if (window->wl.fallback.decorations)
handleFallbackDecorationButton(window, serial, button); handleFallbackDecorationButton(window, serial, button, state);
} }
} }