Add resize pointer for all mouse,down resize signals.
authorsebastid <sebastid>
Tue, 11 Oct 2005 05:51:03 +0000 (05:51 +0000)
committersebastid <sebastid@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 11 Oct 2005 05:51:03 +0000 (05:51 +0000)
Just pop one element from the stack if type is given.

SVN revision: 17429

src/bin/e_bindings.c
src/bin/e_pointer.c

index 5b2f7df..4f5f588 100644 (file)
@@ -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)
index 7969ac0..630fcf3 100644 (file)
@@ -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);