Skip to content

Commit

Permalink
ensure osk is deactivated
Browse files Browse the repository at this point in the history
  • Loading branch information
mariotaku committed May 18, 2024
1 parent 4f63b73 commit 265d00e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/video/wayland/SDL_waylandwebos_osk.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

struct webos_osk_data
{
struct wl_seat *seat;
struct text_model *text_model;
uint32_t index;
uint32_t length;
Expand Down Expand Up @@ -139,6 +140,7 @@ static SDL_bool ensureTextModel(SDL_VideoData *waylandData)
struct webos_osk_data *osk_data = waylandData->webos_screen_keyboard_data;
if (osk_data == NULL) {
osk_data = SDL_calloc(1, sizeof(struct webos_osk_data));
osk_data->seat = waylandData->input->seat;
waylandData->webos_screen_keyboard_data = osk_data;
} else if (osk_data->text_model != NULL) {
return SDL_TRUE;
Expand Down Expand Up @@ -261,6 +263,7 @@ void osk_input_panel_state(void *data, struct text_model *text_model, uint32_t s
}
osk_data->state = state;
if (state == 0) {
text_model_deactivate(text_model, osk_data->seat);
osk_data->text_model = NULL;
}
}
Expand Down

0 comments on commit 265d00e

Please sign in to comment.