Repository navigation
Conversation
menu.begin_main_bar carves one control row off the top of the free area with context.carve, as a docked container takes its strip, so free_area read after it starts below the bar and a dock space placed from it lies beneath. begin_bar and begin_main_bar share one bar_in over the row each takes, so headers, shortcuts, keyboard navigation and painting are the same, closed by the same end_bar.
octalide
marked this pull request as ready for review
October 1, 2026 17:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #196
Plan
menu.begin_main_bar(ctx, key) Menutakes one control row (themenu_titlerow height) off the top of the free area withcontext.carve, asdock.begin_docktakes its strip.context.free_arearead after it starts below the bar, so a dock space placed from it lies beneath. Closed by the existingend_bar.begin_barandbegin_main_bardiffer only in where the row comes from (widget.placeversuscontext.carve). Both call one privatebar_in(ctx, key, r)holding the old body ofbegin_bar, so headers, menus, shortcuts, keyboard navigation and painting are shared, not duplicated.begin_dock, it is called at the root, outside surfaces and bands. It paints in the base band like any bar, and its menus are popups above everything.KIND_BAR,end_bar,context.free_areaand the README menu section.menu__main_bar_takes_its_row_from_the_free_arealays out a main bar, then a dock space fromfree_areawith a window docked over it. It checks the free area starts at the bar's bottom, the docked window's content lies below the bar, the header is what is under the cursor there, and a press on it opens its menu over the space.Ran:
mach test . --filter menu__,mach build . -p release,mach fmt --checkon the root and both demos, and the gallery and panel demo tests aftermach dep pull. Goldens unchanged.