Commit 982c2c9
committed
fix(electron): remove center:true + ozone flag, use explicit position
Flickering on Hyprland is caused by Electron's center:true option which
triggers a window reposition after the window is already mapped. Hyprland
animates this reposition, creating a visible flicker as the window slides
from its initial position to the center.
Fix: calculate the center position upfront (using screen.workAreaSize) and
pass x/y explicitly to BrowserWindow. The window opens at the correct
position immediately, with no post-creation reposition.
Also removes the unnecessary ozone-platform-hint flag that was a leftover
from earlier experiments.1 parent 00b3122 commit 982c2c9
1 file changed
Lines changed: 10 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | 22 | | |
26 | 23 | | |
27 | 24 | | |
| |||
105 | 102 | | |
106 | 103 | | |
107 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
108 | 110 | | |
109 | | - | |
110 | | - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
111 | 115 | | |
112 | 116 | | |
113 | | - | |
114 | 117 | | |
115 | 118 | | |
116 | 119 | | |
| |||
122 | 125 | | |
123 | 126 | | |
124 | 127 | | |
125 | | - | |
126 | 128 | | |
127 | 129 | | |
128 | 130 | | |
| |||
0 commit comments