diff --git a/src/bin/e_ipc.c b/src/bin/e_ipc.c index 869a92450..ce2b5528b 100644 --- a/src/bin/e_ipc.c +++ b/src/bin/e_ipc.c @@ -476,32 +476,6 @@ _e_ipc_cb_client_data(void *data __UNUSED__, int type __UNUSED__, void *event) e_config->font_cache, E_IPC_OP_FONT_CACHE_GET_REPLY); break; - case E_IPC_OP_USE_EDGE_FLIP_SET: - if (e_ipc_codec_int_dec(e->data, e->size, - &(e_config->use_edge_flip))) - { - E_CONFIG_LIMIT(e_config->use_edge_flip, 0, 1); - e_config_save_queue(); - } - break; - case E_IPC_OP_USE_EDGE_FLIP_GET: - _e_ipc_reply_int_send(e->client, - e_config->use_edge_flip, - E_IPC_OP_USE_EDGE_FLIP_GET_REPLY); - break; - case E_IPC_OP_EDGE_FLIP_TIMEOUT_SET: - if (e_ipc_codec_double_dec(e->data, e->size, - &(e_config->edge_flip_timeout))) - { - E_CONFIG_LIMIT(e_config->edge_flip_timeout, 0.0, 2.0); - e_config_save_queue(); - } - break; - case E_IPC_OP_EDGE_FLIP_TIMEOUT_GET: - _e_ipc_reply_double_send(e->client, - e_config->edge_flip_timeout, - E_IPC_OP_EDGE_FLIP_TIMEOUT_GET_REPLY); - break; case E_IPC_OP_DESKS_SET: if (e_ipc_codec_2int_dec(e->data, e->size, &(e_config->zone_desks_x_count), diff --git a/src/bin/e_ipc_handlers.h b/src/bin/e_ipc_handlers.h index 3eb200387..62bebf07e 100644 --- a/src/bin/e_ipc_handlers.h +++ b/src/bin/e_ipc_handlers.h @@ -91,8 +91,8 @@ case HDL: { void *data; int bytes; break; # define REQ_INT(__int, HDL) \ - REQ_INT_START(__int, HDL) \ - REQ_INT_END(HDL) + REQ_INT_START(HDL) \ + REQ_INT_END(__int, HDL) # define REQ_NULL(HDL) \ case HDL: \ @@ -769,6 +769,86 @@ break; #endif #undef HDL +/****************************************************************************/ +#define HDL E_IPC_OP_USE_EDGE_FLIP_SET +#if (TYPE == E_REMOTE_OPTIONS) + OP("-edge-flip-set", 1, "Set the edge flip flag (0/1)", 0, HDL) +#elif (TYPE == E_REMOTE_OUT) + REQ_INT(atoi(params[0]), HDL); +#elif (TYPE == E_WM_IN) + START_INT(value, HDL); + e_config->use_edge_flip = value; + E_CONFIG_LIMIT(e_config->use_edge_flip, 0, 1); + SAVE; + END_INT; +#elif (TYPE == E_REMOTE_IN) +#endif +#undef HDL + +/****************************************************************************/ +#define HDL E_IPC_OP_USE_EDGE_FLIP_GET +#if (TYPE == E_REMOTE_OPTIONS) + OP("-edge-flip-get", 0, "Get the edge flip flag", 1, HDL) +#elif (TYPE == E_REMOTE_OUT) + REQ_NULL(HDL) +#elif (TYPE == E_WM_IN) + SEND_INT(e_config->use_edge_flip, E_IPC_OP_USE_EDGE_FLIP_GET_REPLY, HDL); +#elif (TYPE == E_REMOTE_IN) +#endif +#undef HDL + +/****************************************************************************/ +#define HDL E_IPC_OP_USE_EDGE_FLIP_GET_REPLY +#if (TYPE == E_REMOTE_OPTIONS) +#elif (TYPE == E_REMOTE_OUT) +#elif (TYPE == E_WM_IN) +#elif (TYPE == E_REMOTE_IN) + START_INT(val, HDL) + printf("REPLY: %i\n", val); + END_INT; +#endif +#undef HDL + +/****************************************************************************/ +#define HDL E_IPC_OP_EDGE_FLIP_TIMEOUT_SET +#if (TYPE == E_REMOTE_OPTIONS) + OP("-edge-flip-timeout-set", 1, "Set the edge flip timeout (sec)", 0, HDL) +#elif (TYPE == E_REMOTE_OUT) + REQ_DOUBLE(atof(params[0]), HDL) +#elif (TYPE == E_WM_IN) + START_DOUBLE(dbl, HDL); + e_config->edge_flip_timeout = dbl; + E_CONFIG_LIMIT(e_config->edge_flip_timeout, 0.0, 2.0); + SAVE; + END_DOUBLE; +#elif (TYPE == E_REMOTE_IN) +#endif +#undef HDL + +/****************************************************************************/ +#define HDL E_IPC_OP_EDGE_FLIP_TIMEOUT_GET +#if (TYPE == E_REMOTE_OPTIONS) + OP("-edge-flip-timeout-get", 0, "Get the edge flip timeout", 1, HDL) +#elif (TYPE == E_REMOTE_OUT) + REQ_NULL(HDL) +#elif (TYPE == E_WM_IN) + SEND_DOUBLE(e_config->edge_flip_timeout, E_IPC_OP_EDGE_FLIP_TIMEOUT_GET_REPLY, HDL); +#elif (TYPE == E_REMOTE_IN) +#endif +#undef HDL + +/****************************************************************************/ +#define HDL E_IPC_OP_EDGE_FLIP_TIMEOUT_GET_REPLY +#if (TYPE == E_REMOTE_OPTIONS) +#elif (TYPE == E_REMOTE_OUT) +#elif (TYPE == E_WM_IN) +#elif (TYPE == E_REMOTE_IN) + START_DOUBLE(val, HDL) + printf("REPLY: %3.3f\n", val); + END_DOUBLE; +#endif +#undef HDL + #if 0 } #endif diff --git a/src/bin/e_remote_main.c b/src/bin/e_remote_main.c index 5fc8aa83f..c01b640a3 100644 --- a/src/bin/e_remote_main.c +++ b/src/bin/e_remote_main.c @@ -620,10 +620,6 @@ E_IPC_Opt_Handler handlers[] = OREQ("-image-cache-get", "Get the image cache size", E_IPC_OP_IMAGE_CACHE_GET, 1), OINT("-font-cache-set", "Get the speculative font cache size (Kb)", E_IPC_OP_FONT_CACHE_SET, 0), OREQ("-font-cache-get", "Set the font cache size", E_IPC_OP_FONT_CACHE_GET, 1), - OINT("-edge-flip-set", "Set the edge flip flag (0/1)", E_IPC_OP_USE_EDGE_FLIP_SET, 0), - OREQ("-edge-flip-get", "Get the edge flip flag", E_IPC_OP_USE_EDGE_FLIP_GET, 1), - ODBL("-edge-flip_timeout-set", "Set the edge flip timeout (sec)", E_IPC_OP_EDGE_FLIP_TIMEOUT_SET, 0), - OREQ("-edge-flip_timeout-get", "Get the edge flip timeout", E_IPC_OP_EDGE_FLIP_TIMEOUT_GET, 1), O2INT("-desks-set", "Set the number of virtual desktops (X x Y. OPT1 = X, OPT2 = Y)", E_IPC_OP_DESKS_SET, 0), OREQ("-desks-get", "Get the number of virtual desktops", E_IPC_OP_DESKS_GET, 1), }; @@ -1239,24 +1235,6 @@ _e_ipc_cb_server_data(void *data, int type, void *event) printf("REPLY: %i\n", val); } break; - case E_IPC_OP_USE_EDGE_FLIP_GET_REPLY: - if (e->data) - { - int val; - - if (e_ipc_codec_int_dec(e->data, e->size, &val)) - printf("REPLY: %i\n", val); - } - break; - case E_IPC_OP_EDGE_FLIP_TIMEOUT_GET_REPLY: - if (e->data) - { - double val; - - if (e_ipc_codec_double_dec(e->data, e->size, &val)) - printf("REPLY: %3.3f\n", val); - } - break; case E_IPC_OP_DESKS_GET_REPLY: if (e->data) {