forked from enlightenment/efl
some defines, a fix for ecores main loop so if an idle enterer generates
events we dont sit and wait on timers or fd's before processing them. SVN revision: 12145
This commit is contained in:
parent
288842f199
commit
db82afca3b
|
@ -500,80 +500,83 @@ _ecore_main_loop_iterate_internal(int once_only)
|
|||
in_main_loop--;
|
||||
return;
|
||||
}
|
||||
/* init flags */
|
||||
have_event = have_signal = 0;
|
||||
next_time = _ecore_timer_next_get();
|
||||
/* no timers */
|
||||
if (next_time < 0)
|
||||
if (!_ecore_event_exist())
|
||||
{
|
||||
/* no idlers */
|
||||
if (!_ecore_idler_exist())
|
||||
/* init flags */
|
||||
have_event = have_signal = 0;
|
||||
next_time = _ecore_timer_next_get();
|
||||
/* no timers */
|
||||
if (next_time < 0)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = _ecore_main_select(-1);
|
||||
if (ret > 0) have_event = 1;
|
||||
#ifndef WIN32
|
||||
if (_ecore_signal_count_get() > 0) have_signal = 1;
|
||||
#endif
|
||||
}
|
||||
/* idlers */
|
||||
else
|
||||
{
|
||||
for (;;)
|
||||
/* no idlers */
|
||||
if (!_ecore_idler_exist())
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (!_ecore_idler_call()) goto start_loop;
|
||||
if (_ecore_event_exist()) break;
|
||||
ret = _ecore_main_select(0);
|
||||
ret = _ecore_main_select(-1);
|
||||
if (ret > 0) have_event = 1;
|
||||
#ifndef WIN32
|
||||
if (_ecore_signal_count_get() > 0) have_signal = 1;
|
||||
#endif
|
||||
if (have_event || have_signal) break;
|
||||
next_time = _ecore_timer_next_get();
|
||||
if (next_time >= 0) goto start_loop;
|
||||
if (do_quit) break;
|
||||
}
|
||||
/* idlers */
|
||||
else
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (!_ecore_idler_call()) goto start_loop;
|
||||
if (_ecore_event_exist()) break;
|
||||
ret = _ecore_main_select(0);
|
||||
if (ret > 0) have_event = 1;
|
||||
#ifndef WIN32
|
||||
if (_ecore_signal_count_get() > 0) have_signal = 1;
|
||||
#endif
|
||||
if (have_event || have_signal) break;
|
||||
next_time = _ecore_timer_next_get();
|
||||
if (next_time >= 0) goto start_loop;
|
||||
if (do_quit) break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/* timers */
|
||||
else
|
||||
{
|
||||
/* no idlers */
|
||||
if (!_ecore_idler_exist())
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = _ecore_main_select(next_time);
|
||||
if (ret > 0) have_event = 1;
|
||||
#ifndef WIN32
|
||||
if (_ecore_signal_count_get() > 0) have_signal = 1;
|
||||
#endif
|
||||
}
|
||||
/* idlers */
|
||||
/* timers */
|
||||
else
|
||||
{
|
||||
for (;;)
|
||||
/* no idlers */
|
||||
if (!_ecore_idler_exist())
|
||||
{
|
||||
double cur_time, t;
|
||||
int ret;
|
||||
|
||||
if (!_ecore_idler_call()) goto start_loop;
|
||||
if (_ecore_event_exist()) break;
|
||||
ret = _ecore_main_select(0);
|
||||
ret = _ecore_main_select(next_time);
|
||||
if (ret > 0) have_event = 1;
|
||||
#ifndef WIN32
|
||||
if (_ecore_signal_count_get() > 0) have_signal = 1;
|
||||
#endif
|
||||
if ((have_event) || (have_signal)) break;
|
||||
cur_time = ecore_time_get();
|
||||
t = ecore_time_get() - cur_time;
|
||||
if (t >= next_time) break;
|
||||
next_time = _ecore_timer_next_get();
|
||||
if (next_time < 0) goto start_loop;
|
||||
if (do_quit) break;
|
||||
}
|
||||
/* idlers */
|
||||
else
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
double cur_time, t;
|
||||
int ret;
|
||||
|
||||
if (!_ecore_idler_call()) goto start_loop;
|
||||
if (_ecore_event_exist()) break;
|
||||
ret = _ecore_main_select(0);
|
||||
if (ret > 0) have_event = 1;
|
||||
#ifndef WIN32
|
||||
if (_ecore_signal_count_get() > 0) have_signal = 1;
|
||||
#endif
|
||||
if ((have_event) || (have_signal)) break;
|
||||
cur_time = ecore_time_get();
|
||||
t = ecore_time_get() - cur_time;
|
||||
if (t >= next_time) break;
|
||||
next_time = _ecore_timer_next_get();
|
||||
if (next_time < 0) goto start_loop;
|
||||
if (do_quit) break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -716,6 +716,14 @@ typedef enum _Ecore_X_Window_Configure_Mask {
|
|||
ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE = (1 << 6)
|
||||
} Ecore_X_Window_Configure_Mask;
|
||||
|
||||
typedef enum _Ecore_X_Window_Stack_Mode {
|
||||
ECORE_X_WINDOW_STACK_ABOVE = 0,
|
||||
ECORE_X_WINDOW_STACK_BELOW = 1,
|
||||
ECORE_X_WINDOW_STACK_TOP_IF = 2,
|
||||
ECORE_X_WINDOW_STACK_BOTTOM_IF = 3,
|
||||
ECORE_X_WINDOW_STACK_OPPOSITE = 4
|
||||
} Ecore_X_Window_Stack_Mode;
|
||||
|
||||
/* Window layer constants */
|
||||
#define ECORE_X_WINDOW_LAYER_BELOW 2
|
||||
#define ECORE_X_WINDOW_LAYER_NORMAL 4
|
||||
|
|
|
@ -325,13 +325,12 @@ ecore_x_icccm_size_pos_hints_get(Ecore_X_Window win,
|
|||
}
|
||||
|
||||
/* FIXME: move these things in here as they are icccm related */
|
||||
/* get/set min.max etc. size */
|
||||
/* get/set wm protocols */
|
||||
/* get/set title */
|
||||
/* get/set name/class */
|
||||
/* get/set machine */
|
||||
/* get/set command */
|
||||
/* get/set icon name */
|
||||
/* get/set wm protocols */
|
||||
/* get/set colormap windows */
|
||||
/* get/set window role */
|
||||
/* get/set client leader */
|
||||
|
|
Loading…
Reference in New Issue