Commit e72ffcb
committed
fix: EPMViewer.exe opens entirely off-screen (stuck in taskbar, blank preview)
EPMViewerWindow restored its saved window position via move(pos) with
no validation that the position is still within any currently
connected screen's bounds. A position saved from a previous monitor
configuration (e.g. a since-disconnected second monitor to the left
of the primary, x=-1353) is now far outside the single remaining
screen (0,0 to 1536,864). The window still launches and runs (visible
in the taskbar, non-zero memory/CPU), but renders entirely off-screen,
so the taskbar thumbnail preview is blank and nothing is visible on
any monitor.
Fixed by checking the restored QRect(pos, size) against
QGuiApplication::screens() before calling move(); if it doesn't
intersect any current screen, fall back to the default (40, 40)
position instead.1 parent f69898a commit e72ffcb
1 file changed
Lines changed: 26 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| 40 | + | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| |||
132 | 134 | | |
133 | 135 | | |
134 | 136 | | |
135 | | - | |
136 | | - | |
137 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
138 | 162 | | |
139 | 163 | | |
140 | 164 | | |
| |||
0 commit comments