mirror of
https://github.com/glfw/glfw.git
synced 2026-02-06 18:57:36 +00:00
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:
parent
0aa77a9a3a
commit
abb9db0d75
@ -363,8 +363,12 @@ static void updateFallbackDecorationCursor(_GLFWwindow* window,
|
||||
|
||||
static void handleFallbackDecorationButton(_GLFWwindow* window,
|
||||
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 ypos = wl_fixed_to_double(window->wl.fallback.pointerY);
|
||||
|
||||
@ -1631,7 +1635,7 @@ static void pointerHandleButton(void* userData,
|
||||
else
|
||||
{
|
||||
if (window->wl.fallback.decorations)
|
||||
handleFallbackDecorationButton(window, serial, button);
|
||||
handleFallbackDecorationButton(window, serial, button, state);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user