utility to query for fullscreen in current/all zones.
keeping local count of borders is too error prone, instead query it. Right now the count is being done for the current zone only, I guess this is the best policy. SVN revision: 54793
This commit is contained in:
parent
07f4fc0cd3
commit
d374b7ccb8
|
@ -62,14 +62,6 @@ static int _e_desklock_user_idle = 0;
|
||||||
static double _e_desklock_autolock_time = 0.0;
|
static double _e_desklock_autolock_time = 0.0;
|
||||||
static E_Dialog *_e_desklock_ask_presentation_dia = NULL;
|
static E_Dialog *_e_desklock_ask_presentation_dia = NULL;
|
||||||
static int _e_desklock_ask_presentation_count = 0;
|
static int _e_desklock_ask_presentation_count = 0;
|
||||||
static Ecore_Event_Handler *_e_desklock_handler_border_fullscreen = NULL;
|
|
||||||
static Ecore_Event_Handler *_e_desklock_handler_border_unfullscreen = NULL;
|
|
||||||
static Ecore_Event_Handler *_e_desklock_handler_border_remove = NULL;
|
|
||||||
static Ecore_Event_Handler *_e_desklock_handler_border_iconify = NULL;
|
|
||||||
static Ecore_Event_Handler *_e_desklock_handler_border_uniconify = NULL;
|
|
||||||
static Ecore_Event_Handler *_e_desklock_handler_border_desk_set = NULL;
|
|
||||||
static Ecore_Event_Handler *_e_desklock_handler_desk_show = NULL;
|
|
||||||
static int _e_desklock_fullscreen_count = 0;
|
|
||||||
|
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
|
|
||||||
|
@ -96,9 +88,6 @@ static char *_desklock_auth_get_current_host(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void _e_desklock_ask_presentation_mode(void);
|
static void _e_desklock_ask_presentation_mode(void);
|
||||||
static Eina_Bool _e_desklock_handler_border_fullscreen_check_cb(void *data __UNUSED__, int type __UNUSED__, void *event);
|
|
||||||
static Eina_Bool _e_desklock_handler_border_desk_set_cb(void *data __UNUSED__, int type __UNUSED__, void *event);
|
|
||||||
static Eina_Bool _e_desklock_handler_desk_show_cb(void *data __UNUSED__, int type __UNUSED__, void *event);
|
|
||||||
|
|
||||||
EAPI int E_EVENT_DESKLOCK = 0;
|
EAPI int E_EVENT_DESKLOCK = 0;
|
||||||
|
|
||||||
|
@ -109,34 +98,6 @@ e_desklock_init(void)
|
||||||
_e_desklock_idle_poller = ecore_poller_add(ECORE_POLLER_CORE, 256,
|
_e_desklock_idle_poller = ecore_poller_add(ECORE_POLLER_CORE, 256,
|
||||||
_e_desklock_cb_idle_poller, NULL);
|
_e_desklock_cb_idle_poller, NULL);
|
||||||
|
|
||||||
if (!_e_desklock_handler_border_fullscreen)
|
|
||||||
_e_desklock_handler_border_fullscreen = ecore_event_handler_add
|
|
||||||
(E_EVENT_BORDER_FULLSCREEN, _e_desklock_handler_border_fullscreen_check_cb, NULL);
|
|
||||||
|
|
||||||
if (!_e_desklock_handler_border_unfullscreen)
|
|
||||||
_e_desklock_handler_border_unfullscreen = ecore_event_handler_add
|
|
||||||
(E_EVENT_BORDER_UNFULLSCREEN, _e_desklock_handler_border_fullscreen_check_cb, NULL);
|
|
||||||
|
|
||||||
if (!_e_desklock_handler_border_remove)
|
|
||||||
_e_desklock_handler_border_remove = ecore_event_handler_add
|
|
||||||
(E_EVENT_BORDER_REMOVE, _e_desklock_handler_border_fullscreen_check_cb, NULL);
|
|
||||||
|
|
||||||
if (!_e_desklock_handler_border_iconify)
|
|
||||||
_e_desklock_handler_border_iconify = ecore_event_handler_add
|
|
||||||
(E_EVENT_BORDER_ICONIFY, _e_desklock_handler_border_fullscreen_check_cb, NULL);
|
|
||||||
|
|
||||||
if (!_e_desklock_handler_border_uniconify)
|
|
||||||
_e_desklock_handler_border_uniconify = ecore_event_handler_add
|
|
||||||
(E_EVENT_BORDER_UNICONIFY, _e_desklock_handler_border_fullscreen_check_cb, NULL);
|
|
||||||
|
|
||||||
if (!_e_desklock_handler_border_desk_set)
|
|
||||||
_e_desklock_handler_border_desk_set = ecore_event_handler_add
|
|
||||||
(E_EVENT_BORDER_DESK_SET, _e_desklock_handler_border_desk_set_cb, NULL);
|
|
||||||
|
|
||||||
if (!_e_desklock_handler_desk_show)
|
|
||||||
_e_desklock_handler_desk_show = ecore_event_handler_add
|
|
||||||
(E_EVENT_DESK_SHOW, _e_desklock_handler_desk_show_cb, NULL);
|
|
||||||
|
|
||||||
if (e_config->desklock_background)
|
if (e_config->desklock_background)
|
||||||
e_filereg_register(e_config->desklock_background);
|
e_filereg_register(e_config->desklock_background);
|
||||||
|
|
||||||
|
@ -148,48 +109,6 @@ e_desklock_init(void)
|
||||||
EAPI int
|
EAPI int
|
||||||
e_desklock_shutdown(void)
|
e_desklock_shutdown(void)
|
||||||
{
|
{
|
||||||
if (_e_desklock_handler_border_fullscreen)
|
|
||||||
{
|
|
||||||
ecore_event_handler_del(_e_desklock_handler_border_fullscreen);
|
|
||||||
_e_desklock_handler_border_fullscreen = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_e_desklock_handler_border_unfullscreen)
|
|
||||||
{
|
|
||||||
ecore_event_handler_del(_e_desklock_handler_border_unfullscreen);
|
|
||||||
_e_desklock_handler_border_unfullscreen = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_e_desklock_handler_border_remove)
|
|
||||||
{
|
|
||||||
ecore_event_handler_del(_e_desklock_handler_border_remove);
|
|
||||||
_e_desklock_handler_border_remove = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_e_desklock_handler_border_iconify)
|
|
||||||
{
|
|
||||||
ecore_event_handler_del(_e_desklock_handler_border_iconify);
|
|
||||||
_e_desklock_handler_border_iconify = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_e_desklock_handler_border_uniconify)
|
|
||||||
{
|
|
||||||
ecore_event_handler_del(_e_desklock_handler_border_uniconify);
|
|
||||||
_e_desklock_handler_border_uniconify = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_e_desklock_handler_border_desk_set)
|
|
||||||
{
|
|
||||||
ecore_event_handler_del(_e_desklock_handler_border_desk_set);
|
|
||||||
_e_desklock_handler_border_desk_set = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_e_desklock_handler_desk_show)
|
|
||||||
{
|
|
||||||
ecore_event_handler_del(_e_desklock_handler_desk_show);
|
|
||||||
_e_desklock_handler_desk_show = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
e_desklock_hide();
|
e_desklock_hide();
|
||||||
if (e_config->desklock_background)
|
if (e_config->desklock_background)
|
||||||
e_filereg_deregister(e_config->desklock_background);
|
e_filereg_deregister(e_config->desklock_background);
|
||||||
|
@ -215,7 +134,7 @@ _user_wallpaper_get(void)
|
||||||
EAPI int
|
EAPI int
|
||||||
e_desklock_show_autolocked(void)
|
e_desklock_show_autolocked(void)
|
||||||
{
|
{
|
||||||
if (_e_desklock_fullscreen_count > 0) return 0;
|
if (e_util_fullscreen_curreny_any()) return 0;
|
||||||
if (_e_desklock_autolock_time < 1.0)
|
if (_e_desklock_autolock_time < 1.0)
|
||||||
_e_desklock_autolock_time = ecore_loop_time_get();
|
_e_desklock_autolock_time = ecore_loop_time_get();
|
||||||
return e_desklock_show();
|
return e_desklock_show();
|
||||||
|
@ -955,7 +874,7 @@ static Eina_Bool
|
||||||
_e_desklock_cb_idle_poller(void *data __UNUSED__)
|
_e_desklock_cb_idle_poller(void *data __UNUSED__)
|
||||||
{
|
{
|
||||||
if ((e_config->desklock_autolock_idle) && (!e_config->mode.presentation) &&
|
if ((e_config->desklock_autolock_idle) && (!e_config->mode.presentation) &&
|
||||||
(_e_desklock_fullscreen_count <= 0))
|
(!e_util_fullscreen_curreny_any()))
|
||||||
{
|
{
|
||||||
double idle, max;
|
double idle, max;
|
||||||
|
|
||||||
|
@ -1094,33 +1013,3 @@ _e_desklock_ask_presentation_mode(void)
|
||||||
|
|
||||||
_e_desklock_ask_presentation_dia = dia;
|
_e_desklock_ask_presentation_dia = dia;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
|
||||||
_e_desklock_handler_border_fullscreen_check_cb(void *data __UNUSED__, int type __UNUSED__, void *event)
|
|
||||||
{
|
|
||||||
E_Event_Border_Fullscreen *ev = event;
|
|
||||||
|
|
||||||
_e_desklock_fullscreen_count = ev->border->desk->fullscreen_borders;
|
|
||||||
return ECORE_CALLBACK_PASS_ON;
|
|
||||||
}
|
|
||||||
|
|
||||||
static Eina_Bool
|
|
||||||
_e_desklock_handler_border_desk_set_cb(void *data __UNUSED__, int type __UNUSED__, void *event)
|
|
||||||
{
|
|
||||||
E_Event_Border_Desk_Set *ev = event;
|
|
||||||
|
|
||||||
if (ev->border->desk->visible)
|
|
||||||
_e_desklock_fullscreen_count = ev->border->desk->fullscreen_borders;
|
|
||||||
else if (ev->desk->visible)
|
|
||||||
_e_desklock_fullscreen_count = ev->desk->fullscreen_borders;
|
|
||||||
return ECORE_CALLBACK_PASS_ON;
|
|
||||||
}
|
|
||||||
|
|
||||||
static Eina_Bool
|
|
||||||
_e_desklock_handler_desk_show_cb(void *data __UNUSED__, int type __UNUSED__, void *event)
|
|
||||||
{
|
|
||||||
E_Event_Desk_Show *ev = event;
|
|
||||||
|
|
||||||
_e_desklock_fullscreen_count = ev->desk->fullscreen_borders;
|
|
||||||
return ECORE_CALLBACK_PASS_ON;
|
|
||||||
}
|
|
||||||
|
|
|
@ -8,7 +8,6 @@ static Ecore_Event_Handler *_e_dpms_handler_border_iconify = NULL;
|
||||||
static Ecore_Event_Handler *_e_dpms_handler_border_uniconify = NULL;
|
static Ecore_Event_Handler *_e_dpms_handler_border_uniconify = NULL;
|
||||||
static Ecore_Event_Handler *_e_dpms_handler_border_desk_set = NULL;
|
static Ecore_Event_Handler *_e_dpms_handler_border_desk_set = NULL;
|
||||||
static Ecore_Event_Handler *_e_dpms_handler_desk_show = NULL;
|
static Ecore_Event_Handler *_e_dpms_handler_desk_show = NULL;
|
||||||
static int _e_dpms_fullscreen_count = 0;
|
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_e_dpms_handler_config_mode_cb(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__)
|
_e_dpms_handler_config_mode_cb(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__)
|
||||||
|
@ -18,34 +17,22 @@ _e_dpms_handler_config_mode_cb(void *data __UNUSED__, int type __UNUSED__, void
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_e_dpms_handler_border_fullscreen_check_cb(void *data __UNUSED__, int type __UNUSED__, void *event)
|
_e_dpms_handler_border_fullscreen_check_cb(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__)
|
||||||
{
|
{
|
||||||
E_Event_Border_Fullscreen *ev = event;
|
|
||||||
|
|
||||||
_e_dpms_fullscreen_count = ev->border->desk->fullscreen_borders;
|
|
||||||
e_dpms_init();
|
e_dpms_init();
|
||||||
return ECORE_CALLBACK_PASS_ON;
|
return ECORE_CALLBACK_PASS_ON;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_e_dpms_handler_border_desk_set_cb(void *data __UNUSED__, int type __UNUSED__, void *event)
|
_e_dpms_handler_border_desk_set_cb(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__)
|
||||||
{
|
{
|
||||||
E_Event_Border_Desk_Set *ev = event;
|
|
||||||
|
|
||||||
if (ev->border->desk->visible)
|
|
||||||
_e_dpms_fullscreen_count = ev->border->desk->fullscreen_borders;
|
|
||||||
else if (ev->desk->visible)
|
|
||||||
_e_dpms_fullscreen_count = ev->desk->fullscreen_borders;
|
|
||||||
e_dpms_init();
|
e_dpms_init();
|
||||||
return ECORE_CALLBACK_PASS_ON;
|
return ECORE_CALLBACK_PASS_ON;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_e_dpms_handler_desk_show_cb(void *data __UNUSED__, int type __UNUSED__, void *event)
|
_e_dpms_handler_desk_show_cb(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__)
|
||||||
{
|
{
|
||||||
E_Event_Desk_Show *ev = event;
|
|
||||||
|
|
||||||
_e_dpms_fullscreen_count = ev->desk->fullscreen_borders;
|
|
||||||
e_dpms_init();
|
e_dpms_init();
|
||||||
return ECORE_CALLBACK_PASS_ON;
|
return ECORE_CALLBACK_PASS_ON;
|
||||||
}
|
}
|
||||||
|
@ -57,7 +44,7 @@ e_dpms_init(void)
|
||||||
int enabled;
|
int enabled;
|
||||||
|
|
||||||
enabled = ((e_config->dpms_enable) && (!e_config->mode.presentation) &&
|
enabled = ((e_config->dpms_enable) && (!e_config->mode.presentation) &&
|
||||||
(_e_dpms_fullscreen_count <= 0));
|
(!e_util_fullscreen_curreny_any()));
|
||||||
|
|
||||||
if (!_e_dpms_handler_config_mode)
|
if (!_e_dpms_handler_config_mode)
|
||||||
_e_dpms_handler_config_mode = ecore_event_handler_add
|
_e_dpms_handler_config_mode = ecore_event_handler_add
|
||||||
|
|
|
@ -11,7 +11,6 @@ static Ecore_Event_Handler *_e_screensaver_handler_border_desk_set = NULL;
|
||||||
static Ecore_Event_Handler *_e_screensaver_handler_desk_show = NULL;
|
static Ecore_Event_Handler *_e_screensaver_handler_desk_show = NULL;
|
||||||
static E_Dialog *_e_screensaver_ask_presentation_dia = NULL;
|
static E_Dialog *_e_screensaver_ask_presentation_dia = NULL;
|
||||||
static int _e_screensaver_ask_presentation_count = 0;
|
static int _e_screensaver_ask_presentation_count = 0;
|
||||||
static int _e_screensaver_fullscreen_count = 0;
|
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_e_screensaver_handler_config_mode_cb(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__)
|
_e_screensaver_handler_config_mode_cb(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__)
|
||||||
|
@ -148,34 +147,22 @@ _e_screensaver_handler_screensaver_notify_cb(void *data __UNUSED__, int type __U
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_e_screensaver_handler_border_fullscreen_check_cb(void *data __UNUSED__, int type __UNUSED__, void *event)
|
_e_screensaver_handler_border_fullscreen_check_cb(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__)
|
||||||
{
|
{
|
||||||
E_Event_Border_Fullscreen *ev = event;
|
|
||||||
|
|
||||||
_e_screensaver_fullscreen_count = ev->border->desk->fullscreen_borders;
|
|
||||||
e_screensaver_init();
|
e_screensaver_init();
|
||||||
return ECORE_CALLBACK_PASS_ON;
|
return ECORE_CALLBACK_PASS_ON;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_e_screensaver_handler_border_desk_set_cb(void *data __UNUSED__, int type __UNUSED__, void *event)
|
_e_screensaver_handler_border_desk_set_cb(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__)
|
||||||
{
|
{
|
||||||
E_Event_Border_Desk_Set *ev = event;
|
|
||||||
|
|
||||||
if (ev->border->desk->visible)
|
|
||||||
_e_screensaver_fullscreen_count = ev->border->desk->fullscreen_borders;
|
|
||||||
else if (ev->desk->visible)
|
|
||||||
_e_screensaver_fullscreen_count = ev->desk->fullscreen_borders;
|
|
||||||
e_screensaver_init();
|
e_screensaver_init();
|
||||||
return ECORE_CALLBACK_PASS_ON;
|
return ECORE_CALLBACK_PASS_ON;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_e_screensaver_handler_desk_show_cb(void *data __UNUSED__, int type __UNUSED__, void *event)
|
_e_screensaver_handler_desk_show_cb(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__)
|
||||||
{
|
{
|
||||||
E_Event_Desk_Show *ev = event;
|
|
||||||
|
|
||||||
_e_screensaver_fullscreen_count = ev->desk->fullscreen_borders;
|
|
||||||
e_screensaver_init();
|
e_screensaver_init();
|
||||||
return ECORE_CALLBACK_PASS_ON;
|
return ECORE_CALLBACK_PASS_ON;
|
||||||
}
|
}
|
||||||
|
@ -222,7 +209,7 @@ e_screensaver_init(void)
|
||||||
(E_EVENT_DESK_SHOW, _e_screensaver_handler_desk_show_cb, NULL);
|
(E_EVENT_DESK_SHOW, _e_screensaver_handler_desk_show_cb, NULL);
|
||||||
|
|
||||||
if ((e_config->screensaver_enable) && (!e_config->mode.presentation) &&
|
if ((e_config->screensaver_enable) && (!e_config->mode.presentation) &&
|
||||||
(_e_screensaver_fullscreen_count <= 0))
|
(!e_util_fullscreen_curreny_any()))
|
||||||
timeout = e_config->screensaver_timeout;
|
timeout = e_config->screensaver_timeout;
|
||||||
|
|
||||||
interval = e_config->screensaver_interval;
|
interval = e_config->screensaver_interval;
|
||||||
|
|
|
@ -26,7 +26,7 @@ struct _E_Util_Fake_Mouse_Up_Info
|
||||||
struct _E_Util_Image_Import_Settings
|
struct _E_Util_Image_Import_Settings
|
||||||
{
|
{
|
||||||
E_Dialog *dia;
|
E_Dialog *dia;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
void (*func)(void *data, const char *path, Eina_Bool ok, Eina_Bool external, int quality, E_Image_Import_Mode mode);
|
void (*func)(void *data, const char *path, Eina_Bool ok, Eina_Bool external, int quality, E_Image_Import_Mode mode);
|
||||||
void *data;
|
void *data;
|
||||||
|
@ -42,12 +42,12 @@ struct _E_Util_Image_Import_Handle
|
||||||
{
|
{
|
||||||
Ecore_Exe *exe;
|
Ecore_Exe *exe;
|
||||||
Ecore_Event_Handler *handler;
|
Ecore_Event_Handler *handler;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
void (*func)(void *data, Eina_Bool ok, const char *image_path, const char *edje_path);
|
void (*func)(void *data, Eina_Bool ok, const char *image_path, const char *edje_path);
|
||||||
void *data;
|
void *data;
|
||||||
} cb;
|
} cb;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
const char *image, *edje, *temp;
|
const char *image, *edje, *temp;
|
||||||
} path;
|
} path;
|
||||||
|
@ -492,7 +492,7 @@ e_util_menu_item_edje_icon_set(E_Menu_Item *mi, const char *name)
|
||||||
EAPI unsigned int
|
EAPI unsigned int
|
||||||
e_util_icon_size_normalize(unsigned int desired)
|
e_util_icon_size_normalize(unsigned int desired)
|
||||||
{
|
{
|
||||||
const unsigned int *itr, known_sizes[] =
|
const unsigned int *itr, known_sizes[] =
|
||||||
{
|
{
|
||||||
16, 22, 24, 32, 36, 48, 64, 72, 96, 128, 192, 256, -1
|
16, 22, 24, 32, 36, 48, 64, 72, 96, 128, 192, 256, -1
|
||||||
};
|
};
|
||||||
|
@ -555,7 +555,7 @@ e_util_container_window_find(Ecore_X_Window win)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI E_Zone *
|
EAPI E_Zone *
|
||||||
e_util_zone_window_find(Ecore_X_Window win)
|
e_util_zone_window_find(Ecore_X_Window win)
|
||||||
{
|
{
|
||||||
Eina_List *l, *ll, *lll;
|
Eina_List *l, *ll, *lll;
|
||||||
E_Manager *man;
|
E_Manager *man;
|
||||||
|
@ -564,7 +564,7 @@ e_util_zone_window_find(Ecore_X_Window win)
|
||||||
|
|
||||||
EINA_LIST_FOREACH(e_manager_list(), l, man)
|
EINA_LIST_FOREACH(e_manager_list(), l, man)
|
||||||
EINA_LIST_FOREACH(man->containers, ll, con)
|
EINA_LIST_FOREACH(man->containers, ll, con)
|
||||||
EINA_LIST_FOREACH(con->zones, lll, zone)
|
EINA_LIST_FOREACH(con->zones, lll, zone)
|
||||||
if (zone->black_win == win) return zone;
|
if (zone->black_win == win) return zone;
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -1403,8 +1403,8 @@ e_util_image_import_cancel(E_Util_Image_Import_Handle *handle)
|
||||||
ecore_exe_kill(handle->exe);
|
ecore_exe_kill(handle->exe);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI int
|
EAPI int
|
||||||
e_util_container_desk_count_get(E_Container *con)
|
e_util_container_desk_count_get(E_Container *con)
|
||||||
{
|
{
|
||||||
Eina_List *zl;
|
Eina_List *zl;
|
||||||
E_Zone *zone;
|
E_Zone *zone;
|
||||||
|
@ -1412,13 +1412,13 @@ e_util_container_desk_count_get(E_Container *con)
|
||||||
|
|
||||||
E_OBJECT_CHECK_RETURN(con, 0);
|
E_OBJECT_CHECK_RETURN(con, 0);
|
||||||
E_OBJECT_TYPE_CHECK_RETURN(con, E_CONTAINER_TYPE, 0);
|
E_OBJECT_TYPE_CHECK_RETURN(con, E_CONTAINER_TYPE, 0);
|
||||||
EINA_LIST_FOREACH(con->zones, zl, zone)
|
EINA_LIST_FOREACH(con->zones, zl, zone)
|
||||||
{
|
{
|
||||||
int x, y;
|
int x, y;
|
||||||
int cx = 0, cy = 0;
|
int cx = 0, cy = 0;
|
||||||
|
|
||||||
e_zone_desk_count_get(zone, &cx, &cy);
|
e_zone_desk_count_get(zone, &cx, &cy);
|
||||||
for (x = 0; x < cx; x++)
|
for (x = 0; x < cx; x++)
|
||||||
{
|
{
|
||||||
for (y = 0; y < cy; y++)
|
for (y = 0; y < cy; y++)
|
||||||
count += 1;
|
count += 1;
|
||||||
|
@ -1560,3 +1560,54 @@ e_util_module_config_check(const char *module_name, int conf, int epoch, int ver
|
||||||
|
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks whenever the current manager/container/zone have fullscreen windows.
|
||||||
|
*/
|
||||||
|
EAPI Eina_Bool
|
||||||
|
e_util_fullscreen_curreny_any(void)
|
||||||
|
{
|
||||||
|
E_Manager *man = e_manager_current_get();
|
||||||
|
E_Container *con = e_container_current_get(man);
|
||||||
|
E_Zone *zone = e_zone_current_get(con);
|
||||||
|
E_Desk *desk;
|
||||||
|
|
||||||
|
if ((zone) && (zone->fullscreen > 0)) return EINA_TRUE;
|
||||||
|
desk = e_desk_current_get(zone);
|
||||||
|
if ((desk) && (desk->fullscreen_borders > 0)) return EINA_TRUE;
|
||||||
|
return EINA_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks whenever any manager/container/zone have fullscreen windows.
|
||||||
|
*/
|
||||||
|
EAPI Eina_Bool
|
||||||
|
e_util_fullscreen_any(void)
|
||||||
|
{
|
||||||
|
E_Zone *zone;
|
||||||
|
Eina_List *lm, *lc, *lz;
|
||||||
|
E_Container *con;
|
||||||
|
E_Manager *man;
|
||||||
|
E_Desk *desk;
|
||||||
|
int x, y;
|
||||||
|
|
||||||
|
EINA_LIST_FOREACH(e_manager_list(), lm, man)
|
||||||
|
{
|
||||||
|
EINA_LIST_FOREACH(man->containers, lc, con)
|
||||||
|
{
|
||||||
|
EINA_LIST_FOREACH(con->zones, lz, zone)
|
||||||
|
{
|
||||||
|
if (zone->fullscreen > 0) return EINA_TRUE;
|
||||||
|
|
||||||
|
for (x = 0; x < zone->desk_x_count; x++)
|
||||||
|
for (y = 0; y < zone->desk_y_count; y++)
|
||||||
|
{
|
||||||
|
desk = e_desk_at_xy_get(zone, x, y);
|
||||||
|
if ((desk) && (desk->fullscreen_borders > 0))
|
||||||
|
return EINA_TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return EINA_FALSE;
|
||||||
|
}
|
||||||
|
|
|
@ -76,5 +76,8 @@ EAPI void e_util_image_import_cancel(E_Util_Image_Import_
|
||||||
|
|
||||||
EAPI int e_util_container_desk_count_get(E_Container *con);
|
EAPI int e_util_container_desk_count_get(E_Container *con);
|
||||||
|
|
||||||
|
EAPI Eina_Bool e_util_fullscreen_curreny_any(void);
|
||||||
|
EAPI Eina_Bool e_util_fullscreen_any(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue