Simplify focused modifier

This commit is contained in:
david-swift 2024-03-31 13:00:03 +02:00
parent c596504141
commit eb85f93a9e

View File

@ -160,7 +160,7 @@ extension View {
focused.wrappedValue = newValue
}
}
if focused.wrappedValue != (gtk_event_controller_focus_contains_focus(controller.pointer) != 0) {
if gtk_event_controller_focus_contains_focus(controller.pointer) == 0, focused.wrappedValue {
gtk_widget_grab_focus(storage.pointer?.cast())
}
}