[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v11 1/6] ui/cocoa: Release specific mouse buttons
From: |
Peter Maydell |
Subject: |
Re: [PATCH v11 1/6] ui/cocoa: Release specific mouse buttons |
Date: |
Thu, 22 Feb 2024 16:40:07 +0000 |
On Sat, 17 Feb 2024 at 11:18, Akihiko Odaki <akihiko.odaki@daynix.com> wrote:
>
> ui/cocoa used to release all mouse buttons when it sees
> NSEventTypeLeftMouseUp, NSEventTypeRightMouseUp, or
> NSEventTypeOtherMouseUp, but it can instead release specific one
> according to the delivered event.
>
> Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
> ---
> ui/cocoa.m | 132
> ++++++++++++++++++++++++++-----------------------------------
> 1 file changed, 55 insertions(+), 77 deletions(-)
This is a pain to review because it does three things at once:
(1) a no-behaviour change refactoring where various cases
that previously did 'break' now 'return true'
(2) a refactoring so mouse events are handled in a separate
method, rather than by setting the mouse_event = true bool
and handling this at the bottom of the handleEventLocked method
(3) the actual behaviour change that the comment message talks about
If this was three patches that each did one of those things,
two of them would be trivial to review and the code changes
required for 3 would be easy to find rather than buried in
with the changes for the first two.
thanks
-- PMM
- [PATCH v11 0/6] ui/cocoa: Use NSWindow's ability to resize, Akihiko Odaki, 2024/02/17
- [PATCH v11 1/6] ui/cocoa: Release specific mouse buttons, Akihiko Odaki, 2024/02/17
- Re: [PATCH v11 1/6] ui/cocoa: Release specific mouse buttons,
Peter Maydell <=
- [PATCH v11 2/6] ui/cocoa: Scale with NSView instead of Core Graphics, Akihiko Odaki, 2024/02/17
- [PATCH v11 3/6] ui/cocoa: Let the platform toggle fullscreen, Akihiko Odaki, 2024/02/17
- [PATCH v11 4/6] ui/cocoa: Make window resizable, Akihiko Odaki, 2024/02/17
- [PATCH v11 5/6] ui/cocoa: Call console_select() with the BQL, Akihiko Odaki, 2024/02/17
- [PATCH v11 6/6] ui/cocoa: Remove stretch_video flag, Akihiko Odaki, 2024/02/17