helium/linux: middle-click on empty tab strip opens new tab#268
helium/linux: middle-click on empty tab strip opens new tab#268saberoueslati wants to merge 2 commits intoimputnet:mainfrom
Conversation
|
Reviews (1): Last reviewed commit: "helium/linux: middle-click on empty tab ..." | Re-trigger Greptile |
| } else if (event->changed_button_flags() & ui::EF_MIDDLE_MOUSE_BUTTON) { | ||
| - action_type = ui::LinuxUi::WindowFrameActionSource::kMiddleClick; | ||
| - default_action = ui::LinuxUi::WindowFrameAction::kNone; | ||
| + // Let the views hierarchy handle middle click (e.g. tab strip opens new tab). | ||
| + return; |
There was a problem hiding this comment.
Early return bypasses all DE-configured middle-click-caption actions
The early return in OnClickedCaption skips calling GetWindowFrameAction(kMiddleClick, ...) globally, not just for the tab strip. Users who have configured a desktop environment action for middle-clicking the title bar (e.g. lower window, minimize) will silently lose that behaviour even when clicking on window chrome outside the tab strip. The previous code already defaulted to kNone, so most users are unaffected, but this is a broader behavioral change than the PR description implies. It would be worth a comment in the code noting that DE middle-click-caption actions are intentionally suppressed browser-wide.
There was a problem hiding this comment.
Yes, they will lose that behavior indeed, and it is intentional, I'll add the comment if the reviewer wants me to
For your pull request to not get closed without review, please confirm that:
If such issue did not exist before, I opened one.
otherwise I have marked my PR as draft.
organization if I lied by checking any of these checkboxes.
no way be applied to other platforms.
Closes imputnet/helium#654.
Manual test below :
Screencast.from.2026-04-26.03-04-37.webm
Modifications made :
Added
OnMousePressedandOnMouseReleasedto theTabStripview class andFrameGrabHandleclass to handle the middle click event, Added an early return inOnClickedCaption()when the event is a middle-click, which is a Linux-specific blocker that stops the middle click on the empty tab space from reducing the window.Struggling so far to build Helium on Windows to test the patch there but I'm pretty sure the patch is applicable there without the
OnClickedCaption() change