Repository navigation
fix(gui): finish undecorated titlebar parity - #630
Conversation
|
Caution Review failedThe pull request is closed. Walkthrough
Merge Risk:
|
There was a problem hiding this comment.
🟢 Approval recommended
The review surfaced no outstanding concerns, with every examined change checking out and no concrete issues left requiring comments.
No open issues 🎉
What changed in this PR
This PR completes the undecorated-titlebar parity work started in #629. With the custom titlebar height defaulted to zero, two loose ends remained: the top 5px edge still intercepted buffer clicks as a resize zone, and the dead neomacs-custom-titlebar-mode opt-in (which referenced subrs deleted with neomacsterm.c) signaled void-function. The change makes the top resize edge conditional on a positive custom-titlebar height and strips the dead Lisp controls so neomacs-toggle-decorations simply toggles the undecorated frame parameter like GNU Emacs.
Changes:
- Gate the top resize edge in
detect_resize_edge_for_chromeonchrome.titlebar_height > 0.0, so undecorated frames with no custom titlebar let top-row clicks reach the buffer and top corners fall through to side edges. - Remove the dead
neomacs-custom-titlebar-mode, its declaration, theneomacs-corner-radiusdefcustom, and the dead titlebar/corner-radius calls fromneomacs-toggle-decorations. - Add/adjust resize-edge tests with a shared
set_undecorated_titlebar_heighthelper, and update the MELPA divergence note to reflect the single remaining minor mode.
| File | Description |
|---|---|
crates/neomacs-display-runtime/src/render_thread/input.rs |
Makes the top resize edge active only when a positive custom-titlebar height is set. |
crates/neomacs-display-runtime/src/render_thread/input/tests/input_test.rs |
Adds a helper and a new test covering top-edge gating; updates existing resize tests to set a positive titlebar height. |
lisp/term/neo-win.el |
Removes the dead custom-titlebar mode and corner-radius option; simplifies neomacs-toggle-decorations to toggle only undecorated. |
crates/neomacs-melpa-tests/DIVERGENCES.md |
Updates the easy-mmode cost note to reference only the remaining neomacs-scroll-indicator-mode. |
Review effort: Balanced
Follow-up to #629 (merged as
bd6a3f40bc). #629 stopped the default 30px custom titlebar, but two loose ends remained.What changed
undecorated=tand the new zero titlebar height,detect_resize_edge_for_chromestill returnedNorth/NorthWest/NorthEastfory < 5. A left press there calleddrag_resize_windowbefore buffer dispatch. The top edge now exists only when a custom titlebar has a positive height; top corners fall through to the side edges. An explicit positive height still restores the top edge.lisp/term/neo-win.eldeclaredneomacs-set-titlebar-heightfrom the deletedneomacsterm.cand definedneomacs-custom-titlebar-mode. Enabling the mode signaledvoid-function;neomacs-toggle-decorationssilently did nothing because offboundp. This removes the mode, its declaration, and the dead titlebar/corner-radius calls.neomacs-toggle-decorationsnow only toggles theundecoratedframe parameter, like GNU Emacs. The unusedneomacs-corner-radiusoption went with it.Animation and motion defaults are intentionally unchanged. Cursor motion and window/child-frame animations keep their existing defaults. Buffer and scroll transitions are currently off by default in
mainand are not changed here. Transient animation is Neomacs feel, not final static appearance.Tests
cargo nextest run -p neomacs-display-runtime --lib -E 'test(resize_edge) or test(titlebar)'— 31 passedcargo fmt --all -- --checkgit diff --checkcheck-parensonlisp/term/neo-win.elFollow-up
neomacs-scroll-indicator-modestill calls the missingneomacs-set-scroll-indicatorssubr. That is a separate dead-control cleanup, not part of this titlebar fix.