Call ecore_event_handler_add() in EventHandler's constructor.
[ruby-ecore.git] / src / ecore / rb_event_handler.c
index 63c501632750095f17510e3169e6d1e65f450418..1edc71d4fdd3da45712a751659fd817cfc4959c3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: rb_event_handler.c 77 2004-08-19 17:39:29Z tilman $
+ * $Id: rb_event_handler.c 107 2004-08-29 18:37:58Z tilman $
  *
  * Copyright (C) 2004 ruby-ecore team (see AUTHORS)
  *
@@ -47,6 +47,8 @@ static VALUE c_init (VALUE self, VALUE type)
 
        rb_ary_push (handlers, self);
 
+       ecore_event_handler_add (t, on_ecore_event, NULL);
+
        return self;
 }
 
@@ -108,7 +110,8 @@ int on_ecore_event (void *data, int type, void *event)
        if (type == ECORE_EVENT_SIGNAL_EXIT && !called)
                ecore_main_loop_quit ();
 
-       return 0;
+       /* call other event handlers, too */
+       return 1;
 }
 
 VALUE c_ev_generic_init (VALUE self, VALUE event)