Skip to content

[Feature Request] Dynamic Partial Click-Through for Window Regions #243

@feraxhp

Description

@feraxhp

Describe the problem/motivation

The core challenge is to divide this window's height into two distinct interactive regions:

  1. An interactive application area (e.g., top 28px): This part should fully receive mouse and keyboard input, allowing users to interact with buttons, drag the window, etc.
  2. A non-interactive information area (e.g., bottom 28px): This part needs to display visual information (e.g., statistics, status), but crucially, it must be completely transparent to mouse and keyboard input. Any clicks or key presses over this region should "pass through" to the application underneath the Tauri window.

The motivation is to create an overlay experience where a portion of the application is always visible and interactive, while another portion provides ambient information without blocking user interaction with other desktop applications.

Describe the solution you'd like

I would like a way to define specific regions within a single Tauri window that can dynamically switch between being interactive and being completely transparent to mouse and keyboard input at the operating system level.

Ideally, this could be achieved by:

  • A declarative approach, perhaps by marking HTML elements with an attribute (e.g., data-tauri-click-through) that makes that specific element's bounding box ignore OS-level mouse events.
  • A programmatic API from the webview (without needing invoke directly to Rust if possible, but recognizing OS-level control is needed) that allows registering specific Rect regions of the window as "click-through" or "interactive."

The goal is to have fine-grained control over which parts of the window intercept input and which allow it to pass through, based on the layout of the webview content.

Alternatives considered

I didn't find anything similar for CSS to allow this behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    📬 Needs triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions