Skip to content

fix(gui): finish undecorated titlebar parity - #630

Merged
eval-exec merged 2 commits into
mainfrom
fix/undecorated-titlebar-followup
Oct 29, 2026
Merged

eval-exec merged 2 commits into
mainfrom
fix/undecorated-titlebar-followup

Conversation

@eval-exec

@eval-exec eval-exec commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

Follow-up to #629 (merged as bd6a3f40bc). #629 stopped the default 30px custom titlebar, but two loose ends remained.

What changed

  • The top edge still swallowed buffer clicks. With undecorated=t and the new zero titlebar height, detect_resize_edge_for_chrome still returned North/NorthWest/NorthEast for y < 5. A left press there called drag_resize_window before 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.
  • The custom-titlebar opt-in was dead. lisp/term/neo-win.el declared neomacs-set-titlebar-height from the deleted neomacsterm.c and defined neomacs-custom-titlebar-mode. Enabling the mode signaled void-function; neomacs-toggle-decorations silently did nothing because of fboundp. This removes the mode, its declaration, and the dead titlebar/corner-radius calls. neomacs-toggle-decorations now only toggles the undecorated frame parameter, like GNU Emacs. The unused neomacs-corner-radius option 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 main and 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 passed
  • cargo fmt --all -- --check
  • git diff --check
  • GNU Emacs batch check-parens on lisp/term/neo-win.el

Follow-up

neomacs-scroll-indicator-mode still calls the missing neomacs-set-scroll-indicators subr. That is a separate dead-control cleanup, not part of this titlebar fix.

Copilot AI balanced review requested due to automatic review settings October 29, 2026 17:21
@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Caution

Review failed

The pull request is closed.

Walkthrough

The PR removes custom title-bar controls and limits north-edge resize detection to windows with a positive custom title-bar height. Tests cover resize behavior with zero-height and 30-pixel title bars.

Changes: Window chrome

Layer / File(s) Summary
Decoration controls
lisp/term/neo-win.el, crates/neomacs-melpa-tests/DIVERGENCES.md
neomacs-toggle-decorations now only toggles the frame’s undecorated parameter. The custom title-bar and corner-radius controls are removed. The divergence entry no longer lists the custom title-bar mode.
Resize-edge behavior
crates/neomacs-display-runtime/src/render_thread/input.rs, crates/neomacs-display-runtime/src/render_thread/input/tests/input_test.rs
North-edge resizing requires a positive title-bar height. Tests check top-edge and top-corner behavior with zero-height and 30-pixel title bars.

Priority: Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related issues

  • eval-exec/neomacs#628: The PR removes the custom-titlebar path and makes decoration toggling affect only the frame’s undecorated parameter, matching the issue’s reported behavior.

Possibly related PRs

  • eval-exec/neomacs#629: PR #629 sets the default title-bar height to zero; this PR updates resize detection and tests for zero-height and explicitly positive title-bar heights.
Merge Risk: Minimal · up to 177b7

Top-edge resizing is disabled without a custom titlebar as intended. No merge-blocking issue is established.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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_chrome on chrome.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, the neomacs-corner-radius defcustom, and the dead titlebar/corner-radius calls from neomacs-toggle-decorations.
  • Add/adjust resize-edge tests with a shared set_undecorated_titlebar_height helper, 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

@eval-exec
eval-exec merged commit 020643b into main Oct 29, 2026
26 of 30 checks passed
@eval-exec
eval-exec deleted the fix/undecorated-titlebar-followup branch October 29, 2026 17:38
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.

2 participants