~rockorager/libvaxis

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH] mouse: always stop handling if event is consumed

Details
Message ID
<20241125233902.24293-1-kristofer@thorlaksson.com>
DKIM signature
pass
Download raw message
Patch: +3 -3
The MouseHandler used to only consume the mouse events if there was a
last_handler widget defined AND whoever is using the API set
ctx.consume_event to true.

This change makes it so the event is consumed when ctx.consume_event is
set to true, even if there is no last_handler widget defined.
---
 src/vxfw/App.zig | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/vxfw/App.zig b/src/vxfw/App.zig
index 5b50fa0..b4408b7 100644
--- a/src/vxfw/App.zig
+++ b/src/vxfw/App.zig
@@ -273,8 +273,8 @@ const MouseHandler = struct {
                        try app.handleCommand(&ctx.cmds);
                    }
                    self.maybe_last_handler = item.widget;
                    return;
                }
                return;
            }
        }

@@ -295,8 +295,8 @@ const MouseHandler = struct {
                        try app.handleCommand(&ctx.cmds);
                    }
                    self.maybe_last_handler = target.widget;
                    return;
                }
                return;
            }
        }

@@ -318,8 +318,8 @@ const MouseHandler = struct {
                        try app.handleCommand(&ctx.cmds);
                    }
                    self.maybe_last_handler = item.widget;
                    return;
                }
                return;
            }
        }

-- 
2.39.5 (Apple Git-154)
Details
Message ID
<D5VO4192GO35.1HK0BPK0VKG81@timculverhouse.com>
In-Reply-To
<20241125233902.24293-1-kristofer@thorlaksson.com> (view parent)
DKIM signature
pass
Download raw message
On Mon Nov 25, 2024 at 5:39 PM CST, Kristófer R wrote:
> The MouseHandler used to only consume the mouse events if there was a
> last_handler widget defined AND whoever is using the API set
> ctx.consume_event to true.
>
> This change makes it so the event is consumed when ctx.consume_event is
> set to true, even if there is no last_handler widget defined.
> ---

Applied on main, thanks!

-- 
Tim
Reply to thread Export thread (mbox)