else
_e_main_shutdown_push(_e_main_ipc_shutdown);
- /* setup module loading etc. FIXME: check return value */
- e_module_init();
-
+ /* setup module loading etc */
+ if (!e_module_init())
+ {
+ e_error_message_show("Enlightenment cannot set up its module system.");
+ _e_main_shutdown(-1);
+ }
+ _e_main_shutdown_push(e_module_shutdown);
+
+ /* setup iconification */
if (!e_iconify_init())
{
e_error_message_show("Enlightenment cannot setup its iconify system.");
/* add in a handler that just before we go idle we flush x */
_e_main_idle_enterer_flusher = ecore_idle_enterer_add(_e_main_cb_x_flusher, NULL);
- /* an intle enterer to be called after all others */
+ /* an idle enterer to be called after all others */
_e_main_idle_enterer_after = ecore_idle_enterer_add(_e_main_cb_idler_after, NULL);
ecore_x_ungrab();
/* NB: no need to do this as config shutdown will flush any saves */
/* and all changed config was already saved before */
e_config_save_flush();
- e_module_shutdown();
/* unroll our stack of shutdown functions with exit code of 0 */
_e_main_shutdown(0);
return 0;
}
-/* FIXME: make save to deleet within a callback */
+/* FIXME: make save to delete within a callback */
E_Before_Idler *
e_main_idler_before_add(int (*func) (void *data), void *data, int once)
{
/* err dont just disable it - replace it with a proper wizard tool */
/* outside e's main source to populate these directories from gnome/kde */
/* app menu data etc. */
- snprintf(buf, sizeof(buf), "%s/.e/e/applications/all/eterm.eapp", homedir);
+ snprintf(buf, sizeof(buf), "%s/.e/e/applications/bar/.order", homedir);
if (!ecore_file_exists(buf))
{
printf("GETTING YOU STARTED!\n");
Ecore_X_Window *roots;
int num, i;
+ if (!e_xinerama_init()) return 0;
if (!e_atoms_init()) return 0;
if (!e_manager_init()) return 0;
if (!e_container_init()) return 0;
i);
return 0;
}
- /* FIXME
- * This should be removed!
- {
- E_Gadman_Client *gmc;
-
- gmc = e_gadman_client_new(con->gadman);
- gmc->x = 0;
- gmc->y = 300;
- gmc->w = 100;
- gmc->h = 100;
- e_gadman_client_policy_set(gmc,
-// E_GADMAN_POLICY_EDGES |
- E_GADMAN_POLICY_ANYWHERE |
- E_GADMAN_POLICY_HMOVE |
- E_GADMAN_POLICY_VMOVE |
- E_GADMAN_POLICY_HSIZE |
- E_GADMAN_POLICY_VSIZE);
- e_gadman_client_min_size_set(gmc, 20, 20);
- e_gadman_client_auto_size_set(gmc, 50, 200);
- e_gadman_client_align_set(gmc, 0.0, 0.5);
- e_client_gadman_edge_set(gmc, E_GADMAN_EDGE_LEFT);
- e_gadman_client_domain_set(gmc, "test", 0);
- e_gadman_client_load(gmc);
-
- gmc = e_gadman_client_new(con->gadman);
- gmc->x = 0;
- gmc->y = 400;
- gmc->w = 100;
- gmc->h = 100;
- e_gadman_client_policy_set(gmc,
-// E_GADMAN_POLICY_EDGES |
- E_GADMAN_POLICY_ANYWHERE |
- E_GADMAN_POLICY_HMOVE |
- E_GADMAN_POLICY_VMOVE |
- E_GADMAN_POLICY_HSIZE |
- E_GADMAN_POLICY_VSIZE);
- e_gadman_client_min_size_set(gmc, 20, 20);
- e_gadman_client_auto_size_set(gmc, 50, 200);
- e_gadman_client_align_set(gmc, 0.0, 0.5);
- e_client_gadman_edge_set(gmc, E_GADMAN_EDGE_LEFT);
- e_gadman_client_domain_set(gmc, "test", 1);
- e_gadman_client_load(gmc);
-
- gmc = e_gadman_client_new(con->gadman);
- gmc->x = 0;
- gmc->y = 500;
- gmc->w = 100;
- gmc->h = 100;
- e_gadman_client_policy_set(gmc,
-// E_GADMAN_POLICY_EDGES |
- E_GADMAN_POLICY_ANYWHERE |
- E_GADMAN_POLICY_HMOVE |
- E_GADMAN_POLICY_VMOVE |
- E_GADMAN_POLICY_HSIZE |
- E_GADMAN_POLICY_VSIZE);
- e_gadman_client_min_size_set(gmc, 20, 20);
- e_gadman_client_auto_size_set(gmc, 50, 200);
- e_gadman_client_align_set(gmc, 0.0, 0.5);
- e_client_gadman_edge_set(gmc, E_GADMAN_EDGE_LEFT);
- e_gadman_client_domain_set(gmc, "test", 2);
- e_gadman_client_load(gmc);
- }
- */
}
free(roots);
ecore_x_sync();
e_container_shutdown();
e_manager_shutdown();
e_atoms_shutdown();
+ e_xinerama_shutdown();
return 1;
}
e_init_hide();
return 0;
}
-
--- /dev/null
+/*
+ * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
+ */
+#include "e.h"
+
+static void _e_xinerama_clean(void);
+static void _e_xinerama_update(void);
+
+static Evas_List *all_screens = NULL;
+static Evas_List *chosen_screens = NULL;
+
+int
+e_xinerama_init(void)
+{
+ _e_xinerama_update();
+ return 1;
+}
+
+int
+e_xinerama_shutdown(void)
+{
+ _e_xinerama_clean();
+ return 1;
+}
+
+static void
+_e_xinerama_clean(void)
+{
+ while (all_screens)
+ {
+ free(all_screens->data);
+ all_screens = evas_list_remove_list(all_screens, all_screens);
+ }
+ while (chosen_screens)
+ {
+ free(chosen_screens->data);
+ chosen_screens = evas_list_remove_list(chosen_screens, chosen_screens);
+ }
+}
+
+static void
+_e_xinerama_update(void)
+{
+ int i, n;
+ Ecore_X_Window root, *roots;
+
+ _e_xinerama_clean();
+ roots = ecore_x_window_root_list(&n);
+ if (roots)
+ {
+ int rw, rh;
+
+ /* more than 1 root window - xinerama wont be active */
+ if (n > 1)
+ {
+ free(roots);
+ return;
+ }
+ /* first (and only) root window */
+ root = roots[0];
+ free(roots);
+ /* get root size */
+ ecore_x_window_size_get(root, &rw, &rh);
+ /* get number of xinerama screens */
+ n = ecore_x_xinerama_screen_count_get();
+ if (n < 1)
+ {
+ E_Screen *scr;
+
+ scr = calloc(1, sizeof(E_Screen));
+ scr->screen = 0;
+ scr->x = 0;
+ scr->y = 0;
+ scr->w = rw;
+ scr->h = rh;
+ all_screens = evas_list_append(all_screens, scr);
+ }
+ else
+ {
+ for (i = 0; i < n; i++)
+ {
+ int x, y, w, h;
+
+ /* get each xinerama screen geometry */
+ if (ecore_x_xinerama_screen_geometry_get(i, &x, &y, &w, &h))
+ {
+ E_Screen *scr;
+
+ printf("E17 INIT: XINERAMA SCREEN: [%i], %ix%i+%i+%i\n",
+ i, w, h, x, y);
+ /* add it to our list */
+ scr = calloc(1, sizeof(E_Screen));
+ scr->screen = i;
+ scr->x = x;
+ scr->y = y;
+ scr->w = w;
+ scr->h = h;
+ all_screens = evas_list_append(all_screens, scr);
+ }
+ }
+ }
+ }
+ /* now go through all_screens... and build a list of chosen screens */
+}