Skip to content

Fix: resolve Wayland dead zone by decoupling input region into a dedicated hitbox - #368

Open
MakdumIbrohim wants to merge 1 commit into
icedman:mainfrom
MakdumIbrohim:main
Open

Fix: resolve Wayland dead zone by decoupling input region into a dedicated hitbox#368
MakdumIbrohim wants to merge 1 commit into
icedman:mainfrom
MakdumIbrohim:main

Conversation

@MakdumIbrohim

@MakdumIbrohim MakdumIbrohim commented Aug 31, 2026

Copy link
Copy Markdown

Fix: Wayland Phantom Window / Dead Zone (Unclickable Screen Area)

The Problem

Users on Wayland experience a "phantom window" or "dead zone" at the bottom of the screen where mouse clicks are not registered by applications behind the dock.

Root Cause:

  1. Giant Main Container Hitbox: To prevent bounce/magnify animations from being clipped, the main container (this) is given a large footprint (fp). Because affectsInputRegion: false was disabled/commented out during addChrome, Wayland treats this entire large transparent box as a compositor input region, swallowing mouse clicks.
  2. Full-width Struts Hitbox: When autohide_dash is disabled, this.struts stretches full-width across the screen to act as a window manager strut (preventing maximized windows from overlapping). Since it also lacked affectsInputRegion: false, it created a massive full-width horizontal dead zone.
  3. Fullscreen Block: this.struts was configured with trackFullscreen: false, meaning the invisible struts remained on top of fullscreen windows (like movie players), blocking playback controls.

The Solution (Architectural Fix)

This PR completely decouples the visual layout/animations, the window manager struts, and the Wayland input region (hitbox):

  1. Introduced a Dedicated Hitbox (this.hitbox)

    • Created a new transparent actor specifically for handling the input region.
    • Its size and position are dynamically updated in animator.js to strictly match the exact bounds of the visual dock (dock._background).
    • Added to Chrome with affectsInputRegion: true.
  2. Disabled Input Region on Large Containers

    • Added affectsInputRegion: false to the main container (this). The large footprint (fp) now safely provides room for animations without blocking Wayland clicks.
    • Added affectsInputRegion: false to this.struts. It continues to successfully push maximized windows away, but no longer intercepts mouse clicks across the full screen width.
  3. Fixed Fullscreen Interference

    • Set trackFullscreen: true on this.struts and this.hitbox so they properly sink below fullscreen applications, allowing users to click video player controls.
  4. Cleaner Debug Mode

    • Updated the debug_visual logic so that the magenta debug outline .hi only highlights the actual this.hitbox instead of drawing confusing giant boxes for the struts and main containers.

✅ Testing Done

  • Click-through works perfectly on empty transparent areas around the dock.
  • Hover, Magnify, and Bounce animations work flawlessly and are not clipped.
  • Fullscreen apps/videos are no longer blocked by invisible boxes.
  • Tested on Wayland session.

@MakdumIbrohim MakdumIbrohim changed the title feat: introduce DockHitbox widget to manage input region and update i… Fix: resolve Wayland dead zone by decoupling input region into a dedicated hitbox actor` Aug 31, 2026
@MakdumIbrohim MakdumIbrohim changed the title Fix: resolve Wayland dead zone by decoupling input region into a dedicated hitbox actor` Fix: resolve Wayland dead zone by decoupling input region into a dedicated hitbox Aug 31, 2026
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.

1 participant