Repository navigation
Conversation
malbiruk
left a comment
There was a problem hiding this comment.
Thanks for the PR! I see the goal: alt+drag should still move the game when it's windowed, but reach the game in fullscreen. I'd rather not do it with a global key though, since it changes every fullscreen window and sits next to the per-app rules as a second mechanism.
Could you rework it as a window rule value instead: pass_mouse = "fullscreen", which forwards that window's mouse bindings only while it's fullscreen? The fullscreen click path already checks pass_mouse on its own (fullscreen_claims in src/input/pointer.rs), so your change moves there and the [mouse] key goes away. It also needs a rebase on current main, since it conflicts after v0.20.
Until then, pass_mouse = ["alt+left", "alt+right"] on the game works in both modes.
Allow windows to forward all compositor mouse bindings only while in fullscreen mode. In windowed mode, window manipulation (like alt+drag) continues to work normally.
0b329f5 to
28fcd6f
Compare
[mouse] grabs_in_fullscreen option|
Thanks for the feedback! Reworked the PR according to your suggestions:
|
…re moving Ensure real_client_over_ipc waits until the client window has completed its first buffer commit and left pending_center before issuing IPC Move requests, avoiding a race where the initial placement overwrites the moved position.
|
Короче в пизду, оно слишком кривое |
|
Не отчаивайся! Ждём новых вайб-кодов! |
Summary
Adds support for
pass_mouse = "fullscreen"in[[window_rules]].Rationale
In fullscreen games or apps that heavily use modifier keys like
Alt(e.g. keybinds, push-to-talk, free-look + click):Alt + Left(move) orAlt + Right(resize) would exit fullscreen and start dragging/resizing on the canvas.pass_mouse = truein window rules forwarded bindings, it also prevented moving/resizing the window when running in windowed mode.With
pass_mouse = "fullscreen", all mouse bindings over the window are claimed and forwarded to the client while the window is fullscreen, preserving fullscreen mode. In windowed mode, window manipulation (likeAlt + Leftto drag) continues to work normally.Changes
main(post v0.21.0).PassList::Fullscreenvariant.PassList::merge_fromprecedence:All>Fullscreen>Only>None.PassMouse::allows(&self, mods, trigger, is_fullscreen: bool)andpass_mouse_claimsinsrc/input/pointer.rsto pass whether the target window is currently fullscreen (is_window_fullscreen).config.reference.toml,docs/window-rules.md, and regenerateddocs/config.md.tests/window_rules_test.rsand integration tests insrc/tests/pass_mouse.rs.