macos: fix an incorrect bindable write during view update
parent
b044f4864a
commit
3e02c0cbd5
|
|
@ -301,8 +301,12 @@ extension Ghostty {
|
||||||
if let instant = focusInstant {
|
if let instant = focusInstant {
|
||||||
let d = instant.duration(to: ContinuousClock.now)
|
let d = instant.duration(to: ContinuousClock.now)
|
||||||
if (d < .milliseconds(500)) {
|
if (d < .milliseconds(500)) {
|
||||||
// Avoid this size completely.
|
// Avoid this size completely. We can't set values during
|
||||||
lastSize = geoSize
|
// view updates so we have to defer this to another tick.
|
||||||
|
DispatchQueue.main.async {
|
||||||
|
lastSize = geoSize
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue