diff --git a/TODO b/TODO index 371215368..7ea6d7f07 100644 --- a/TODO +++ b/TODO @@ -55,17 +55,18 @@ Also look at all the .c files - they have their own localized TODO lists These are in no particular order: +* double check edje and evas image caches are working * breaking out config via ipc / e_remote is too much work. this needs to get easier. -* for click to focus - grab the mouse on all new windows, ungrab on focus, grab again on unfocus * move all ipc codecs to use eet -* make raise_timer a on/off flag and add a double for delay * on restart e always goes back to desktop 0,0 - it shoudl go to the desktop it was last on (per zone, per container, per manager). * start module needs to have an way to alert users to "click here" and back off alerting users as they learn what it is (over time) * sometiems windows that get shut down/closed get unparented but the whole - border stays around - something is keeping extra references maybe? + border stays around - something is keeping extra references maybe? it is + hidden, until you flip desktops then it appears again - but with no client + around. * fix action delete (can segv if action is stored for "long runing actions" like move/resize) * drop on ibar for re-ordering, removal seems broken (drop location is the diff --git a/src/bin/e_border.c b/src/bin/e_border.c index 906916127..bcf4f1efd 100644 --- a/src/bin/e_border.c +++ b/src/bin/e_border.c @@ -2612,13 +2612,12 @@ _e_border_cb_mouse_move(void *data, int type, void *event) } else { - int x, y; - double dist; - - x = bd->drag.x - ev->root.x; - y = bd->drag.y - ev->root.y; - dist = sqrt(pow(x, 2) + pow(y, 2)); - if (dist > 4) + int dx, dy; + + dx = bd->drag.x - ev->root.x; + dy = bd->drag.y - ev->root.y; + if (((dx * dx) + (dy * dy)) > + (e_config->drag_resist * e_config->drag_resist)) { /* start drag! */ if (bd->icon_object) diff --git a/src/bin/e_config.c b/src/bin/e_config.c index e594f4e89..2702f9bc1 100644 --- a/src/bin/e_config.c +++ b/src/bin/e_config.c @@ -144,6 +144,7 @@ e_config_init(void) E_CONFIG_VAL(D, T, always_click_to_raise, INT); E_CONFIG_VAL(D, T, use_auto_raise, INT); E_CONFIG_VAL(D, T, auto_raise_delay, DOUBLE); + E_CONFIG_VAL(D, T, drag_resist, INT); e_config = e_config_domain_load("e", _e_config_edd); if (e_config) @@ -210,6 +211,7 @@ e_config_init(void) e_config->always_click_to_raise = 0; e_config->use_auto_raise = 0; e_config->auto_raise_delay = 0.5; + e_config->drag_resist = 8; { E_Config_Module *em; @@ -684,8 +686,12 @@ e_config_init(void) E_CONFIG_LIMIT(e_config->zone_desks_y_count, 1, 64); E_CONFIG_LIMIT(e_config->use_edge_flip, 0, 1); E_CONFIG_LIMIT(e_config->edge_flip_timeout, 0.0, 2.0); + E_CONFIG_LIMIT(e_config->focus_policy, 0, 2); + E_CONFIG_LIMIT(e_config->pass_click_on, 0, 1); + E_CONFIG_LIMIT(e_config->always_click_to_raise, 0, 1); E_CONFIG_LIMIT(e_config->use_auto_raise, 0, 1); E_CONFIG_LIMIT(e_config->auto_raise_delay, 0.0, 5.0); + E_CONFIG_LIMIT(e_config->drag_resist, 0, 100); /* apply lang config - exception because config is loaded after intl setup */ diff --git a/src/bin/e_config.h b/src/bin/e_config.h index f3cbf24dc..d131810c4 100644 --- a/src/bin/e_config.h +++ b/src/bin/e_config.h @@ -46,7 +46,7 @@ typedef Eet_Data_Descriptor E_Config_DD; * defaults for e to work - started at 100 when we introduced this config * versioning feature */ -#define E_CONFIG_FILE_VERSION 105 +#define E_CONFIG_FILE_VERSION 106 #define E_EVAS_ENGINE_DEFAULT 0 #define E_EVAS_ENGINE_SOFTWARE_X11 1 @@ -98,6 +98,7 @@ struct _E_Config int always_click_to_raise; int use_auto_raise; double auto_raise_delay; + int drag_resist; }; /* FIXME: all of thsie needs to become eet lumps for enmcode/decode */ diff --git a/src/modules/ibar/e_mod_main.c b/src/modules/ibar/e_mod_main.c index 9f7e33eee..4a730cdd8 100644 --- a/src/modules/ibar/e_mod_main.c +++ b/src/modules/ibar/e_mod_main.c @@ -1237,10 +1237,12 @@ _ibar_icon_cb_mouse_move(void *data, Evas *e, Evas_Object *obj, void *event_info if (drag_start) { - double dist; + int dx, dy; - dist = sqrt(pow((ev->cur.output.x - drag_x), 2) + pow((ev->cur.output.y - drag_y), 2)); - if (dist > 4) + dx = ev->cur.output.x - drag_x; + dy = ev->cur.output.y - drag_y; + if (((dx * dx) + (dy * dy)) > + (e_config->drag_resist * e_config->drag_resist)) { E_Drag *d; Evas_Object *o;