e_place.h \
e_resist.h \
e_startup.h \
-e_iconify.h \
e_hints.h \
e_gadman.h \
e_signals.h \
e_place.c \
e_resist.c \
e_startup.c \
-e_iconify.c \
e_hints.c \
e_gadman.c \
e_signals.c \
bd->changed = 1;
bd->zone = e_zone_current_get(con);
- bd->zone->clients = evas_list_append(bd->zone->clients, bd);
bd->desk = e_desk_current_get(bd->zone);
- bd->desk->clients = evas_list_append(bd->desk->clients, bd);
con->clients = evas_list_append(con->clients, bd);
borders = evas_list_append(borders, bd);
E_OBJECT_CHECK(zone);
E_OBJECT_TYPE_CHECK(zone, E_ZONE_TYPE);
if (bd->zone == zone) return;
- bd->zone->clients = evas_list_remove(bd->zone->clients, bd);
- zone->clients = evas_list_append(zone->clients, bd);
bd->zone = zone;
if (bd->desk->zone != bd->zone)
E_OBJECT_CHECK(desk);
E_OBJECT_TYPE_CHECK(desk, E_DESK_TYPE);
if (bd->desk == desk) return;
- bd->desk->clients = evas_list_remove(bd->desk->clients, bd);
- desk->clients = evas_list_append(desk->clients, bd);
bd->desk = desk;
e_border_zone_set(bd, desk->zone);
e_border_desk_set(bd, desk);
bd->iconic = 0;
e_border_show(bd);
- /* FIXME: DEPRECATED?
- e_iconify_border_remove(bd);
- */
edje_object_signal_emit(bd->bg_object, "uniconify", "");
}
iconic = 0;
}
}
+Evas_List *
+e_border_clients_get()
+{
+ return borders;
+}
/* local subsystem functions */
static void
ecore_x_window_del(bd->win);
bd->container->clients = evas_list_remove(bd->container->clients, bd);
- bd->zone->clients = evas_list_remove(bd->zone->clients, bd);
- bd->desk->clients = evas_list_remove(bd->desk->clients, bd);
borders = evas_list_remove(borders, bd);
free(bd);
{
bd->container->clients = evas_list_remove(bd->container->clients, bd);
bd->container->clients = evas_list_append_relative(bd->container->clients, bd, after);
- bd->zone->clients = evas_list_remove(bd->zone->clients, bd);
- bd->zone->clients = evas_list_append_relative(bd->zone->clients, bd, after);
- bd->desk->clients = evas_list_remove(bd->desk->clients, bd);
- bd->desk->clients = evas_list_append_relative(bd->desk->clients, bd, after);
borders = evas_list_remove(borders, bd);
borders = evas_list_append_relative(borders, bd, after);
}
{
bd->container->clients = evas_list_remove(bd->container->clients, bd);
bd->container->clients = evas_list_append(bd->container->clients, bd);
- bd->zone->clients = evas_list_remove(bd->zone->clients, bd);
- bd->zone->clients = evas_list_append(bd->zone->clients, bd);
- bd->desk->clients = evas_list_remove(bd->desk->clients, bd);
- bd->desk->clients = evas_list_append(bd->desk->clients, bd);
borders = evas_list_remove(borders, bd);
borders = evas_list_append(borders, bd);
}
{
bd->container->clients = evas_list_remove(bd->container->clients, bd);
bd->container->clients = evas_list_prepend_relative(bd->container->clients, bd, before);
- bd->zone->clients = evas_list_remove(bd->zone->clients, bd);
- bd->zone->clients = evas_list_prepend_relative(bd->zone->clients, bd, before);
- bd->desk->clients = evas_list_remove(bd->desk->clients, bd);
- bd->desk->clients = evas_list_prepend_relative(bd->desk->clients, bd, before);
borders = evas_list_remove(borders, bd);
borders = evas_list_prepend_relative(borders, bd, before);
}
{
bd->container->clients = evas_list_remove(bd->container->clients, bd);
bd->container->clients = evas_list_prepend(bd->container->clients, bd);
- bd->zone->clients = evas_list_remove(bd->zone->clients, bd);
- bd->zone->clients = evas_list_prepend(bd->zone->clients, bd);
- bd->desk->clients = evas_list_remove(bd->desk->clients, bd);
- bd->desk->clients = evas_list_prepend(bd->desk->clients, bd);
borders = evas_list_remove(borders, bd);
borders = evas_list_prepend(borders, bd);
}
EAPI void e_border_idler_before(void);
-EAPI void e_border_iconified_list(void);
+EAPI Evas_List *e_border_clients_get();
extern EAPI int E_EVENT_BORDER_RESIZE;
extern EAPI int E_EVENT_BORDER_MOVE;
}
}
-Evas_List *
-e_container_clients_list_get(E_Container *con)
-{
- E_OBJECT_CHECK_RETURN(con, NULL);
- E_OBJECT_TYPE_CHECK_RETURN(con, E_CONTAINER_TYPE, NULL);
- return con->clients;
-}
-
E_Zone *
e_container_zone_at_point_get(E_Container *con, int x, int y)
{
EAPI void e_container_raise(E_Container *con);
EAPI void e_container_lower(E_Container *con);
-EAPI Evas_List *e_container_clients_list_get(E_Container *con);
EAPI E_Zone *e_container_zone_at_point_get(E_Container *con, int x, int y);
EAPI E_Zone *e_container_zone_number_get(E_Container *con, int num);
desk = E_OBJECT_ALLOC(E_Desk, E_DESK_TYPE, _e_desk_free);
if (!desk) return NULL;
- desk->clients = NULL;
desk->zone = zone;
desk->num = ++desk_count;
snprintf(name, sizeof(name), "Desktop %d, %d", x, y);
_e_desk_free(E_Desk *desk)
{
E_FREE(desk->name);
- evas_list_free(desk->clients);
free(desk);
}
char visible : 1;
Evas_Object *bg_object;
-
- Evas_List *clients;
};
struct _E_Event_Desk_Show
+++ /dev/null
-/*
- * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
- */
-#include "e.h"
-
-static Evas_List *_e_iconic_borders = NULL;
-
-int
-e_iconify_init(void)
-{
- /* FIXME: initialize some ecore events for iconify/uniconify
- * (for things like modules to upate state
- */
- return 1;
-}
-
-int
-e_iconify_shutdown(void)
-{
- evas_list_free(_e_iconic_borders);
- return 1;
-}
-
-Evas_List *
-e_iconify_clients_list_get(void)
-{
- return _e_iconic_borders;
-}
-
-int
-e_iconify_border_iconfied(E_Border *bd)
-{
- if (evas_list_find(_e_iconic_borders, bd)) return 1;
- else return 0;
-}
-
-void
-e_iconify_border_add(E_Border *bd)
-{
- E_OBJECT_CHECK(bd);
-
- /* FIXME send iconify event for this border */
- _e_iconic_borders = evas_list_append(_e_iconic_borders, bd);
-
-}
-
-void
-e_iconify_border_remove(E_Border *bd)
-{
- /* FIXME send uniconify event for this border */
- _e_iconic_borders = evas_list_remove(_e_iconic_borders, bd);
-}
-
-
+++ /dev/null
-/*
- * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
- */
-#ifdef E_TYPEDEFS
-#else
-#ifndef E_ICONIFY_H
-#define E_ICONIFY_H
-
-EAPI int e_iconify_init(void);
-EAPI int e_iconify_shutdown(void);
-EAPI Evas_List *e_iconify_clients_list_get(void);
-EAPI int e_iconify_border_iconfied(E_Border *bd);
-EAPI void e_iconify_border_add(E_Border *bd);
-EAPI void e_iconify_border_remove(E_Border *bd);
-
-#endif
-#endif
#include "e_place.h"
#include "e_resist.h"
#include "e_startup.h"
-#include "e_iconify.h"
#include "e_hints.h"
#include "e_gadman.h"
#include "e_signals.h"
E_Menu_Item *mi;
Evas_List *l, *borders = NULL;
E_Menu *root;
+ E_Zone *zone;
e_menu_pre_activate_callback_set(m, NULL, NULL);
root = e_menu_root_get(m);
- /* get the current containers clients */
- if ((root) && (root->zone))
+ /* get the current clients */
+ if (root)
+ zone = root->zone;
+ for (l = e_border_clients_get(); l; l = l->next)
{
- for (l = e_zone_clients_list_get(root->zone); l; l = l->next)
- borders = evas_list_append(borders, l->data);
- }
+ E_Border *border;
- /* get the iconified clients from other containers */
- for (l = e_iconify_clients_list_get(); l; l = l->next)
- {
- if (!evas_list_find(borders, l->data))
- borders = evas_list_append(borders, l->data);
+ border = l->data;
+ if ((border->zone == zone) || (border->iconic))
+ borders = evas_list_append(borders, border);
}
-
+
if (!borders)
{
/* FIXME here we want nothing, but that crashes!!! */
}
_e_main_shutdown_push(e_module_shutdown);
- /* setup iconification */
- if (!e_iconify_init())
- {
- e_error_message_show("Enlightenment cannot setup its iconify system.");
- _e_main_shutdown(-1);
- }
- else
- _e_main_shutdown_push(e_iconify_shutdown);
-
if (!nowelcome)
{
/* explicitly show a gui dialog */
evas_object_show(o);
}
-Evas_List *
-e_zone_clients_list_get(E_Zone *zone)
-{
- E_OBJECT_CHECK_RETURN(zone, NULL);
- E_OBJECT_TYPE_CHECK_RETURN(zone, E_ZONE_TYPE, NULL);
- return zone->clients;
-}
-
-
static void
_e_zone_free(E_Zone *zone)
{
E_Desk **new_desks;
E_Desk *desk, *new_desk;
int x, y, xx, yy, moved;
- Evas_List *client;
+ Evas_List *l;
E_Border *bd;
E_Event_Zone_Desk_Count_Set *ev;
for(y = 0; y < yy; y++)
{
if (x < zone->desk_x_count && y < zone->desk_y_count)
- desk = (E_Desk *) zone->desks[x + (y * zone->desk_x_count)];
+ desk = zone->desks[x + (y * zone->desk_x_count)];
else
desk = e_desk_new(zone, x, y);
new_desks[x + (y * xx)] = desk;
if (xx < zone->desk_x_count)
for (y = 0; y < zone->desk_y_count; y++)
{
- new_desk = (E_Desk *)
- zone->desks[xx - 1 + (y * zone->desk_x_count)];
+ new_desk = zone->desks[xx - 1 + (y * zone->desk_x_count)];
for (x = xx; x < zone->desk_x_count; x++)
{
- desk = (E_Desk *)
- zone->desks[x + (y * zone->desk_x_count)];
+ desk = zone->desks[x + (y * zone->desk_x_count)];
- /* Here desk->clients is removed from the list on desk_set
- * so we want to iterate whilst it is not NULL */
- while (desk->clients)
+ for (l = zone->container->clients; l; l = l->next)
{
- bd = (E_Border *) desk->clients->data;
-
- e_border_desk_set(bd, new_desk);
+ bd = l->data;
+ if (bd->desk == desk)
+ e_border_desk_set(bd, new_desk);
}
e_object_del(E_OBJECT(desk));
}
if (yy < zone->desk_y_count)
for (x = 0; x < zone->desk_x_count; x++)
{
- new_desk = (E_Desk *)
- zone->desks[x + ((yy - 1) * zone->desk_x_count)];
+ new_desk = zone->desks[x + ((yy - 1) * zone->desk_x_count)];
for (y = yy; y < zone->desk_y_count; y++)
{
- desk = (E_Desk *)
- zone->desks[x + (y * zone->desk_x_count)];
+ desk = zone->desks[x + (y * zone->desk_x_count)];
- /* again, list shrinking as we iterate */
- while (desk->clients)
+ for (l = zone->container->clients; l; l = l->next)
{
- bd = (E_Border *) desk->clients->data;
-
- e_border_desk_set(bd, new_desk);
+ bd = l->data;
+ if (bd->desk == desk)
+ e_border_desk_set(bd, new_desk);
}
e_object_del(E_OBJECT(desk));
}
int desk_x_count, desk_y_count;
int desk_x_current, desk_y_current;
E_Desk **desks;
- Evas_List *clients;
-
};
struct _E_Event_Zone_Desk_Count_Set
EAPI void e_zone_move_resize(E_Zone *zone, int x, int y, int w, int h);
EAPI E_Zone *e_zone_current_get(E_Container *con);
EAPI void e_zone_bg_reconfigure(E_Zone *zone);
-EAPI Evas_List *e_zone_clients_list_get(E_Zone *zone);
EAPI void e_zone_desk_count_set(E_Zone *zone, int x_count, int y_count);
EAPI void e_zone_desk_count_get(E_Zone *zone, int *x_count, int *y_count);