Skip to content

Commit

Permalink
added _WEBOS_ACCESS_POLICY_KEYS_GUIDE
Browse files Browse the repository at this point in the history
  • Loading branch information
mariotaku committed Apr 28, 2024
1 parent b2aabfa commit a08e762
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/video/wayland/SDL_waylandwebos.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ static const char* webos_window_hints[] = {
SDL_HINT_WEBOS_ACCESS_POLICY_KEYS_BACK,
SDL_HINT_WEBOS_ACCESS_POLICY_KEYS_EXIT,
SDL_HINT_WEBOS_ACCESS_POLICY_KEYS_HOME,
SDL_HINT_WEBOS_ACCESS_POLICY_KEYS_GUIDE,
SDL_HINT_WEBOS_CURSOR_CALIBRATION_DISABLE,
SDL_HINT_WEBOS_CURSOR_FREQUENCY,
SDL_HINT_WEBOS_CURSOR_SLEEP_TIME,
Expand Down Expand Up @@ -124,6 +125,9 @@ int WaylandWebOS_SetupSurface(_THIS, SDL_WindowData *data)
if (SDL_GetHintBoolean(SDL_HINT_WEBOS_ACCESS_POLICY_KEYS_HOME, SDL_FALSE)) {
wl_webos_shell_surface_set_property(data->shell_surface.webos.webos, "_WEBOS_ACCESS_POLICY_KEYS_HOME", "true");
}
if (SDL_GetHintBoolean(SDL_HINT_WEBOS_ACCESS_POLICY_KEYS_GUIDE, SDL_FALSE)) {
wl_webos_shell_surface_set_property(data->shell_surface.webos.webos, "_WEBOS_ACCESS_POLICY_KEYS_GUIDE", "true");
}
if(SDL_GetHintBoolean(SDL_HINT_WEBOS_CURSOR_CALIBRATION_DISABLE, SDL_FALSE)) {
wl_webos_shell_surface_set_property(data->shell_surface.webos.webos, "restore_cursor_position", "true");
}
Expand Down Expand Up @@ -210,6 +214,9 @@ static void WindowHintsCallback(void *userdata, const char *name, const char *ol
} else if (SDL_strcmp(name, SDL_HINT_WEBOS_ACCESS_POLICY_KEYS_HOME) == 0) {
wl_webos_shell_surface_set_property(win_data->shell_surface.webos.webos, "_WEBOS_ACCESS_POLICY_KEYS_HOME",
SDL_GetStringBoolean(newValue, SDL_FALSE) ? "true" : "false");
} else if (SDL_strcmp(name, SDL_HINT_WEBOS_ACCESS_POLICY_KEYS_GUIDE) == 0) {
wl_webos_shell_surface_set_property(win_data->shell_surface.webos.webos, "_WEBOS_ACCESS_POLICY_KEYS_GUIDE",
SDL_GetStringBoolean(newValue, SDL_FALSE) ? "true" : "false");
} else if (SDL_strcmp(name, SDL_HINT_WEBOS_CURSOR_CALIBRATION_DISABLE) == 0) {
wl_webos_shell_surface_set_property(win_data->shell_surface.webos.webos, "restore_cursor_position",
SDL_GetStringBoolean(newValue, SDL_FALSE) ? "true" : "false");
Expand Down

0 comments on commit a08e762

Please sign in to comment.