static void set_autocapital (Ecore_IMF_Context *ctx);
-static Eina_Bool g_key_rate_checked = EINA_FALSE, g_focused = EINA_FALSE;
+static Eina_Bool g_focused = EINA_FALSE;
static double g_original_key_rate = 0.0, g_original_key_delay = 0.0, g_desired_key_rate = 0.0;
static double g_filter_event_elapsed_time = 0.0;
static int g_last_key_event_serial = 0;
wl_text_input_activate(imcontext->text_input, seat,
ecore_wl2_window_surface_get(imcontext->window));
- if (g_key_rate_checked == EINA_FALSE && g_desired_key_rate == 0.0) {
- char *key_rate = getenv ("ISF_KEY_REPEAT_RATE");
- if (key_rate) {
- g_desired_key_rate = atof (key_rate);
- if (g_desired_key_rate > 0.0) {
- if (!ecore_wl2_input_keyboard_repeat_get (input, &g_original_key_rate, &g_original_key_delay)) {
- LOGE ("ecore_wl2_input_keyboard_repeat_get failed");
- }
- else {
- LOGD ("ecore_wl2_input_keyboard_repeat_get original rate=%f, delay=%f. Desired rate=%f",
- g_original_key_rate, g_original_key_delay, g_desired_key_rate);
- }
+ char *key_rate = getenv ("ISF_KEY_REPEAT_RATE");
+ if (key_rate) {
+ g_desired_key_rate = atof (key_rate);
+ if (g_desired_key_rate > 0.0) {
+ if (!ecore_wl2_input_keyboard_repeat_get (input, &g_original_key_rate, &g_original_key_delay)) {
+ LOGE ("ecore_wl2_input_keyboard_repeat_get failed");
+ }
+ else {
+ LOGD ("ecore_wl2_input_keyboard_repeat_get original rate=%f, delay=%f. Desired rate=%f",
+ g_original_key_rate, g_original_key_delay, g_desired_key_rate);
}
}
- g_key_rate_checked = EINA_TRUE;
}
if (g_desired_key_rate > 0.0 && g_original_key_delay > 0.0 && !g_focused) {
if (g_desired_key_rate > 0.0 && g_focused) {
g_focused = EINA_FALSE;
+ g_desired_key_rate = 0.0;
Ecore_Wl2_Input *input = ecore_wl2_window_keyboard_get(imcontext->window);
if (input) {