Skip to content

Commit 7f3bc71

Browse files
committed
Fix random crashes
1 parent 11c6e56 commit 7f3bc71

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

pkg/edge/chromium.go

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -227,16 +227,16 @@ func (e *Chromium) SetPadding(padding Rect) {
227227
}
228228

229229
func (e *Chromium) ResizeWithBounds(bounds *Rect) {
230-
if e.hwnd == 0 {
231-
return
232-
}
230+
if e.hwnd == 0 {
231+
return
232+
}
233233

234-
bounds.Top += e.padding.Top
235-
bounds.Bottom -= e.padding.Bottom
236-
bounds.Left += e.padding.Left
237-
bounds.Right -= e.padding.Right
234+
bounds.Top += e.padding.Top
235+
bounds.Bottom -= e.padding.Bottom
236+
bounds.Left += e.padding.Left
237+
bounds.Right -= e.padding.Right
238238

239-
e.SetSize(*bounds)
239+
e.SetSize(*bounds)
240240
}
241241

242242
func (e *Chromium) Resize() {
@@ -348,11 +348,6 @@ func (e *Chromium) CreateCoreWebView2ControllerCompleted(res uintptr, controller
348348
if err := controller3.PutShouldDetectMonitorScaleChanges(false); err != nil {
349349
e.errorCallback(err)
350350
}
351-
352-
// Set a fixed rasterization scale for better performance
353-
if err := controller3.PutRasterizationScale(1.0); err != nil {
354-
e.errorCallback(err)
355-
}
356351
}
357352
var token _EventRegistrationToken
358353
e.webview, err = e.controller.GetCoreWebView2()

0 commit comments

Comments
 (0)