Skip to content
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

Show only OSC or title bar when hovering #317

Open
krispykiq opened this issue Jan 15, 2025 · 4 comments
Open

Show only OSC or title bar when hovering #317

krispykiq opened this issue Jan 15, 2025 · 4 comments
Labels
feature request New feature or request

Comments

@krispykiq
Copy link

Expected behavior of the wanted feature

In borderless/fullscreen mode, allow hovering on OSC to show only OSC and not the title bar, and vice versa.

@krispykiq krispykiq added the feature request New feature or request label Jan 15, 2025
@da3dsoul1
Copy link

What you are looking for exists in UOSC, I don't think ModernZ needs it personally.

@Samillion
Copy link
Owner

It's doable for sure, on ModernZ. I'll tinker with it soon, just working down other issues and the new layout option coming up.

In essence, instead of triggering the entire osc with one set of functions, they need to be separated.

For example:

  • enable_osc(), show_osc(), hide_osc()
  • enable_window_bar(), show_window_bar(), hide_window_bar()
  • and so on....

Ideally I want to coordinate this with upstream mpv, since it is also requested there a lot. I'm planning to have a discussion with them on irc soon to see if they're ever interested in implementing it. We did have casual talks about it before.

I'll cc @guidocella but honestly, he's been overwhelmed with mpv stuff lately and this is not a huge priority in mpv/osc.lua as far as I know.

@guidocella
Copy link

I'm not an expert of all OSC code. If you figure it out it would definitely be useful to do it in the stock OSC as well, then window controls can be shown in fullscreen by default.

@Samillion
Copy link
Owner

Samillion commented Jan 25, 2025

Will try my best soon. The theory of it sounds logical, basically triggering showhide_ and state.enabled and inputs to address each area separately as well.

For example:

ModernZ/modernz.lua

Lines 3024 to 3036 in 488854b

local function enable_osc(enable)
state.enabled = enable
if enable then
do_enable_keybindings()
else
hide_osc() -- acts immediately when state.enabled == false
if state.showhide_enabled then
mp.disable_key_bindings("showhide")
mp.disable_key_bindings("showhide_wc")
end
state.showhide_enabled = false
end
end

Which would also need adjustments to hidetimeout address each separately.

Just leaving notes here for myself to not forget. 😝

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants