-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
osc.lua: don't place the overlay above other ones #15189
base: master
Are you sure you want to change the base?
Conversation
Download the artifacts for this pull request: |
Leaving the z to 0 doesn't work because the order is essentially random. It fails when loading/unloading OSC at runtime. Also with visibility=auto the console can render above the player control, which still responds to mouse despite the console is a layer above. |
When opening select.lua with layout=box and visibility=always, it is drawn below the OSC. Fix it by using z = -1 with visibility always. With bottombar and topbar layouts the console doesn't overlap with the OSC because it reads user-data/osc/margins, so z doesn't matter. This reverts 9c22d6b and 86d24b0.
-- Draw the OSC above the console with visibility auto because the OSC | ||
-- receives mouse clicks, and below with visibility always because that is | ||
-- needed with box layout. | ||
state.osd.z = user_opts.visibility == "auto" and z or -1 |
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 don't understand this condition. Comment is telling that it is needed for box, but it checks visibility?
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.
IIt's needed for box with visibility always. It is indifferent for bar layouts because they don't overlap thanks to user-data margins. For visibility auto it's more expected to have the OSC on top because it receives clicks.
Stop setting the z of the OSD overlay. This prevents the console from being drawn below the box layout when clicking buttons with visibility=always.
This reverts 9c22d6b and 86d24b0.