fix: only notify mouse-up on mouse-up (#24240)
This commit is contained in:
parent
3853fd3e99
commit
acb64a2d3c
1 changed files with 4 additions and 4 deletions
|
@ -131,10 +131,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)handleClickNotifications:(NSEvent*)event {
|
- (void)handleClickNotifications:(NSEvent*)event {
|
||||||
trayIcon_->NotifyMouseUp(
|
|
||||||
gfx::ScreenPointFromNSPoint([event locationInWindow]),
|
|
||||||
ui::EventFlagsFromModifiers([event modifierFlags]));
|
|
||||||
|
|
||||||
// If we are ignoring double click events, we should ignore the `clickCount`
|
// If we are ignoring double click events, we should ignore the `clickCount`
|
||||||
// value and immediately emit a click event.
|
// value and immediately emit a click event.
|
||||||
BOOL shouldBeHandledAsASingleClick =
|
BOOL shouldBeHandledAsASingleClick =
|
||||||
|
@ -172,6 +168,10 @@
|
||||||
- (void)mouseUp:(NSEvent*)event {
|
- (void)mouseUp:(NSEvent*)event {
|
||||||
[[statusItem_ button] highlight:NO];
|
[[statusItem_ button] highlight:NO];
|
||||||
|
|
||||||
|
trayIcon_->NotifyMouseUp(
|
||||||
|
gfx::ScreenPointFromNSPoint([event locationInWindow]),
|
||||||
|
ui::EventFlagsFromModifiers([event modifierFlags]));
|
||||||
|
|
||||||
[self handleClickNotifications:event];
|
[self handleClickNotifications:event];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue