fixed some bugs in the ecore mainloop integration

This commit is contained in:
Andreas Volz 2011-01-14 20:32:16 +01:00
parent b23f1b2eab
commit 9e25833870
3 changed files with 13 additions and 25 deletions

View file

@ -14,13 +14,6 @@ AC_SUBST(PACKAGE_VERSION)
# Set configuration options
AC_ARG_ENABLE(debug,
AS_HELP_STRING([--enable-debug],
[enable debugging support]),
[enable_debug=$enableval],
[enable_debug=no]
)
AC_ARG_ENABLE(ecore,
AS_HELP_STRING([--enable-ecore],
[enable ecore integration]),
@ -65,7 +58,7 @@ if test -n "$vtest"; then
AC_MSG_RESULT(yes)
AC_DEFINE(GCC_HASCLASSVISIBILITY, 1, [to enable hidden symbols])
CXXFLAGS="-fvisibility=hidden"
CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
else
AC_MSG_RESULT(no)
fi

View file

@ -79,7 +79,6 @@ private:
private:
Ecore_Fd_Handler *fd_handler_read;
Ecore_Fd_Handler *fd_handler_error;
friend class BusDispatcher;
};

View file

@ -100,9 +100,12 @@ static bool watch_dispatch( void *data )
}
Ecore::BusWatch::BusWatch( Watch::Internal* wi)
: Watch(wi)
: Watch(wi), fd_handler_read (NULL)
{
if (Watch::enabled())
{
_enable();
}
}
Ecore::BusWatch::~BusWatch()
@ -133,7 +136,7 @@ Eina_Bool Ecore::BusWatch::watch_handler_read( void *data, Ecore_Fd_Handler *fdh
return 1;
}
Eina_Bool Ecore::BusWatch::watch_handler_error( void *data, Ecore_Fd_Handler *fdh )
/*Eina_Bool Ecore::BusWatch::watch_handler_error( void *data, Ecore_Fd_Handler *fdh )
{
//Ecore::BusWatch* w = reinterpret_cast<Ecore::BusWatch*>(data);
@ -144,14 +147,12 @@ Eina_Bool Ecore::BusWatch::watch_handler_error( void *data, Ecore_Fd_Handler *fd
watch_dispatch(NULL);
return 1;
}
}*/
void Ecore::BusWatch::_enable()
{
debug_log("Ecore::BusWatch::_enable()");
//int flags = Watch::flags();
fd_handler_read = ecore_main_fd_handler_add (Watch::descriptor(),
ECORE_FD_READ,
watch_handler_read,
@ -159,20 +160,15 @@ void Ecore::BusWatch::_enable()
NULL, NULL);
ecore_main_fd_handler_active_set(fd_handler_read, ECORE_FD_READ);
fd_handler_error = ecore_main_fd_handler_add (Watch::descriptor(),
ECORE_FD_ERROR,
watch_handler_error,
this,
NULL, NULL);
ecore_main_fd_handler_active_set(fd_handler_error, ECORE_FD_ERROR);
}
void Ecore::BusWatch::_disable()
{
if (fd_handler_read)
{
ecore_main_fd_handler_del (fd_handler_read);
ecore_main_fd_handler_del (fd_handler_error);
fd_handler_read = NULL;
}
}
void Ecore::BusDispatcher::attach( )