Repository navigation
Make wm manage and wm forget work - #1101
Open
beetlebugorg wants to merge 1 commit into
Open
beetlebugorg wants to merge 1 commit into
beetlebugorg wants to merge 1 commit into
Conversation
`wm manage FRAME` takes a frame or a labelframe out of the manager of its parent and gives it a window of the platform, at its requested size, with its path name, its children, and their bindings. Then the subcommands of wm work on it, and `winfo toplevel` of a child gives it. `wm forget` closes the window of a managed frame or of a toplevel, and the widget is a frame of its parent, unmapped until pack, grid, or place places it. The widget and its mapped children get <Unmap>, then <Map> in the new window, as in wish 8.6.14. A widget has a new field wm_top, and each check of a toplevel goes through Widget.isToplevel. The window code of toplevel.zig is now openWindow and closeWindow, which wm.zig also calls. A frame has no -menu, so the menu bar reads the option only when the widget has it. `winfo manager` gives wm for each toplevel, not only for ".". The reference of wm has the two subcommands and an example of a panel that tears off and docks again. On the web, the window of a managed frame has no canvas, as for a second toplevel. Part of #1092 (the web part is #1100)
beetlebugorg
force-pushed
the
wm-manage
branch
from
December 4, 2026 18:05
c1d4a6c to
6acc1b4
Compare
This branch has not been deployed
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.
Summary
wm manage FRAME: aframeor alabelframeleaves the geometry manager of its parent and gets a window of the platform, at its requested size, with its name as the title.wmwork on it, andwinfo toplevelof a child gives it.wm manage, andwm manage ., change nothing.ttk::frame, gives the error of wish:window ".b" is not manageable: must be a frame, labelframe or toplevel.wm forget WINDOW: the window of a managed frame, or of a widget oftoplevel, closes.pack,grid, orplaceplaces it.Toplevel, andwm managemakes it a toplevel again..change nothing and give no error, as in wish.<Unmap>, then<Map>in the new window. wish 8.6.14 under Xvfb gives the same events and no<Reparent>.Widget.wm_topis a new field, and each check of a toplevel goes throughWidget.isToplevel.toplevel.openWindowandtoplevel.closeWindowhold the window code, andwm.zigcalls them.-menuonly when the widget has the option.winfo managergiveswmfor each toplevel.wm(docs/reference/wm.tcl) loses the difference line. It describes the two subcommands and has an example of a panel that tears off and docks again.Part of #1092. The web is not in this PR. A second
toplevelon the web has no canvas (docs/differences.md), so a managed frame there gets the state but no canvas. A canvas for each toplevel on the web is #1100.Tests
zig build testpasses, with two new tests insrc/tests/toplevel.zig:destroyof a managed frame.sh tools/ref-check.shpasses: 7132 examples and errors, no failures. This includes the tear-off example.xwininfoshows the window "Panel" at 64x51, viewable, and the frame packs back afterwm forget.createWindowpath astoplevel. They did not run here.