workspace: Ensure pane handle hitbox blocks mouse events (#31719)

Follow-up to #31712

Pane handle hitboxes were opaque prior to the linked PR. This was the
case because pane handles have an intentionally larger hitbox than the
pane dividers size to allow for easier dragging. The cursor style is
also updated for that hitbox to indicate that resizing is possible:


9086784038/crates/workspace/src/pane_group.rs (L1297-L1301)

Not blocking the mouse events here causes mouse events to bleed through
this hitbox whilst actually any clicks will only cause a pane resize to
happen. Hence, this hitbox should continue to block mouse events to
avoid any confusion when resizing panes.

I considered using `HitboxBehavior::BlockMouseExceptScroll` here,
however, due to the reasons mentioned above, I decided against it. The
cursor will not indicate that scrolling should be possible. Since all
other mouse events on underlying elements (like hovers) are blocked, it
felt more reasonable to just go with `HitboxBehavior::BlockMouse`.

Release Notes:

- N/A
This commit is contained in:
Finn Evers 2025-05-30 00:35:22 +02:00 committed by GitHub
parent 8aef64bbfa
commit cbed580db0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1091,7 +1091,7 @@ mod element {
};
PaneAxisHandleLayout {
hitbox: window.insert_hitbox(handle_bounds, HitboxBehavior::Normal),
hitbox: window.insert_hitbox(handle_bounds, HitboxBehavior::BlockMouse),
divider_bounds,
}
}