Repository navigation
Commit abaeb01
fix: restore from maximised returns to the previous window size
Restoring left the window filling the screen, so it had to be dragged back by
a border. OnStateChanged corrected the window placement synchronously, but at
that point WindowState is already Normal while ActualWidth/Left still describe
the maximised frame - so the placement helper saw a screen-sized window,
"corrected" it, and wrote the working area into Width/Height, destroying the
restore bounds. Every later restore repeated it.
The correction is now posted at Background priority, after the transition has
settled, and does nothing when the restored bounds are already sane. When
there are no smaller bounds to return to - the window was maximised from the
start - it falls back to the app's own default size, centred on the monitor
the window was actually on rather than the primary.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 88f2767 commit abaeb01
3 files changed
Lines changed: 128 additions & 7 deletions
File tree
- Helpers
- Tests/ThreadPilot.Core.Tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
37 | 42 | | |
38 | 43 | | |
39 | 44 | | |
40 | 45 | | |
41 | | - | |
| 46 | + | |
| 47 | + | |
42 | 48 | | |
43 | 49 | | |
44 | 50 | | |
| |||
56 | 62 | | |
57 | 63 | | |
58 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
59 | 79 | | |
60 | 80 | | |
61 | 81 | | |
| |||
88 | 108 | | |
89 | 109 | | |
90 | 110 | | |
91 | | - | |
| 111 | + | |
92 | 112 | | |
93 | 113 | | |
94 | 114 | | |
| |||
106 | 126 | | |
107 | 127 | | |
108 | 128 | | |
109 | | - | |
| 129 | + | |
110 | 130 | | |
111 | 131 | | |
112 | 132 | | |
| |||
219 | 239 | | |
220 | 240 | | |
221 | 241 | | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
222 | 250 | | |
223 | 251 | | |
224 | 252 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1400 | 1400 | | |
1401 | 1401 | | |
1402 | 1402 | | |
| 1403 | + | |
| 1404 | + | |
1403 | 1405 | | |
1404 | 1406 | | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
1405 | 1410 | | |
1406 | 1411 | | |
1407 | 1412 | | |
| |||
1420 | 1425 | | |
1421 | 1426 | | |
1422 | 1427 | | |
1423 | | - | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
1424 | 1437 | | |
1425 | 1438 | | |
1426 | 1439 | | |
| |||
1625 | 1638 | | |
1626 | 1639 | | |
1627 | 1640 | | |
| 1641 | + | |
| 1642 | + | |
1628 | 1643 | | |
1629 | 1644 | | |
1630 | 1645 | | |
1631 | | - | |
1632 | 1646 | | |
1633 | 1647 | | |
1634 | 1648 | | |
| |||
1653 | 1667 | | |
1654 | 1668 | | |
1655 | 1669 | | |
1656 | | - | |
| 1670 | + | |
1657 | 1671 | | |
1658 | | - | |
| 1672 | + | |
1659 | 1673 | | |
1660 | 1674 | | |
1661 | 1675 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
66 | 145 | | |
67 | 146 | | |
68 | 147 | | |
| |||
0 commit comments