ui/cocoa: Do not use console_select()
commitca3de7b5afe9c8ded29b7bc64bcdbaa754d65c50
authorAkihiko Odaki <akihiko.odaki@daynix.com>
Tue, 19 Mar 2024 03:08:41 +0000 (19 12:08 +0900)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Wed, 20 Mar 2024 06:27:56 +0000 (20 10:27 +0400)
tree9dcb8ba49710be8bd0002162c7f96d4b07bc1db9
parentd4c199566f6fa5de4afa344712462cfd322de9d0
ui/cocoa: Do not use console_select()

ui/cocoa needs to update the UI info and reset the keyboard state
tracker when switching the console, or the new console will see the
stale UI info or keyboard state. Previously, updating the UI info was
done with cocoa_switch(), but it is meant to be called when the surface
is being replaced, and may be called even when not switching the
console. ui/cocoa never reset the keyboard state, which resulted in
stuck keys.

Add ui/cocoa's own implementation of console_select(), which updates the
UI info and resets the keyboard state tracker.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20240319-console-v2-3-3fd6feef321a@daynix.com>
ui/cocoa.m