int manual_sync;
int frame_drop_for_resizing;
int shared_content;
+
+ double event_filter;
} s_info = {
.manual_sync = 0,
.frame_drop_for_resizing = 1,
.shared_content = 0,
+
+ .event_filter = 0.01f,
};
void conf_set_manual_sync(int flag)
return s_info.shared_content;
}
+double conf_event_filter(void)
+{
+ return s_info.event_filter;
+}
+
+void conf_set_event_filter(double filter)
+{
+ s_info.event_filter = filter;
+}
+
/* End of a file */
#include "conf.h"
#define EAPI __attribute__((visibility("default")))
-#define MINIMUM_EVENT s_info.event_filter
#if defined(FLOG)
FILE *__file_log_fp;
int init_count;
int prevent_overwrite;
- double event_filter;
enum event_state event_state;
enum event_state fault_state;
guint job_timer;
.fault_list = NULL,
.init_count = 0,
.prevent_overwrite = 0,
- .event_filter = 0.01f,
.event_state = INFO_STATE_CALLBACK_IN_IDLE,
.fault_state = INFO_STATE_CALLBACK_IN_IDLE,
.job_timer = 0,
* So set them using arguments.
*/
s_info.prevent_overwrite = prevent_overwrite;
- MINIMUM_EVENT = event_filter;
+ conf_set_event_filter(event_filter);
initialize_livebox(disp, use_thread);
return LB_STATUS_SUCCESS;
env = getenv("PROVIDER_EVENT_FILTER");
if (env) {
- sscanf(env, "%lf", &MINIMUM_EVENT);
+ double event_filter;
+ if (sscanf(env, "%lf", &event_filter) == 1) {
+ conf_set_event_filter(event_filter);
+ }
}
initialize_livebox(disp, 0);
}
if (type & CONTENT_EVENT_MOUSE_MOVE) {
- if (fabs(x - handler->common->pd.x) < MINIMUM_EVENT && fabs(y - handler->common->pd.y) < MINIMUM_EVENT) {
+ if (fabs(x - handler->common->pd.x) < conf_event_filter() && fabs(y - handler->common->pd.y) < conf_event_filter()) {
return LB_STATUS_ERROR_BUSY;
}
} else if (type & CONTENT_EVENT_MOUSE_SET) {
}
if (type & CONTENT_EVENT_MOUSE_MOVE) {
- if (fabs(x - handler->common->lb.x) < MINIMUM_EVENT && fabs(y - handler->common->lb.y) < MINIMUM_EVENT) {
+ if (fabs(x - handler->common->lb.x) < conf_event_filter() && fabs(y - handler->common->lb.y) < conf_event_filter()) {
return LB_STATUS_ERROR_BUSY;
}
} else if (type & CONTENT_EVENT_MOUSE_SET) {