62 lines
2.2 KiB
Diff
62 lines
2.2 KiB
Diff
diff -ur a/src/bin/config.h b/src/bin/config.h
|
|
--- a/src/bin/config.h 2019-09-11 17:37:45.989627197 -0400
|
|
+++ b/src/bin/config.h 2019-09-11 17:30:25.221997408 -0400
|
|
@@ -116,4 +116,6 @@
|
|
const char *config_theme_path_get(const Config *config);
|
|
const char *config_theme_path_default_get(const Config *config);
|
|
|
|
+#define CONFIG_CURSOR_IDLE_TIMEOUT_MAX 60.0
|
|
+
|
|
#endif
|
|
diff -ur a/src/bin/options_behavior.c b/src/bin/options_behavior.c
|
|
--- a/src/bin/options_behavior.c 2019-09-11 17:37:45.990627176 -0400
|
|
+++ b/src/bin/options_behavior.c 2019-09-11 17:31:58.374017228 -0400
|
|
@@ -221,7 +221,7 @@
|
|
}
|
|
else
|
|
{
|
|
- config->hide_cursor = INFINITY;
|
|
+ config->hide_cursor = CONFIG_CURSOR_IDLE_TIMEOUT_MAX + 1.0;
|
|
elm_object_disabled_set(ctx->sld_hide_cursor, EINA_TRUE);
|
|
}
|
|
config_save(config, NULL);
|
|
@@ -629,7 +629,7 @@
|
|
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
|
|
elm_object_text_set(o, _("Translucent"));
|
|
elm_object_text_set(o, _("Auto hide the mouse cursor when idle:"));
|
|
- elm_check_state_set(o, !isnan(config->hide_cursor));
|
|
+ elm_check_state_set(o, config->hide_cursor < CONFIG_CURSOR_IDLE_TIMEOUT_MAX);
|
|
elm_box_pack_end(bx, o);
|
|
evas_object_show(o);
|
|
evas_object_smart_callback_add(o, "changed",
|
|
@@ -643,7 +643,7 @@
|
|
elm_slider_span_size_set(o, 40);
|
|
elm_slider_unit_format_set(o, _("%1.1f s"));
|
|
elm_slider_indicator_format_set(o, _("%1.1f s"));
|
|
- elm_slider_min_max_set(o, 0.0, 60.0);
|
|
+ elm_slider_min_max_set(o, 0.0, CONFIG_CURSOR_IDLE_TIMEOUT_MAX);
|
|
elm_slider_value_set(o, config->hide_cursor);
|
|
elm_box_pack_end(bx, o);
|
|
evas_object_show(o);
|
|
diff -ur a/src/bin/win.c b/src/bin/win.c
|
|
--- a/src/bin/win.c 2019-09-11 17:37:45.990627176 -0400
|
|
+++ b/src/bin/win.c 2019-09-11 17:33:06.533568215 -0400
|
|
@@ -1609,7 +1609,7 @@
|
|
if (wn->on_popover)
|
|
return;
|
|
|
|
- if (!isnan(wn->config->hide_cursor))
|
|
+ if (wn->config->hide_cursor < CONFIG_CURSOR_IDLE_TIMEOUT_MAX)
|
|
{
|
|
if (wn->hide_cursor_timer)
|
|
{
|
|
@@ -1819,7 +1819,7 @@
|
|
|
|
}
|
|
|
|
- if (!isnan(wn->config->hide_cursor))
|
|
+ if (wn->config->hide_cursor < CONFIG_CURSOR_IDLE_TIMEOUT_MAX)
|
|
{
|
|
wn->hide_cursor_timer = ecore_timer_add(
|
|
wn->config->hide_cursor, _hide_cursor, wn);
|