Repository navigation
Commit 218de07
committed
Fix Top End placement and submenu detach/reattach on Windows
WinUI 3: show the flyout against the 1x1 anchor element instead of a Position
point. With a point the flyout ignored the edge alignment, so Top End opened
left-aligned.
Win32: MenuItem::SetSubmenu(nullptr) never reached the native menu, and an item
appended with a submenu has no command ID of its own, so the lookup by ID missed
it anyway. Find the item by position, and replace it with RemoveMenu plus
InsertMenuItem: replacing hSubMenu in place destroys the old submenu, which the
Menu object still owns and may attach again.
Found by the menu GUI test (tools/gui/flutter_menu_test.ps1 in the workspace).1 parent 373526f commit 218de07
2 files changed
Lines changed: 33 additions & 8 deletions
File tree
- src/platform/windows
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
433 | 433 | | |
434 | 434 | | |
435 | 435 | | |
| 436 | + | |
436 | 437 | | |
437 | 438 | | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
445 | 469 | | |
446 | 470 | | |
447 | 471 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
| 238 | + | |
| 239 | + | |
238 | 240 | | |
239 | | - | |
240 | 241 | | |
241 | 242 | | |
242 | 243 | | |
| |||
0 commit comments