docs(core): say an unmapped toplevel keeps its ID when it maps again
- commit
- 1c4ccdb56d0e19cda778a10a730fceb24a1b52d4
- author
- brice · · 2026-10-05 01:14 UTC
- parent
- 27cdcf1
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
2 files · +4 -4
M internal/core/configures.go +3 -3
| @@ -135,9 +135,9 @@ func (s *configures) mark(v ports.ConfigureWindow) { | |||
| 135 | 135 | // hidden stash window): a destroyed one is forgotten (forget). | |
| 136 | 136 | func (s *configures) keep(id WindowID) { s.seen[id] = true } | |
| 137 | 137 | ||
| 138 | - | // forget drops what was sent to id: the window is destroyed. xdg reuses | |
| 139 | - | // window IDs, so a remapped one must start from nothing, or an unchanged | |
| 140 | - | // first configure would be withheld. | |
| 138 | + | // forget drops what was sent to id: the window is unmapped. A toplevel | |
| 139 | + | // that maps again keeps its ID, so it must start from nothing, or an | |
| 140 | + | // unchanged first configure would be withheld. | |
| 141 | 141 | func (s *configures) forget(id WindowID) { | |
| 142 | 142 | delete(s.sent, id) | |
| 143 | 143 | delete(s.answer, id) | |
| @@ -135,9 +135,9 @@ func (s *configures) mark(v ports.ConfigureWindow) { | |||||
| 135 | // hidden stash window): a destroyed one is forgotten (forget). | 135 | // hidden stash window): a destroyed one is forgotten (forget). | ||
| 136 | func (s *configures) keep(id WindowID) { s.seen[id] = true } | 136 | func (s *configures) keep(id WindowID) { s.seen[id] = true } | ||
| 137 | 137 | ||||
| 138 | - | // forget drops what was sent to id: the window is destroyed. xdg reuses | 138 | + | // forget drops what was sent to id: the window is unmapped. A toplevel |
| 139 | - | // window IDs, so a remapped one must start from nothing, or an unchanged | 139 | + | // that maps again keeps its ID, so it must start from nothing, or an |
| 140 | - | // first configure would be withheld. | 140 | + | // unchanged first configure would be withheld. |
| 141 | func (s *configures) forget(id WindowID) { | 141 | func (s *configures) forget(id WindowID) { | ||
| 142 | delete(s.sent, id) | 142 | delete(s.sent, id) | ||
| 143 | delete(s.answer, id) | 143 | delete(s.answer, id) | ||
M internal/core/transition.go +1 -1
| @@ -434,7 +434,7 @@ func (c *Core) appearMapped(id WindowID, now time.Time) { | |||
| 434 | 434 | // is the same with animations off. A fullscreen window, one under a | |
| 435 | 435 | // session lock or with the overview open just goes. | |
| 436 | 436 | func (c *Core) unmapWindow(v ports.WindowUnmapped) { | |
| 437 | - | // The window is destroyed: its ID may come back for another one, which | |
| 437 | + | // The window is unmapped: a toplevel that maps again keeps its ID and | |
| 438 | 438 | // must be configured from nothing (a leaving entry keeps no configure). | |
| 439 | 439 | c.configures.forget(v.ID) | |
| 440 | 440 | sc, w := c.screenOf(v.ID) | |
| @@ -434,7 +434,7 @@ func (c *Core) appearMapped(id WindowID, now time.Time) { | |||||
| 434 | // is the same with animations off. A fullscreen window, one under a | 434 | // is the same with animations off. A fullscreen window, one under a | ||
| 435 | // session lock or with the overview open just goes. | 435 | // session lock or with the overview open just goes. | ||
| 436 | func (c *Core) unmapWindow(v ports.WindowUnmapped) { | 436 | func (c *Core) unmapWindow(v ports.WindowUnmapped) { | ||
| 437 | - | // The window is destroyed: its ID may come back for another one, which | 437 | + | // The window is unmapped: a toplevel that maps again keeps its ID and |
| 438 | // must be configured from nothing (a leaving entry keeps no configure). | 438 | // must be configured from nothing (a leaving entry keeps no configure). | ||
| 439 | c.configures.forget(v.ID) | 439 | c.configures.forget(v.ID) | ||
| 440 | sc, w := c.screenOf(v.ID) | 440 | sc, w := c.screenOf(v.ID) | ||