Skip to content

feat(config): support pass_mouse = "fullscreen" in window rules - #314

Closed
Makar986 wants to merge 4 commits into
malbiruk:mainfrom
Makar986:fix-fullscreen-mouse-grabs
Closed

Makar986 wants to merge 4 commits into
malbiruk:mainfrom
Makar986:fix-fullscreen-mouse-grabs

Conversation

@Makar986

@Makar986 Makar986 commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

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):

  • Default on-window bindings like Alt + Left (move) or Alt + Right (resize) would exit fullscreen and start dragging/resizing on the canvas.
  • While pass_mouse = true in 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 (like Alt + Left to drag) continues to work normally.

Changes

  • Rebased on latest main (post v0.21.0).
  • Added PassList::Fullscreen variant.
  • Updated PassList::merge_from precedence: All > Fullscreen > Only > None.
  • Updated PassMouse::allows(&self, mods, trigger, is_fullscreen: bool) and pass_mouse_claims in src/input/pointer.rs to pass whether the target window is currently fullscreen (is_window_fullscreen).
  • Documented in config.reference.toml, docs/window-rules.md, and regenerated docs/config.md.
  • Added unit tests in tests/window_rules_test.rs and integration tests in src/tests/pass_mouse.rs.

@malbiruk malbiruk left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@Makar986
Makar986 force-pushed the fix-fullscreen-mouse-grabs branch from 0b329f5 to 28fcd6f Compare November 5, 2026 17:49
@Makar986 Makar986 changed the title feat(config): add [mouse] grabs_in_fullscreen option feat(config): support pass_mouse = "fullscreen" in window rules Nov 5, 2026
@Makar986

Makar986 commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the feedback! Reworked the PR according to your suggestions:

  • Rebased on current main.
  • Removed the global [mouse] configuration option.
  • Added pass_mouse = "fullscreen" to window rules, forwarding mouse bindings for matched windows only while fullscreen and leaving normal canvas bindings active in windowed mode.
  • Added unit tests in tests/window_rules_test.rs and integration tests in src/tests/pass_mouse.rs.
  • Updated documentation and reference config.

…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.
@Makar986

Makar986 commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

Короче в пизду, оно слишком кривое

@Makar986 Makar986 closed this Nov 6, 2026
@samukhin

samukhin commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Не отчаивайся! Ждём новых вайб-кодов!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants