mouse: always stop handling if event is consumed
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.
This commit is contained in:
parent
18cc67c604
commit
382eb9a52a
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue