perf:not monitor mouse move event when disable popbutton#946
Merged
tisfeng merged 3 commits intotisfeng:devfrom Aug 18, 2025
Merged
perf:not monitor mouse move event when disable popbutton#946tisfeng merged 3 commits intotisfeng:devfrom
tisfeng merged 3 commits intotisfeng:devfrom
Conversation
925773b to
73b4f14
Compare
Owner
|
你好,感谢你的 PR! 修正 NSEventMask 没问题,这个当初可能我没注意,写错了。 至于移除 |
Contributor
Author
好的,辛苦测试.我通过在EZEventMonitor.m中搜索相关symbol来确定的影响范围,发现 Easydict/Easydict/objc/EventMonitor/EZEventMonitor.m Lines 815 to 836 in 415f826 |
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> - Changed `NSEventTypeRightMouseDown` to `NSEventMaskRightMouseDown` in the global event mask. - This ensures the right mouse down event is properly monitored for relevant actions.
Owner
|
ok,测了一下,看起来没什么问题。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
当关闭划词翻译后,不要监听鼠标移动事件
fix:#941,#223
根据简单统计,easydict在活动监视器的12小时能耗,从10,下降到1(具体数值取决于个人使用强度)
移除了 NSEventMaskAny | NSEventTypeSystemDefined,请检视.
NSEventTypeSystemDefined并不属于NSEventMask枚举,对应的应该是NSEventMaskSystemDefined,所以删除无影响
NSEventMaskAny监听了所有事件,其他mask就无效了,所以删除