- Add window_title_bar_min_windows (0=never, 1=always, 2+=threshold)
similar to tab_bar_min_tabs, to control when title bars appear
- Remove 'none' choice from window_title_bar so it purely controls
position (top/bottom); disabling is now via min_windows 0
- Only hide title bar for truly empty template strings, not
whitespace-only, so users can have intentionally blank bars
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Eliminate double set_geometry() call: removed _apply_window_title_bars()
which post-processed geometry causing expensive SIGWINCH to children
- Move title bar screen ownership to Window objects instead of central
manager, with show_title_bar flag set during layout before do_layout()
- Window.set_geometry() now handles title bar geometry internally:
self.geometry stays at layout-computed value (borders/padding correct),
only C-side render data diverges via adjusted top/bottom
- Hide title bar for 1-row windows (ynum <= 1)
- Hide title bar when template evaluates to empty/whitespace
- Optimize C render loop: merge title bar GPU prep and draw into existing
per-window loops, use trd pointer and is_visible=false, use
num_visible_windows > 1 guard. Eliminates separate iteration passes.
- Simplify WindowTitleBarManager to thin coordinator
Note on C-side GPU prep placement: the suggested patch placed
send_cell_data_to_gpu for title bars inside the is_active_window branch
only. This caused a segfault (NULL deref in gleRunVertexSubmitImmediate)
because inactive windows' title bars had valid screen/geometry but no
GPU data uploaded, yet draw_cells was called for all visible title bars.
Moved to the per-window visibility block alongside the main window's
send_cell_data_to_gpu call so all visible title bars get GPU data
prepared. The draw loop matches the suggested patch exactly.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The texture used as the intermediate rendering target is now shared between
all OS Windows instead of each OS Window having its own.
Fixes#9600Fixes#9599