New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #4156 (OSD stealing mouse clicks from OSC even while hidden), #4612: (OSC responds to mouse hover when behind OSD) #4637
Fix #4156 (OSD stealing mouse clicks from OSC even while hidden), #4612: (OSC responds to mouse hover when behind OSD) #4637
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sidebar can also cover the thumbnail, please also fix this issue. Otherwise this pr is good to merge.
@@ -2265,6 +2262,16 @@ class MainWindowController: PlayerWindowController { | |||
} | |||
} | |||
|
|||
private func refreshSeekTimeAndThumnail(from event: NSEvent) { | |||
let isCoveredByOSD = !osdVisualEffectView.isHidden && isMouseEvent(event, inAnyOf: [osdVisualEffectView]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also found that if the sidebar covers the thumbnail, it will also trigger the thumbnail, and I've confirmed that something like this
let isCoveredBySidebar = !sideBarView.isHidden && isMouseEvent(event, inAnyOf: [sideBarView])
and checking both isCoveredByOSD
and isCoveredBySidebar
is able to fix this problem
iina/MainWindowController.swift
Outdated
@@ -2265,6 +2262,16 @@ class MainWindowController: PlayerWindowController { | |||
} | |||
} | |||
|
|||
private func refreshSeekTimeAndThumnail(from event: NSEvent) { |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed another commit which should address feedback, thanks.
b9b8a78
to
1039c9b
Compare
…idebar, + minor cleanup
1039c9b
to
6566561
Compare
Thanks! |
Description:
Could not have been a more straightforward fix. When the OSD was hidden, its alpha was set to 0, but
isHidden
was never set totrue
(looks deleted or forgot to include).Update: added a fix for #4612, since it needed the original fix as a prerequisite.