diff --git a/AUTHORS b/AUTHORS index 0ec41a757..4fa0c653e 100644 --- a/AUTHORS +++ b/AUTHORS @@ -4,3 +4,4 @@ Sebastian Dransfeld HandyAndE (Andrew Williams) CodeWarrior (Hisham Mardam Bey) dj2 (dan sinclair) +Tilman Sauerbeck diff --git a/src/bin/e_config.c b/src/bin/e_config.c index dbe983d80..e013c4bb6 100644 --- a/src/bin/e_config.c +++ b/src/bin/e_config.c @@ -327,6 +327,8 @@ e_config_init(void) E_CONFIG_LIST(D, T, remembers, _e_config_remember_edd); E_CONFIG_VAL(D, T, move_info_follows, INT); /**/ E_CONFIG_VAL(D, T, resize_info_follows, INT); /**/ + E_CONFIG_VAL(D, T, move_info_visible, INT); /**/ + E_CONFIG_VAL(D, T, resize_info_visible, INT); /**/ E_CONFIG_VAL(D, T, focus_last_focused_per_desktop, INT); /**/ E_CONFIG_VAL(D, T, focus_revert_on_hide_or_close, INT); /**/ E_CONFIG_VAL(D, T, use_e_cursor, INT); /**/ @@ -445,6 +447,8 @@ e_config_init(void) e_config->transition_change = strdup("crossfade"); e_config->move_info_follows = 1; e_config->resize_info_follows = 1; + e_config->move_info_visible = 1; + e_config->resize_info_visible = 1; e_config->focus_last_focused_per_desktop = 1; e_config->focus_revert_on_hide_or_close = 1; e_config->use_e_cursor = 1; @@ -1393,6 +1397,8 @@ e_config_init(void) E_CONFIG_LIMIT(e_config->ping_clients_wait, 0.0, 120.0); E_CONFIG_LIMIT(e_config->move_info_follows, 0, 1); E_CONFIG_LIMIT(e_config->resize_info_follows, 0, 1); + E_CONFIG_LIMIT(e_config->move_info_visible, 0, 1); + E_CONFIG_LIMIT(e_config->resize_info_visible, 0, 1); E_CONFIG_LIMIT(e_config->focus_last_focused_per_desktop, 0, 1); E_CONFIG_LIMIT(e_config->focus_revert_on_hide_or_close, 0, 1); E_CONFIG_LIMIT(e_config->use_e_cursor, 0, 1); diff --git a/src/bin/e_config.h b/src/bin/e_config.h index d78691f30..1794e9863 100644 --- a/src/bin/e_config.h +++ b/src/bin/e_config.h @@ -145,6 +145,8 @@ struct _E_Config Evas_List *remembers; int move_info_follows; int resize_info_follows; + int move_info_visible; + int resize_info_visible; int focus_last_focused_per_desktop; int focus_revert_on_hide_or_close; int use_e_cursor; diff --git a/src/bin/e_ipc_handlers.h b/src/bin/e_ipc_handlers.h index 49404b8e3..85379bc99 100644 --- a/src/bin/e_ipc_handlers.h +++ b/src/bin/e_ipc_handlers.h @@ -4584,6 +4584,88 @@ break; /****************************************************************************/ +#define HDL E_IPC_OP_MOVE_INFO_VISIBLE_SET +#if (TYPE == E_REMOTE_OPTIONS) + OP("-move-info-visible-set", 1, "Set whether the move dialog should be visible", 0, HDL) +#elif (TYPE == E_REMOTE_OUT) + REQ_INT(atoi(params[0]), HDL); +#elif (TYPE == E_WM_IN) + START_INT(val, HDL); + e_config->move_info_visible = val; + E_CONFIG_LIMIT(e_config->move_info_visible, 0, 1); + SAVE; + END_INT; +#elif (TYPE == E_REMOTE_IN) +#endif +#undef HDL + +/****************************************************************************/ +#define HDL E_IPC_OP_MOVE_INFO_VISIBLE_GET +#if (TYPE == E_REMOTE_OPTIONS) + OP("-move-info-visible-get", 0, "Get whether the move dialog should be visible", 1, HDL) +#elif (TYPE == E_REMOTE_OUT) + REQ_NULL(HDL); +#elif (TYPE == E_WM_IN) + SEND_INT(e_config->move_info_visible, E_IPC_OP_MOVE_INFO_VISIBLE_GET_REPLY, HDL); +#elif (TYPE == E_REMOTE_IN) +#endif +#undef HDL + +/****************************************************************************/ +#define HDL E_IPC_OP_MOVE_INFO_VISIBLE_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: %d\n", val); + END_INT; +#endif +#undef HDL + +/****************************************************************************/ + +#define HDL E_IPC_OP_RESIZE_INFO_VISIBLE_SET +#if (TYPE == E_REMOTE_OPTIONS) + OP("-resize-info-visible-set", 1, "Set whether the resize dialog should be visible", 0, HDL) +#elif (TYPE == E_REMOTE_OUT) + REQ_INT(atoi(params[0]), HDL); +#elif (TYPE == E_WM_IN) + START_INT(val, HDL); + e_config->resize_info_visible = val; + E_CONFIG_LIMIT(e_config->resize_info_visible, 0, 1); + SAVE; + END_INT; +#elif (TYPE == E_REMOTE_IN) +#endif +#undef HDL + +/****************************************************************************/ +#define HDL E_IPC_OP_RESIZE_INFO_VISIBLE_GET +#if (TYPE == E_REMOTE_OPTIONS) + OP("-resize-info-visible-get", 0, "Set whether the resize dialog should be visible", 1, HDL) +#elif (TYPE == E_REMOTE_OUT) + REQ_NULL(HDL); +#elif (TYPE == E_WM_IN) + SEND_INT(e_config->resize_info_visible, E_IPC_OP_RESIZE_INFO_VISIBLE_GET_REPLY, HDL); +#elif (TYPE == E_REMOTE_IN) +#endif +#undef HDL + +/****************************************************************************/ +#define HDL E_IPC_OP_RESIZE_INFO_VISIBLE_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: %d\n", val); + END_INT; +#endif +#undef HDL + +/****************************************************************************/ + #define HDL E_IPC_OP_FOCUS_LAST_FOCUSED_PER_DESKTOP_SET #if (TYPE == E_REMOTE_OPTIONS) OP("-focus-last-focused-per-desktop-set", 1, "Set whether E should remember focused windows when switching desks", 0, HDL) diff --git a/src/bin/e_ipc_handlers_list.h b/src/bin/e_ipc_handlers_list.h index d479a8e84..d1b2258ab 100644 --- a/src/bin/e_ipc_handlers_list.h +++ b/src/bin/e_ipc_handlers_list.h @@ -276,3 +276,10 @@ #define E_IPC_OP_USE_E_CURSOR_SET 270 #define E_IPC_OP_USE_E_CURSOR_GET 271 #define E_IPC_OP_USE_E_CURSOR_GET_REPLY 272 + +#define E_IPC_OP_MOVE_INFO_VISIBLE_SET 273 +#define E_IPC_OP_MOVE_INFO_VISIBLE_GET 274 +#define E_IPC_OP_MOVE_INFO_VISIBLE_GET_REPLY 275 +#define E_IPC_OP_RESIZE_INFO_VISIBLE_SET 276 +#define E_IPC_OP_RESIZE_INFO_VISIBLE_GET 277 +#define E_IPC_OP_RESIZE_INFO_VISIBLE_GET_REPLY 278 diff --git a/src/bin/e_moveresize.c b/src/bin/e_moveresize.c index 8253ac246..779594c1c 100644 --- a/src/bin/e_moveresize.c +++ b/src/bin/e_moveresize.c @@ -18,47 +18,60 @@ e_resize_begin(E_Zone *zone, int w, int h) Evas_Coord ew, eh; char buf[40]; + _obj = NULL; if (_disp_pop) e_object_del(E_OBJECT(_disp_pop)); - _disp_pop = e_popup_new(zone, 0, 0, 1, 1); - if (!_disp_pop) return; - e_popup_layer_set(_disp_pop, 255); - _obj = edje_object_add(_disp_pop->evas); - e_theme_edje_object_set(_obj, "base/theme/borders", - "widgets/border/default/resize"); - snprintf(buf, sizeof(buf), "9999x9999"); - edje_object_part_text_set(_obj, "text", buf); - - edje_object_size_min_calc(_obj, &ew, &eh); - evas_object_move(_obj, 0, 0); - evas_object_resize(_obj, ew, eh); - evas_object_show(_obj); - e_popup_edje_bg_object_set(_disp_pop, _obj); + + if (e_config->resize_info_visible) + { + _disp_pop = e_popup_new(zone, 0, 0, 1, 1); + if (!_disp_pop) return; + e_popup_layer_set(_disp_pop, 255); + _obj = edje_object_add(_disp_pop->evas); + e_theme_edje_object_set(_obj, "base/theme/borders", + "widgets/border/default/resize"); + snprintf(buf, sizeof(buf), "9999x9999"); + edje_object_part_text_set(_obj, "text", buf); + + edje_object_size_min_calc(_obj, &ew, &eh); + evas_object_move(_obj, 0, 0); + evas_object_resize(_obj, ew, eh); + evas_object_show(_obj); + e_popup_edje_bg_object_set(_disp_pop, _obj); + } e_resize_update(w, h); - e_popup_move_resize(_disp_pop, - (obj_x - _disp_pop->zone->x) + - ((obj_w - ew) / 2), - (obj_y - _disp_pop->zone->y) + - ((obj_h - eh) / 2), - ew, eh); - e_popup_show(_disp_pop); + if (e_config->resize_info_visible) + { + e_popup_move_resize(_disp_pop, + (obj_x - _disp_pop->zone->x) + + ((obj_w - ew) / 2), + (obj_y - _disp_pop->zone->y) + + ((obj_h - eh) / 2), + ew, eh); + e_popup_show(_disp_pop); + } + visible = 1; } void e_resize_end(void) { - if (_obj) + if (e_config->resize_info_visible) { - evas_object_del(_obj); - _obj = NULL; - } - if (_disp_pop) - { - e_object_del(E_OBJECT(_disp_pop)); - _disp_pop = NULL; + if (_obj) + { + evas_object_del(_obj); + _obj = NULL; + } + if (_disp_pop) + { + e_object_del(E_OBJECT(_disp_pop)); + _disp_pop = NULL; + } } + visible = 0; } @@ -84,45 +97,58 @@ e_move_begin(E_Zone *zone, int x, int y) Evas_Coord ew, eh; char buf[40]; + _obj = NULL; if (_disp_pop) e_object_del(E_OBJECT(_disp_pop)); - _disp_pop = e_popup_new(zone, 0, 0, 1, 1); - _obj = edje_object_add(_disp_pop->evas); - e_theme_edje_object_set(_obj, "base/theme/borders", - "widgets/border/default/move"); - snprintf(buf, sizeof(buf), "9999 9999"); - edje_object_part_text_set(_obj, "text", buf); - edje_object_size_min_calc(_obj, &ew, &eh); - evas_object_move(_obj, 0, 0); - evas_object_resize(_obj, ew, eh); - evas_object_show(_obj); - e_popup_edje_bg_object_set(_disp_pop, _obj); + if (e_config->move_info_visible) + { + _disp_pop = e_popup_new(zone, 0, 0, 1, 1); + _obj = edje_object_add(_disp_pop->evas); + e_theme_edje_object_set(_obj, "base/theme/borders", + "widgets/border/default/move"); + snprintf(buf, sizeof(buf), "9999 9999"); + edje_object_part_text_set(_obj, "text", buf); + + edje_object_size_min_calc(_obj, &ew, &eh); + evas_object_move(_obj, 0, 0); + evas_object_resize(_obj, ew, eh); + evas_object_show(_obj); + e_popup_edje_bg_object_set(_disp_pop, _obj); + } // e_move_update(x, y); - e_popup_move_resize(_disp_pop, - (obj_x - _disp_pop->zone->x) + - ((obj_w - ew) / 2), - (obj_y - _disp_pop->zone->y) + - ((obj_h - eh) / 2), - ew, eh); + if (e_config->move_info_visible) + { + e_popup_move_resize(_disp_pop, + (obj_x - _disp_pop->zone->x) + + ((obj_w - ew) / 2), + (obj_y - _disp_pop->zone->y) + + ((obj_h - eh) / 2), + ew, eh); // e_popup_show(_disp_pop); + } + // visible = 1; } void e_move_end(void) { - if (_obj) + if (e_config->move_info_visible) { - evas_object_del(_obj); - _obj = NULL; - } - if (_disp_pop) - { - e_object_del(E_OBJECT(_disp_pop)); - _disp_pop = NULL; + if (_obj) + { + evas_object_del(_obj); + _obj = NULL; + } + if (_disp_pop) + { + e_object_del(E_OBJECT(_disp_pop)); + _disp_pop = NULL; + } } + visible = 0; } @@ -149,7 +175,7 @@ e_move_resize_object_coords_set(int x, int y, int w, int h) obj_y = y; obj_w = w; obj_h = h; - if (visible) + if (e_config->move_info_visible && visible) { e_popup_move(_disp_pop, (obj_x - _disp_pop->zone->x) +