summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2013-02-05 13:13:33 +0000
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2013-02-05 13:13:33 +0000
commit41759238cd3a84b27f58d3e7d6647bd25b0b190f (patch)
tree83cb4e919392e0ec485aca3e7716fe9817613d0e
parent6f2737928db25491165fb73372b382d053a4797d (diff)
a much requested feature: drag-only edge bindings
ticket #281 SVN revision: 83628
-rw-r--r--ChangeLog1
-rw-r--r--NEWS1
-rw-r--r--data/themes/edc/edgebindings.edc40
-rw-r--r--src/bin/e_bindings.c13
-rw-r--r--src/bin/e_bindings.h7
-rw-r--r--src/bin/e_canvas.c6
-rw-r--r--src/bin/e_canvas.h1
-rw-r--r--src/bin/e_config.c2
-rw-r--r--src/bin/e_config.h1
-rw-r--r--src/bin/e_shelf.c34
-rw-r--r--src/bin/e_zone.c20
-rw-r--r--src/bin/e_zone.h1
-rw-r--r--src/modules/conf_edgebindings/e_int_config_edgebindings.c36
13 files changed, 112 insertions, 51 deletions
diff --git a/ChangeLog b/ChangeLog
index 4644bbdb3..b80475d5a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
2 2
3 * improve load time of apps dialogs 3 * improve load time of apps dialogs
4 * fix bug where edge flips would stop functioning after dragging to an invalid edge containing a shelf 4 * fix bug where edge flips would stop functioning after dragging to an invalid edge containing a shelf
5 * edge bindings can now be set to "drag only"
5 6
62013-02-04 Mike Blumenkrantz 72013-02-04 Mike Blumenkrantz
7 8
diff --git a/NEWS b/NEWS
index f40a929d0..4651f1d6c 100644
--- a/NEWS
+++ b/NEWS
@@ -30,6 +30,7 @@ Additions:
30 * added option to disable comp effects on screen 30 * added option to disable comp effects on screen
31 * added options and functionality for "fast" composite effects 31 * added options and functionality for "fast" composite effects
32 * split comp window match settings into separate dialog 32 * split comp window match settings into separate dialog
33 * edge bindings can now be set to "drag only"
33 34
34Changes: 35Changes:
35 Modules: 36 Modules:
diff --git a/data/themes/edc/edgebindings.edc b/data/themes/edc/edgebindings.edc
index 9b9b25146..bf5cc07e5 100644
--- a/data/themes/edc/edgebindings.edc
+++ b/data/themes/edc/edgebindings.edc
@@ -180,32 +180,35 @@ group { name: "e/modules/conf_edgebindings/selection";
180 fill.smooth: 0; 180 fill.smooth: 0;
181 } 181 }
182 } 182 }
183 part { name: "e.swallow.check"; type: SWALLOW; 183 part { name: "e.box"; type: BOX;
184 description { state: "default" 0.0; 184 description { state: "default" 0.0;
185 rel1 { 185 rel1 {
186relative: 1 1; 186 relative: 1 1;
187offset: 5 4; 187 offset: 50 4;
188to_x: "e.swallow.background"; 188 to_x: "e.edge.bottom_right";
189to_y: "e.text.description"; 189 to_y: "e.text.description";
190 } 190 }
191 rel2 { 191 rel2 {
192relative: 1 1; 192 offset: -50 24;
193offset: -5 24; 193 to_y: "e.text.description";
194to_y: "e.text.description"; 194 }
195 box { layout: "horizontal";
196 padding: 0 0;
197 align: 0.5 0.5;
198 min: 1 1;
195 } 199 }
196 } 200 }
197 } 201 }
198 part { name: "e.swallow.slider"; type: SWALLOW; 202 part { name: "e.swallow.slider"; type: SWALLOW;
199 description { state: "default" 0.0; 203 description { state: "default" 0.0;
200 rel1 { 204 rel1 {
201relative: 1 1; 205 relative: 1 1;
202offset: 5 1; 206 offset: 5 1;
203to_x: "e.edge.bottom_right"; 207 to_x: "e.edge.bottom_right";
204to_y: "e.swallow.check"; 208 to_y: "e.box";
205 } 209 }
206 rel2 { 210 rel2 {
207relative: 1 1; 211 offset: -5 -1;
208offset: -5 -1;
209 } 212 }
210 } 213 }
211 } 214 }
@@ -213,13 +216,12 @@ offset: -5 -1;
213 scale: 1; 216 scale: 1;
214 description { state: "default" 0.0; 217 description { state: "default" 0.0;
215 rel1 { 218 rel1 {
216relative: 1 0; 219 relative: 1 0;
217offset: 5 4; 220 offset: 80 4;
218to_x: "e.swallow.background"; 221 to_x: "e.edge.right";
219 } 222 }
220 rel2 { 223 rel2 {
221relative: 1 1; 224 offset: -80 -45;
222offset: -5 -45;
223 } 225 }
224 text { 226 text {
225 style: "edge_binding_style"; 227 style: "edge_binding_style";
diff --git a/src/bin/e_bindings.c b/src/bin/e_bindings.c
index ec52b980a..09aa77ca2 100644
--- a/src/bin/e_bindings.c
+++ b/src/bin/e_bindings.c
@@ -61,7 +61,7 @@ e_bindings_init(void)
61 ebk->any_mod, ebk->action, ebk->params); 61 ebk->any_mod, ebk->action, ebk->params);
62 62
63 EINA_LIST_FOREACH(e_bindings->edge_bindings, l, ebe) 63 EINA_LIST_FOREACH(e_bindings->edge_bindings, l, ebe)
64 e_bindings_edge_add(ebe->context, ebe->edge, ebe->modifiers, 64 e_bindings_edge_add(ebe->context, ebe->edge, ebe->drag_only, ebe->modifiers,
65 ebe->any_mod, ebe->action, ebe->params, ebe->delay); 65 ebe->any_mod, ebe->action, ebe->params, ebe->delay);
66 66
67 EINA_LIST_FOREACH(e_bindings->signal_bindings, l, ebs) 67 EINA_LIST_FOREACH(e_bindings->signal_bindings, l, ebs)
@@ -179,7 +179,7 @@ e_bindings_edge_reset(void)
179 E_FREE_LIST(edge_bindings, _e_bindings_edge_free); 179 E_FREE_LIST(edge_bindings, _e_bindings_edge_free);
180 180
181 EINA_LIST_FOREACH(e_bindings->edge_bindings, l, ebe) 181 EINA_LIST_FOREACH(e_bindings->edge_bindings, l, ebe)
182 e_bindings_edge_add(ebe->context, ebe->edge, ebe->modifiers, 182 e_bindings_edge_add(ebe->context, ebe->edge, ebe->drag_only, ebe->modifiers,
183 ebe->any_mod, ebe->action, ebe->params, ebe->delay); 183 ebe->any_mod, ebe->action, ebe->params, ebe->delay);
184} 184}
185 185
@@ -604,7 +604,7 @@ e_bindings_key_up_event_find(E_Binding_Context ctxt, Ecore_Event_Key *ev)
604} 604}
605 605
606EAPI void 606EAPI void
607e_bindings_edge_add(E_Binding_Context ctxt, E_Zone_Edge edge, E_Binding_Modifier mod, int any_mod, const char *action, const char *params, float delay) 607e_bindings_edge_add(E_Binding_Context ctxt, E_Zone_Edge edge, Eina_Bool drag_only, E_Binding_Modifier mod, int any_mod, const char *action, const char *params, float delay)
608{ 608{
609 E_Binding_Edge *binding; 609 E_Binding_Edge *binding;
610 610
@@ -614,6 +614,7 @@ e_bindings_edge_add(E_Binding_Context ctxt, E_Zone_Edge edge, E_Binding_Modifier
614 binding->mod = mod; 614 binding->mod = mod;
615 binding->any_mod = any_mod; 615 binding->any_mod = any_mod;
616 binding->delay = delay; 616 binding->delay = delay;
617 binding->drag_only = drag_only;
617 if (action) binding->action = eina_stringshare_add(action); 618 if (action) binding->action = eina_stringshare_add(action);
618 if (params) binding->params = eina_stringshare_add(params); 619 if (params) binding->params = eina_stringshare_add(params);
619 edge_bindings = eina_list_append(edge_bindings, binding); 620 edge_bindings = eina_list_append(edge_bindings, binding);
@@ -677,7 +678,7 @@ e_bindings_edge_get(const char *action, E_Zone_Edge edge, int click)
677} 678}
678 679
679EAPI void 680EAPI void
680e_bindings_edge_del(E_Binding_Context ctxt, E_Zone_Edge edge, E_Binding_Modifier mod, int any_mod, const char *action, const char *params, float delay) 681e_bindings_edge_del(E_Binding_Context ctxt, E_Zone_Edge edge, Eina_Bool drag_only, E_Binding_Modifier mod, int any_mod, const char *action, const char *params, float delay)
681{ 682{
682 E_Binding_Edge *binding; 683 E_Binding_Edge *binding;
683 Eina_List *l, *ll; 684 Eina_List *l, *ll;
@@ -691,6 +692,7 @@ e_bindings_edge_del(E_Binding_Context ctxt, E_Zone_Edge edge, E_Binding_Modifier
691 (binding->mod == mod) && 692 (binding->mod == mod) &&
692 ((binding->delay * 1000) == (delay * 1000)) && 693 ((binding->delay * 1000) == (delay * 1000)) &&
693 (binding->any_mod == any_mod) && 694 (binding->any_mod == any_mod) &&
695 (binding->drag_only == drag_only) &&
694 (((binding->action) && (action) && (!strcmp(binding->action, action))) || 696 (((binding->action) && (action) && (!strcmp(binding->action, action))) ||
695 ((!binding->action) && (!action))) && 697 ((!binding->action) && (!action))) &&
696 (((binding->params) && (params) && (!strcmp(binding->params, params))) || 698 (((binding->params) && (params) && (!strcmp(binding->params, params))) ||
@@ -727,6 +729,7 @@ e_bindings_edge_in_event_handle(E_Binding_Context ctxt, E_Object *obj, E_Event_Z
727 { 729 {
728 /* A value of <= -1.0 for the delay indicates it as a mouse-click binding on that edge */ 730 /* A value of <= -1.0 for the delay indicates it as a mouse-click binding on that edge */
729 if (((binding->edge == ev->edge)) && (binding->delay >= 0.0) && 731 if (((binding->edge == ev->edge)) && (binding->delay >= 0.0) &&
732 ((binding->drag_only == ev->drag) || ev->drag) &&
730 ((binding->any_mod) || (binding->mod == mod))) 733 ((binding->any_mod) || (binding->mod == mod)))
731 { 734 {
732 if (_e_bindings_context_match(binding->ctxt, ctxt)) 735 if (_e_bindings_context_match(binding->ctxt, ctxt))
@@ -817,7 +820,7 @@ e_bindings_edge_down_event_handle(E_Binding_Context ctxt, E_Object *obj, E_Event
817 EINA_LIST_FOREACH(edge_bindings, l, binding) 820 EINA_LIST_FOREACH(edge_bindings, l, binding)
818 { 821 {
819 if (((binding->edge == ev->edge)) && (binding->delay == -1.0 * ev->button) && 822 if (((binding->edge == ev->edge)) && (binding->delay == -1.0 * ev->button) &&
820 ((binding->any_mod) || (binding->mod == mod))) 823 (!binding->drag_only) && ((binding->any_mod) || (binding->mod == mod)))
821 { 824 {
822 if (_e_bindings_context_match(binding->ctxt, ctxt)) 825 if (_e_bindings_context_match(binding->ctxt, ctxt))
823 { 826 {
diff --git a/src/bin/e_bindings.h b/src/bin/e_bindings.h
index 8026061d4..668698bbe 100644
--- a/src/bin/e_bindings.h
+++ b/src/bin/e_bindings.h
@@ -63,12 +63,13 @@ struct _E_Binding_Edge
63 E_Binding_Context ctxt; 63 E_Binding_Context ctxt;
64 E_Zone_Edge edge; 64 E_Zone_Edge edge;
65 E_Binding_Modifier mod; 65 E_Binding_Modifier mod;
66 unsigned char any_mod : 1;
67 const char *action; 66 const char *action;
68 const char *params; 67 const char *params;
69 68
70 float delay; 69 float delay;
71 Ecore_Timer *timer; 70 Ecore_Timer *timer;
71 Eina_Bool any_mod : 1;
72 Eina_Bool drag_only : 1;
72}; 73};
73 74
74struct _E_Binding_Signal 75struct _E_Binding_Signal
@@ -130,11 +131,11 @@ EAPI E_Action *e_bindings_key_up_event_handle(E_Binding_Context ctxt, E_Object
130EAPI E_Action *e_bindings_key_down_event_find(E_Binding_Context ctxt, Ecore_Event_Key *ev); 131EAPI E_Action *e_bindings_key_down_event_find(E_Binding_Context ctxt, Ecore_Event_Key *ev);
131EAPI E_Action *e_bindings_key_up_event_find(E_Binding_Context ctxt, Ecore_Event_Key *ev); 132EAPI E_Action *e_bindings_key_up_event_find(E_Binding_Context ctxt, Ecore_Event_Key *ev);
132 133
133EAPI void e_bindings_edge_add(E_Binding_Context ctxt, E_Zone_Edge edge, E_Binding_Modifier mod, int any_mod, const char *action, const char *params, float delay); 134EAPI void e_bindings_edge_add(E_Binding_Context ctxt, E_Zone_Edge edge, Eina_Bool drag_only, E_Binding_Modifier mod, int any_mod, const char *action, const char *params, float delay);
134EAPI Eina_Bool e_bindings_edge_flippable_get(E_Zone_Edge edge); 135EAPI Eina_Bool e_bindings_edge_flippable_get(E_Zone_Edge edge);
135EAPI Eina_Bool e_bindings_edge_non_flippable_get(E_Zone_Edge edge); 136EAPI Eina_Bool e_bindings_edge_non_flippable_get(E_Zone_Edge edge);
136EAPI E_Binding_Edge *e_bindings_edge_get(const char *action, E_Zone_Edge edge, int click); 137EAPI E_Binding_Edge *e_bindings_edge_get(const char *action, E_Zone_Edge edge, int click);
137EAPI void e_bindings_edge_del(E_Binding_Context ctxt, E_Zone_Edge edge, E_Binding_Modifier mod, int any_mod, const char *action, const char *params, float delay); 138EAPI void e_bindings_edge_del(E_Binding_Context ctxt, E_Zone_Edge edge, Eina_Bool drag_only, E_Binding_Modifier mod, int any_mod, const char *action, const char *params, float delay);
138EAPI E_Action *e_bindings_edge_in_event_handle(E_Binding_Context ctxt, E_Object *obj, E_Event_Zone_Edge *ev); 139EAPI E_Action *e_bindings_edge_in_event_handle(E_Binding_Context ctxt, E_Object *obj, E_Event_Zone_Edge *ev);
139EAPI E_Action *e_bindings_edge_out_event_handle(E_Binding_Context ctxt, E_Object *obj, E_Event_Zone_Edge *ev); 140EAPI E_Action *e_bindings_edge_out_event_handle(E_Binding_Context ctxt, E_Object *obj, E_Event_Zone_Edge *ev);
140EAPI E_Action *e_bindings_edge_down_event_handle(E_Binding_Context ctxt, E_Object *obj, E_Event_Zone_Edge *ev); 141EAPI E_Action *e_bindings_edge_down_event_handle(E_Binding_Context ctxt, E_Object *obj, E_Event_Zone_Edge *ev);
diff --git a/src/bin/e_canvas.c b/src/bin/e_canvas.c
index 24762aaf6..636aa8cb0 100644
--- a/src/bin/e_canvas.c
+++ b/src/bin/e_canvas.c
@@ -160,6 +160,12 @@ e_canvas_new(Ecore_X_Window win, int x, int y, int w, int h,
160 return ee; 160 return ee;
161} 161}
162 162
163EAPI const Eina_List *
164e_canvas_list(void)
165{
166 return _e_canvases;
167}
168
163/* local subsystem functions */ 169/* local subsystem functions */
164static Eina_Bool 170static Eina_Bool
165_e_canvas_cb_flush(void *data __UNUSED__) 171_e_canvas_cb_flush(void *data __UNUSED__)
diff --git a/src/bin/e_canvas.h b/src/bin/e_canvas.h
index 6529d8bf7..59050c23b 100644
--- a/src/bin/e_canvas.h
+++ b/src/bin/e_canvas.h
@@ -12,5 +12,6 @@ EAPI void e_canvas_idle_flush(void);
12EAPI void e_canvas_rehint(void); 12EAPI void e_canvas_rehint(void);
13EAPI Ecore_Evas *e_canvas_new(Ecore_X_Window win, int x, int y, int w, int h, int direct_resize, int override, Ecore_X_Window *win_ret); 13EAPI Ecore_Evas *e_canvas_new(Ecore_X_Window win, int x, int y, int w, int h, int direct_resize, int override, Ecore_X_Window *win_ret);
14 14
15EAPI const Eina_List *e_canvas_list(void);
15#endif 16#endif
16#endif 17#endif
diff --git a/src/bin/e_config.c b/src/bin/e_config.c
index 4545bfb6d..16017a8c8 100644
--- a/src/bin/e_config.c
+++ b/src/bin/e_config.c
@@ -968,6 +968,7 @@ e_config_init(void)
968 E_CONFIG_VAL(D, T, params, STR); 968 E_CONFIG_VAL(D, T, params, STR);
969 E_CONFIG_VAL(D, T, edge, UCHAR); 969 E_CONFIG_VAL(D, T, edge, UCHAR);
970 E_CONFIG_VAL(D, T, any_mod, UCHAR); 970 E_CONFIG_VAL(D, T, any_mod, UCHAR);
971 E_CONFIG_VAL(D, T, drag_only, UCHAR);
971 E_CONFIG_VAL(D, T, delay, FLOAT); 972 E_CONFIG_VAL(D, T, delay, FLOAT);
972 973
973 _e_config_bindings_signal_edd = E_CONFIG_DD_NEW("E_Config_Binding_Signal", 974 _e_config_bindings_signal_edd = E_CONFIG_DD_NEW("E_Config_Binding_Signal",
@@ -1886,6 +1887,7 @@ e_config_binding_edge_match(E_Config_Binding_Edge *eb_in)
1886 (eb->any_mod == eb_in->any_mod) && 1887 (eb->any_mod == eb_in->any_mod) &&
1887 (eb->edge == eb_in->edge) && 1888 (eb->edge == eb_in->edge) &&
1888 (eb->delay == eb_in->delay) && 1889 (eb->delay == eb_in->delay) &&
1890 (eb->drag_only == eb_in->drag_only) &&
1889 (((eb->action) && (eb_in->action) && (!strcmp(eb->action, eb_in->action))) || 1891 (((eb->action) && (eb_in->action) && (!strcmp(eb->action, eb_in->action))) ||
1890 ((!eb->action) && (!eb_in->action))) && 1892 ((!eb->action) && (!eb_in->action))) &&
1891 (((eb->params) && (eb_in->params) && (!strcmp(eb->params, eb_in->params))) || 1893 (((eb->params) && (eb_in->params) && (!strcmp(eb->params, eb_in->params))) ||
diff --git a/src/bin/e_config.h b/src/bin/e_config.h
index 7afaeb37b..db44a4c58 100644
--- a/src/bin/e_config.h
+++ b/src/bin/e_config.h
@@ -505,6 +505,7 @@ struct _E_Config_Binding_Edge
505 const char *params; 505 const char *params;
506 unsigned char edge; 506 unsigned char edge;
507 unsigned char any_mod; 507 unsigned char any_mod;
508 Eina_Bool drag_only;
508}; 509};
509 510
510struct _E_Config_Binding_Signal 511struct _E_Config_Binding_Signal
diff --git a/src/bin/e_shelf.c b/src/bin/e_shelf.c
index fd772c688..dc979a767 100644
--- a/src/bin/e_shelf.c
+++ b/src/bin/e_shelf.c
@@ -2647,62 +2647,62 @@ _e_shelf_bindings_add(E_Shelf *es)
2647 2647
2648 case E_GADCON_ORIENT_LEFT: 2648 case E_GADCON_ORIENT_LEFT:
2649 e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_LEFT, 2649 e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_LEFT,
2650 E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0); 2650 0, E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0);
2651 break; 2651 break;
2652 2652
2653 case E_GADCON_ORIENT_RIGHT: 2653 case E_GADCON_ORIENT_RIGHT:
2654 e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_RIGHT, 2654 e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_RIGHT,
2655 E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0); 2655 0, E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0);
2656 break; 2656 break;
2657 2657
2658 case E_GADCON_ORIENT_TOP: 2658 case E_GADCON_ORIENT_TOP:
2659 e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_TOP, 2659 e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_TOP,
2660 E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0); 2660 0, E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0);
2661 break; 2661 break;
2662 2662
2663 case E_GADCON_ORIENT_BOTTOM: 2663 case E_GADCON_ORIENT_BOTTOM:
2664 e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_BOTTOM, 2664 e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_BOTTOM,
2665 E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0); 2665 0, E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0);
2666 break; 2666 break;
2667 2667
2668 case E_GADCON_ORIENT_CORNER_TL: 2668 case E_GADCON_ORIENT_CORNER_TL:
2669 case E_GADCON_ORIENT_CORNER_LT: 2669 case E_GADCON_ORIENT_CORNER_LT:
2670 e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_TOP, 2670 e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_TOP,
2671 E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0); 2671 0, E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0);
2672 e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_LEFT, 2672 e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_LEFT,
2673 E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0); 2673 0, E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0);
2674 e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_TOP_LEFT, 2674 e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_TOP_LEFT,
2675 E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0); 2675 0, E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0);
2676 break; 2676 break;
2677 2677
2678 case E_GADCON_ORIENT_CORNER_TR: 2678 case E_GADCON_ORIENT_CORNER_TR:
2679 case E_GADCON_ORIENT_CORNER_RT: 2679 case E_GADCON_ORIENT_CORNER_RT:
2680 e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_TOP, 2680 e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_TOP,
2681 E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0); 2681 0, E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0);
2682 e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_RIGHT, 2682 e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_RIGHT,
2683 E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0); 2683 0, E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0);
2684 e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_TOP_RIGHT, 2684 e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_TOP_RIGHT,
2685 E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0); 2685 0, E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0);
2686 break; 2686 break;
2687 2687
2688 case E_GADCON_ORIENT_CORNER_BL: 2688 case E_GADCON_ORIENT_CORNER_BL:
2689 case E_GADCON_ORIENT_CORNER_LB: 2689 case E_GADCON_ORIENT_CORNER_LB:
2690 e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_BOTTOM, 2690 e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_BOTTOM,
2691 E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0); 2691 0, E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0);
2692 e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_LEFT, 2692 e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_LEFT,
2693 E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0); 2693 0, E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0);
2694 e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_BOTTOM_LEFT, 2694 e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_BOTTOM_LEFT,
2695 E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0); 2695 0, E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0);
2696 break; 2696 break;
2697 2697
2698 case E_GADCON_ORIENT_CORNER_BR: 2698 case E_GADCON_ORIENT_CORNER_BR:
2699 case E_GADCON_ORIENT_CORNER_RB: 2699 case E_GADCON_ORIENT_CORNER_RB:
2700 e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_BOTTOM, 2700 e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_BOTTOM,
2701 E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0); 2701 0, E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0);
2702 e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_RIGHT, 2702 e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_RIGHT,
2703 E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0); 2703 0, E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0);
2704 e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_BOTTOM_RIGHT, 2704 e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_BOTTOM_RIGHT,
2705 E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0); 2705 0, E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0);
2706 break; 2706 break;
2707 } 2707 }
2708} 2708}
@@ -2716,7 +2716,7 @@ _e_shelf_bindings_del(E_Shelf *es)
2716 snprintf(buf, sizeof(buf), "shelf.%d", es->id); 2716 snprintf(buf, sizeof(buf), "shelf.%d", es->id);
2717 for (edge = E_ZONE_EDGE_LEFT; edge <= E_ZONE_EDGE_BOTTOM_LEFT; edge++) 2717 for (edge = E_ZONE_EDGE_LEFT; edge <= E_ZONE_EDGE_BOTTOM_LEFT; edge++)
2718 e_bindings_edge_del(E_BINDING_CONTEXT_ZONE, edge, 2718 e_bindings_edge_del(E_BINDING_CONTEXT_ZONE, edge,
2719 E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0); 2719 0, E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0);
2720} 2720}
2721 2721
2722static Eina_Bool 2722static Eina_Bool
diff --git a/src/bin/e_zone.c b/src/bin/e_zone.c
index 946e3172a..dc70e2abb 100644
--- a/src/bin/e_zone.c
+++ b/src/bin/e_zone.c
@@ -1547,6 +1547,8 @@ _e_zone_cb_mouse_in(void *data,
1547 E_Event_Zone_Edge *zev; 1547 E_Event_Zone_Edge *zev;
1548 E_Zone_Edge edge; 1548 E_Zone_Edge edge;
1549 E_Zone *zone; 1549 E_Zone *zone;
1550 const Eina_List *l;
1551 Ecore_Evas *ee;
1550 1552
1551 ev = event; 1553 ev = event;
1552 zone = data; 1554 zone = data;
@@ -1560,6 +1562,14 @@ _e_zone_cb_mouse_in(void *data,
1560 zev->x = ev->root.x; 1562 zev->x = ev->root.x;
1561 zev->y = ev->root.y; 1563 zev->y = ev->root.y;
1562 zev->modifiers = ev->modifiers; 1564 zev->modifiers = ev->modifiers;
1565 EINA_LIST_FOREACH(e_canvas_list(), l, ee)
1566 {
1567 /* FIXME: comp */
1568 if (!evas_pointer_button_down_mask_get(ecore_evas_get(ee))) continue;
1569 zev->drag = 1;
1570 break;
1571 }
1572
1563 ecore_event_add(E_EVENT_ZONE_EDGE_IN, zev, NULL, NULL); 1573 ecore_event_add(E_EVENT_ZONE_EDGE_IN, zev, NULL, NULL);
1564 e_bindings_edge_in_event_handle(E_BINDING_CONTEXT_ZONE, E_OBJECT(zone), zev); 1574 e_bindings_edge_in_event_handle(E_BINDING_CONTEXT_ZONE, E_OBJECT(zone), zev);
1565 1575
@@ -1575,6 +1585,8 @@ _e_zone_cb_mouse_out(void *data,
1575 E_Event_Zone_Edge *zev; 1585 E_Event_Zone_Edge *zev;
1576 E_Zone_Edge edge; 1586 E_Zone_Edge edge;
1577 E_Zone *zone; 1587 E_Zone *zone;
1588 const Eina_List *l;
1589 Ecore_Evas *ee;
1578 1590
1579 ev = event; 1591 ev = event;
1580 zone = data; 1592 zone = data;
@@ -1588,6 +1600,14 @@ _e_zone_cb_mouse_out(void *data,
1588 zev->x = ev->root.x; 1600 zev->x = ev->root.x;
1589 zev->y = ev->root.y; 1601 zev->y = ev->root.y;
1590 zev->modifiers = ev->modifiers; 1602 zev->modifiers = ev->modifiers;
1603 EINA_LIST_FOREACH(e_canvas_list(), l, ee)
1604 {
1605 /* FIXME: comp */
1606 if (!evas_pointer_button_down_mask_get(ecore_evas_get(ee))) continue;
1607 zev->drag = 1;
1608 break;
1609 }
1610
1591 ecore_event_add(E_EVENT_ZONE_EDGE_OUT, zev, NULL, NULL); 1611 ecore_event_add(E_EVENT_ZONE_EDGE_OUT, zev, NULL, NULL);
1592 e_bindings_edge_out_event_handle(E_BINDING_CONTEXT_ZONE, E_OBJECT(zone), zev); 1612 e_bindings_edge_out_event_handle(E_BINDING_CONTEXT_ZONE, E_OBJECT(zone), zev);
1593 return ECORE_CALLBACK_PASS_ON; 1613 return ECORE_CALLBACK_PASS_ON;
diff --git a/src/bin/e_zone.h b/src/bin/e_zone.h
index e56121e9b..fcc0a5d6a 100644
--- a/src/bin/e_zone.h
+++ b/src/bin/e_zone.h
@@ -127,6 +127,7 @@ struct _E_Event_Zone_Edge
127 int x, y; 127 int x, y;
128 int modifiers; 128 int modifiers;
129 int button; 129 int button;
130 Eina_Bool drag : 1;
130}; 131};
131 132
132EINTERN int e_zone_init(void); 133EINTERN int e_zone_init(void);
diff --git a/src/modules/conf_edgebindings/e_int_config_edgebindings.c b/src/modules/conf_edgebindings/e_int_config_edgebindings.c
index 587fe684a..97f9af7e9 100644
--- a/src/modules/conf_edgebindings/e_int_config_edgebindings.c
+++ b/src/modules/conf_edgebindings/e_int_config_edgebindings.c
@@ -65,6 +65,7 @@ struct _E_Config_Dialog_Data
65 const char *cur; 65 const char *cur;
66 double delay; 66 double delay;
67 int click; 67 int click;
68 int drag_only;
68 int button; 69 int button;
69 int cur_act, add; 70 int cur_act, add;
70 E_Zone_Edge edge; 71 E_Zone_Edge edge;
@@ -76,7 +77,7 @@ struct _E_Config_Dialog_Data
76 { 77 {
77 Evas_Object *o_add, *o_mod, *o_del, *o_del_all; 78 Evas_Object *o_add, *o_mod, *o_del, *o_del_all;
78 Evas_Object *o_binding_list, *o_action_list; 79 Evas_Object *o_binding_list, *o_action_list;
79 Evas_Object *o_params, *o_selector, *o_slider, *o_check, *o_button; 80 Evas_Object *o_params, *o_selector, *o_slider, *o_check, *o_check2, *o_button;
80 } gui; 81 } gui;
81 82
82 const char *params; 83 const char *params;
@@ -139,6 +140,7 @@ _fill_data(E_Config_Dialog_Data *cfdata)
139 bi2->modifiers = bi->modifiers; 140 bi2->modifiers = bi->modifiers;
140 bi2->any_mod = bi->any_mod; 141 bi2->any_mod = bi->any_mod;
141 bi2->delay = bi->delay; 142 bi2->delay = bi->delay;
143 bi2->drag_only = bi->drag_only;
142 bi2->action = eina_stringshare_ref(bi->action); 144 bi2->action = eina_stringshare_ref(bi->action);
143 bi2->params = eina_stringshare_ref(bi->params); 145 bi2->params = eina_stringshare_ref(bi->params);
144 146
@@ -196,7 +198,7 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
196 198
197 EINA_LIST_FREE(e_bindings->edge_bindings, bi) 199 EINA_LIST_FREE(e_bindings->edge_bindings, bi)
198 { 200 {
199 e_bindings_edge_del(bi->context, bi->edge, bi->modifiers, bi->any_mod, 201 e_bindings_edge_del(bi->context, bi->edge, bi->drag_only, bi->modifiers, bi->any_mod,
200 bi->action, bi->params, bi->delay); 202 bi->action, bi->params, bi->delay);
201 eina_stringshare_del(bi->action); 203 eina_stringshare_del(bi->action);
202 eina_stringshare_del(bi->params); 204 eina_stringshare_del(bi->params);
@@ -212,13 +214,14 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
212 bi->modifiers = bi2->modifiers; 214 bi->modifiers = bi2->modifiers;
213 bi->any_mod = bi2->any_mod; 215 bi->any_mod = bi2->any_mod;
214 bi->delay = bi2->delay; 216 bi->delay = bi2->delay;
217 bi->drag_only = bi2->drag_only;
215 bi->action = 218 bi->action =
216 ((!bi2->action) || (!bi2->action[0])) ? NULL : eina_stringshare_add(bi2->action); 219 ((!bi2->action) || (!bi2->action[0])) ? NULL : eina_stringshare_add(bi2->action);
217 bi->params = 220 bi->params =
218 ((!bi2->params) || (!bi2->params[0])) ? NULL : eina_stringshare_add(bi2->params); 221 ((!bi2->params) || (!bi2->params[0])) ? NULL : eina_stringshare_add(bi2->params);
219 222
220 e_bindings->edge_bindings = eina_list_append(e_bindings->edge_bindings, bi); 223 e_bindings->edge_bindings = eina_list_append(e_bindings->edge_bindings, bi);
221 e_bindings_edge_add(bi->context, bi->edge, bi->modifiers, bi->any_mod, 224 e_bindings_edge_add(bi->context, bi->edge, bi->drag_only, bi->modifiers, bi->any_mod,
222 bi->action, bi->params, bi->delay); 225 bi->action, bi->params, bi->delay);
223 } 226 }
224 227
@@ -389,6 +392,7 @@ _modify_edge_binding_cb(void *data, void *data2 __UNUSED__)
389 392
390 bi = eina_list_nth(cfdata->binding.edge, n); 393 bi = eina_list_nth(cfdata->binding.edge, n);
391 cfdata->locals.edge = bi->edge; 394 cfdata->locals.edge = bi->edge;
395 cfdata->locals.drag_only = bi->drag_only;
392 cfdata->locals.delay = ((double)bi->delay); 396 cfdata->locals.delay = ((double)bi->delay);
393 if (bi->delay <= -1.0) cfdata->locals.click = 1, cfdata->locals.button = -bi->delay; 397 if (bi->delay <= -1.0) cfdata->locals.click = 1, cfdata->locals.button = -bi->delay;
394 else cfdata->locals.click = 0, cfdata->locals.button = 0; 398 else cfdata->locals.click = 0, cfdata->locals.button = 0;
@@ -879,11 +883,23 @@ _edge_grab_wnd_show(E_Config_Dialog_Data *cfdata)
879 883
880 cfdata->gui.o_check = os = e_widget_check_add(evas, _("Clickable edge"), &(cfdata->locals.click)); 884 cfdata->gui.o_check = os = e_widget_check_add(evas, _("Clickable edge"), &(cfdata->locals.click));
881 e_widget_size_min_resize(os); 885 e_widget_size_min_resize(os);
882 edje_object_part_swallow(o, "e.swallow.check", os);
883 e_widget_on_change_hook_set(os, _edge_grab_wnd_check_changed_cb, cfdata); 886 e_widget_on_change_hook_set(os, _edge_grab_wnd_check_changed_cb, cfdata);
887 edje_object_part_box_append(o, "e.box", os);
884 evas_object_show(os); 888 evas_object_show(os);
885 if (cfdata->locals.click) 889 e_widget_size_min_get(os, &minw, &minh);
886 e_widget_disabled_set(cfdata->gui.o_slider, 1); 890 edje_extern_object_min_size_set(os, minw, minh);
891
892 cfdata->gui.o_check2 = os = e_widget_check_add(evas, _("Drag only"), &(cfdata->locals.drag_only));
893 e_widget_size_min_resize(os);
894 e_widget_on_change_hook_set(os, _edge_grab_wnd_check_changed_cb, cfdata);
895 edje_object_part_box_append(o, "e.box", os);
896 evas_object_show(os);
897 e_widget_size_min_get(os, &minw, &minh);
898 edje_extern_object_min_size_set(os, minw, minh);
899
900 e_widget_disabled_set(cfdata->gui.o_slider, cfdata->locals.click);
901 e_widget_disabled_set(cfdata->gui.o_check2, cfdata->locals.click);
902 e_widget_disabled_set(cfdata->gui.o_check, cfdata->locals.drag_only);
887 903
888 edje_object_part_text_set(o, "e.text.description", TEXT_PRESS_EDGE_SEQUENCE); 904 edje_object_part_text_set(o, "e.text.description", TEXT_PRESS_EDGE_SEQUENCE);
889 905
@@ -971,7 +987,6 @@ _edge_grab_wnd_check_changed_cb(void *data, Evas_Object *obj __UNUSED__)
971 { 987 {
972 if (cfdata->locals.edge && cfdata->locals.button) 988 if (cfdata->locals.edge && cfdata->locals.button)
973 label = _edge_binding_text_get(cfdata->locals.edge, -1.0 * cfdata->locals.button, cfdata->locals.modifiers); 989 label = _edge_binding_text_get(cfdata->locals.edge, -1.0 * cfdata->locals.button, cfdata->locals.modifiers);
974 e_widget_disabled_set(cfdata->gui.o_slider, 1);
975 } 990 }
976 else 991 else
977 { 992 {
@@ -979,6 +994,9 @@ _edge_grab_wnd_check_changed_cb(void *data, Evas_Object *obj __UNUSED__)
979 label = _edge_binding_text_get(cfdata->locals.edge, ((float)cfdata->locals.delay), cfdata->locals.modifiers); 994 label = _edge_binding_text_get(cfdata->locals.edge, ((float)cfdata->locals.delay), cfdata->locals.modifiers);
980 e_widget_disabled_set(cfdata->gui.o_slider, 0); 995 e_widget_disabled_set(cfdata->gui.o_slider, 0);
981 } 996 }
997 e_widget_disabled_set(cfdata->gui.o_slider, cfdata->locals.click);
998 e_widget_disabled_set(cfdata->gui.o_check2, cfdata->locals.click);
999 e_widget_disabled_set(cfdata->gui.o_check, cfdata->locals.drag_only);
982 1000
983 edje_object_part_text_set(cfdata->gui.o_selector, "e.text.selection", label); 1001 edje_object_part_text_set(cfdata->gui.o_selector, "e.text.selection", label);
984 E_FREE(label); 1002 E_FREE(label);
@@ -1083,6 +1101,7 @@ _edge_grab_wnd_selection_apply(E_Config_Dialog_Data *cfdata)
1083 EINA_LIST_FOREACH(cfdata->binding.edge, l, bi) 1101 EINA_LIST_FOREACH(cfdata->binding.edge, l, bi)
1084 if ((bi->modifiers == cfdata->locals.modifiers) && 1102 if ((bi->modifiers == cfdata->locals.modifiers) &&
1085 (bi->edge == cfdata->locals.edge) && 1103 (bi->edge == cfdata->locals.edge) &&
1104 (bi->drag_only == cfdata->locals.drag_only) &&
1086 ((bi->delay * 1000) == (cfdata->locals.delay * 1000))) 1105 ((bi->delay * 1000) == (cfdata->locals.delay * 1000)))
1087 { 1106 {
1088 found = 1; 1107 found = 1;
@@ -1100,6 +1119,7 @@ _edge_grab_wnd_selection_apply(E_Config_Dialog_Data *cfdata)
1100 if (bi == bi2) continue; 1119 if (bi == bi2) continue;
1101 if ((bi->modifiers == cfdata->locals.modifiers) && 1120 if ((bi->modifiers == cfdata->locals.modifiers) &&
1102 (bi->edge == cfdata->locals.edge) && 1121 (bi->edge == cfdata->locals.edge) &&
1122 (bi->drag_only == cfdata->locals.drag_only) &&
1103 ((bi->delay * 1000) == (cfdata->locals.delay * 1000))) 1123 ((bi->delay * 1000) == (cfdata->locals.delay * 1000)))
1104 { 1124 {
1105 found = 1; 1125 found = 1;
@@ -1121,6 +1141,7 @@ _edge_grab_wnd_selection_apply(E_Config_Dialog_Data *cfdata)
1121 bi->action = NULL; 1141 bi->action = NULL;
1122 bi->params = NULL; 1142 bi->params = NULL;
1123 bi->modifiers = cfdata->locals.modifiers; 1143 bi->modifiers = cfdata->locals.modifiers;
1144 bi->drag_only = cfdata->locals.drag_only;
1124 cfdata->binding.edge = eina_list_append(cfdata->binding.edge, bi); 1145 cfdata->binding.edge = eina_list_append(cfdata->binding.edge, bi);
1125 } 1146 }
1126 else 1147 else
@@ -1133,6 +1154,7 @@ _edge_grab_wnd_selection_apply(E_Config_Dialog_Data *cfdata)
1133 bi->modifiers = cfdata->locals.modifiers; 1154 bi->modifiers = cfdata->locals.modifiers;
1134 bi->delay = cfdata->locals.delay; 1155 bi->delay = cfdata->locals.delay;
1135 bi->edge = cfdata->locals.edge; 1156 bi->edge = cfdata->locals.edge;
1157 bi->drag_only = cfdata->locals.drag_only;
1136 } 1158 }
1137 } 1159 }
1138 1160