Skip to content

Add configurable scroll deadzone for wheel keybinds#13344

Open
kristianvast wants to merge 39 commits intohyprwm:mainfrom
kristianvast:feat/scroll-deadzone-bind
Open

Add configurable scroll deadzone for wheel keybinds#13344
kristianvast wants to merge 39 commits intohyprwm:mainfrom
kristianvast:feat/scroll-deadzone-bind

Conversation

@kristianvast
Copy link

@kristianvast kristianvast commented Feb 23, 2026

Summary

  • add a new binds:scroll_deadzone float config option (default 0.0) for wheel keybind handling
  • apply deadzone gating at the start of a scroll burst, then unlock follow-up ticks for responsive continuous scrolling
  • reset burst state when direction changes or events go stale (>1s), so independent scroll actions do not carry over
  • wire the option into config registration and config descriptions docs

Why

Free-spinning mouse wheels can emit tiny initial deltas that accidentally trigger workspace switching. This adds a native, opt-in threshold for that first movement while keeping subsequent intentional scrolling fast.

vaxerski and others added 30 commits January 2, 2026 22:20
FreeBSD clang needs the header to be included for read(), write(),
pipe(), close(), etc.
* Add parent-death handling for BSDs

prctl() is a system call specific to Linux. So we cannot use it on BSDs.

FreeBSD has a system call procctl() which is similar to prctl(). We can
use it with PROC_PDEATHSIG_CTL.

OpenBSD, NetBSD, and DragonFly BSD do not appear to have a similar
mechanism. So intead of relying on a system call, we need to manually
poll ppid to see if the parent process has died.

With the changes, the spawned Hyprland process is terminated when the
launcher process exits, matching Linux behavior as closely as possible
on BSD platforms.

* Remove ppid polling on OpenBSD, NetBSD, and DragonFly BSD
---------

Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
* fix: handle fullscreen windows on special workspaces

inFullscreenMode() only checked m_activeWorkspace, missing fullscreen
windows on special workspaces. This caused crashes and incorrect
behavior when fullscreen windows were on special workspaces.

Changes:
- inFullscreenMode() now checks special workspace first since it
  renders on top of regular workspaces
- Added getFullscreenWindow() helper to safely get fullscreen window
  from either active or special workspace
- Updated callers (shouldSkipScheduleFrameOnMouseEvent, Renderer,
  getFSImageDescription) to use the new helper
- Reset m_aboveFullscreen for layer surfaces when opening, closing,
  or stealing special workspaces between monitors

* test: add special workspace fullscreen detection tests

Add tests for the new special workspace fullscreen handling introduced
in the previous commit. The tests cover:

1. Fullscreen detection on special workspace - verifies that a window
   made fullscreen on a special workspace is correctly detected

2. Special workspace fullscreen precedence - verifies that when both
   regular and special workspaces have fullscreen windows, the special
   workspace window can be focused when the special workspace is opened

3. Toggle special workspace behavior - verifies that toggling the
   special workspace off properly hides it and returns focus to the
   regular workspace's fullscreen window

These tests exercise the key code paths modified in the fix:
- inFullscreenMode() checking special workspace first
- getFullscreenWindow() helper returning correct window
- Layer surface m_aboveFullscreen reset on special workspace toggle
…onfigure overwrites (hyprwm#12850)

* fix: track explicit workspace assignments to prevent X11 configure overwrites

Instead of only checking for special workspaces, track when workspaces are
explicitly assigned via window rules or user actions (movetoworkspace).
This prevents onX11ConfigureRequest from overwriting any explicit workspace
assignment based on window position.

Changes:
- Add m_workspaceExplicitlyAssigned flag to CWindow
- Set flag when window rules assign workspace
- Set flag when user moves window via dispatcher
- Check flag in onX11ConfigureRequest instead of just special workspace
- Add debug logging for explicit workspace assignments

* fix: simplify X11 configure request handling for special workspaces

X11 apps send configure requests with positions based on XWayland's
monitor layout, which could incorrectly move windows off special
workspaces.

Skip workspace reassignment when the window is on a special workspace
or staying on the same monitor, but always run z-order, fullscreen flag,
and damage logic since the configure request may include geometry changes.
m_data was never cleaned and continously built up the m_data, remove
the entry on closeWindow.
After suspend/wake, the animation tick timer state (m_lastTickValid,
m_tickScheduled) could be stale, causing framerate drops when blur is
enabled. This was introduced in 2b0fd41 which changed the animation
tick timing mechanism.

Reset the tick state when the session becomes active to ensure a clean
state for the animation system.
@github-actions
Copy link

Hello and thank you for making a PR to Hyprland!

Please check the PR Guidelines and make sure your PR follows them.
It will make the entire review process faster. :)

If your code can be tested, please always add tests. See more here.

beep boop, I'm just a bot. A real human will review your PR soon.

@vaxerski
Copy link
Member

uhhhhh something went wrong here

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.