From 65cb576257d425abbbdf559836d299f69472d5e5 Mon Sep 17 00:00:00 2001 From: sebastid Date: Tue, 11 Oct 2005 05:51:03 +0000 Subject: [PATCH] Add resize pointer for all mouse,down resize signals. Just pop one element from the stack if type is given. SVN revision: 17429 --- src/bin/e_bindings.c | 9 +++++---- src/bin/e_pointer.c | 3 +++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/bin/e_bindings.c b/src/bin/e_bindings.c index 5b2f7dfc4..4f5f5880b 100644 --- a/src/bin/e_bindings.c +++ b/src/bin/e_bindings.c @@ -51,17 +51,18 @@ e_bindings_init(void) e_bindings_signal_add(eb->context, eb->signal, eb->source, eb->modifiers, eb->any_mod, eb->action, eb->params); /* FIXME: Can this be solved in a generic way? */ -#if 0 + /* FIXME: Only change cursor if action is allowed! */ if ((!strcmp(eb->action, "window_resize")) && (!strncmp(eb->signal, "mouse,down,", 11)) && (!strncmp(eb->source, "resize_", 7))) { + char params[32]; + snprintf(params, sizeof(params), "resize_%s", eb->params); e_bindings_signal_add(eb->context, "mouse,in", eb->source, eb->modifiers, - eb->any_mod, "pointer_push", eb->params); + eb->any_mod, "pointer_push", params); e_bindings_signal_add(eb->context, "mouse,out", eb->source, eb->modifiers, - eb->any_mod, "pointer_pop", eb->params); + eb->any_mod, "pointer_pop", params); } -#endif } for (l = e_config->wheel_bindings; l; l = l->next) diff --git a/src/bin/e_pointer.c b/src/bin/e_pointer.c index 7969ac012..630fcf312 100644 --- a/src/bin/e_pointer.c +++ b/src/bin/e_pointer.c @@ -228,6 +228,7 @@ e_pointer_type_pop(E_Pointer *p, void *obj, const char *type) ((!type) || (!strcmp(stack->type, type)))) { p->stack = evas_list_remove_list(p->stack, l2); + if (type) break; } } @@ -379,12 +380,14 @@ _e_pointer_type_set(E_Pointer *p, const char *type) if (!cursor) printf("X Cursor for %s is missing\n", type); ecore_x_window_cursor_set(p->win, cursor); } +#if 0 else if (!strcmp(type, "resize")) { cursor = ecore_x_cursor_shape_get(ECORE_X_CURSOR_SIZING); if (!cursor) printf("X Cursor for %s is missing\n", type); ecore_x_window_cursor_set(p->win, cursor); } +#endif else if (!strcmp(type, "resize_tl")) { cursor = ecore_x_cursor_shape_get(ECORE_X_CURSOR_TOP_LEFT_CORNER);