Skip to content

Commit

Permalink
keyboard grab for non-webOS platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
mariotaku committed Apr 30, 2024
1 parent 38c9d46 commit c29cb49
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/app/ui/streaming/streaming.controller.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,13 @@ static void on_view_created(lv_fragment_t *self, lv_obj_t *view) {

controller->notice = notice;
controller->notice_label = notice_label;

#if !defined(TARGET_WEBOS)
const app_settings_t *settings = &controller->global->settings;
if (settings->syskey_capture) {
SDL_SetWindowKeyboardGrab(controller->global->ui.window, SDL_TRUE);
}
#endif
}

static void on_delete_obj(lv_fragment_t *self, lv_obj_t *view) {
Expand All @@ -234,6 +241,10 @@ static void on_delete_obj(lv_fragment_t *self, lv_obj_t *view) {
}
app_input_set_group(&controller->global->ui.input, NULL);
lv_group_del(controller->group);

#if !defined(TARGET_WEBOS)
SDL_SetWindowKeyboardGrab(controller->global->ui.window, SDL_FALSE);
#endif
}

static void on_obj_deleted(lv_fragment_t *self, lv_obj_t *view) {
Expand Down

0 comments on commit c29cb49

Please sign in to comment.