forked from enlightenment/enlightenment
Do xinerama/dual-head setup based on managers->containers->zones, not
xinerama screen count. (as E the wm will take care of setting up managers/containers/zones per what is needed from xinerama/dual-head). SVN revision: 45101
This commit is contained in:
parent
e02e87239a
commit
d307f74950
|
@ -2,9 +2,6 @@
|
|||
#include "e_mod_main.h"
|
||||
#include "e_mod_win.h"
|
||||
|
||||
/* local function prototypes */
|
||||
static int _cb_screens_sort(const void *data, const void *data2);
|
||||
|
||||
/* local variables */
|
||||
static Eina_List *iwins = NULL;
|
||||
const char *mod_dir = NULL;
|
||||
|
@ -14,18 +11,24 @@ EAPI E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Illume-Indicator" };
|
|||
EAPI void *
|
||||
e_modapi_init(E_Module *m)
|
||||
{
|
||||
E_Screen *screen;
|
||||
Eina_List *l, *screens;
|
||||
E_Manager *man;
|
||||
E_Container *con;
|
||||
E_Zone *zone;
|
||||
Eina_List *l, *ll, *lll;
|
||||
|
||||
mod_dir = eina_stringshare_add(m->dir);
|
||||
screens = (Eina_List *)e_xinerama_screens_get();
|
||||
// screens = eina_list_sort(screens, 0, _cb_screens_sort);
|
||||
EINA_LIST_FOREACH(screens, l, screen)
|
||||
EINA_LIST_FOREACH(e_manager_list(), l, man)
|
||||
{
|
||||
Il_Ind_Win *iwin = NULL;
|
||||
EINA_LIST_FOREACH(man->containers, ll, con)
|
||||
{
|
||||
EINA_LIST_FOREACH(con->zones, lll, zone)
|
||||
{
|
||||
Il_Ind_Win *iwin = NULL;
|
||||
|
||||
if (!(iwin = e_mod_win_new(screen))) continue;
|
||||
iwins = eina_list_append(iwins, iwin);
|
||||
if (!(iwin = e_mod_win_new(zone))) continue;
|
||||
iwins = eina_list_append(iwins, iwin);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return m;
|
||||
|
@ -53,14 +56,3 @@ e_modapi_save(E_Module *m)
|
|||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* local function prototypes */
|
||||
static int
|
||||
_cb_screens_sort(const void *data, const void *data2)
|
||||
{
|
||||
E_Screen *s1, *s2;
|
||||
|
||||
if (!(s1 = (E_Screen *)data)) return -1;
|
||||
if (!(s2 = (E_Screen *)data2)) return 1;
|
||||
return s2->escreen - s1->escreen;
|
||||
}
|
||||
|
|
|
@ -22,21 +22,16 @@ static void _e_mod_win_cb_mouse_wheel(void *data, Evas *evas, Evas_Object *obj,
|
|||
static int my = 0;
|
||||
|
||||
Il_Ind_Win *
|
||||
e_mod_win_new(E_Screen *screen)
|
||||
e_mod_win_new(E_Zone *zone)
|
||||
{
|
||||
Il_Ind_Win *iwin;
|
||||
E_Container *con;
|
||||
E_Zone *zone;
|
||||
Evas *evas;
|
||||
Ecore_X_Window_State states[2];
|
||||
|
||||
iwin = E_OBJECT_ALLOC(Il_Ind_Win, IL_IND_WIN_TYPE, _e_mod_win_cb_free);
|
||||
if (!iwin) return NULL;
|
||||
|
||||
con = e_container_current_get(e_manager_current_get());
|
||||
zone = e_util_container_zone_id_get(con->num, screen->escreen);
|
||||
|
||||
iwin->win = e_win_new(con);
|
||||
iwin->win = e_win_new(zone->container);
|
||||
iwin->win->data = iwin;
|
||||
states[0] = ECORE_X_WINDOW_STATE_SKIP_TASKBAR;
|
||||
states[1] = ECORE_X_WINDOW_STATE_SKIP_PAGER;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#ifndef E_MOD_WIN_H
|
||||
# define E_MOD_WIN_H
|
||||
|
||||
Il_Ind_Win *e_mod_win_new(E_Screen *screen);
|
||||
Il_Ind_Win *e_mod_win_new(E_Zone *zone);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
#include "e_mod_main.h"
|
||||
#include "e_mod_win.h"
|
||||
|
||||
/* local function prototypes */
|
||||
static int _cb_screens_sort(const void *data, const void *data2);
|
||||
|
||||
/* local variables */
|
||||
static Eina_List *swins = NULL;
|
||||
const char *mod_dir = NULL;
|
||||
|
@ -15,18 +12,24 @@ EAPI E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Illume-Softkey" };
|
|||
EAPI void *
|
||||
e_modapi_init(E_Module *m)
|
||||
{
|
||||
E_Screen *screen;
|
||||
Eina_List *l, *screens;
|
||||
E_Manager *man;
|
||||
E_Container *con;
|
||||
E_Zone *zone;
|
||||
Eina_List *l, *ll, *lll;
|
||||
|
||||
mod_dir = eina_stringshare_add(m->dir);
|
||||
screens = (Eina_List *)e_xinerama_screens_get();
|
||||
// screens = eina_list_sort(screens, 0, _cb_screens_sort);
|
||||
EINA_LIST_FOREACH(screens, l, screen)
|
||||
EINA_LIST_FOREACH(e_manager_list(), l, man)
|
||||
{
|
||||
Il_Sk_Win *swin = NULL;
|
||||
EINA_LIST_FOREACH(man->containers, ll, con)
|
||||
{
|
||||
EINA_LIST_FOREACH(con->zones, lll, zone)
|
||||
{
|
||||
Il_Sk_Win *swin = NULL;
|
||||
|
||||
if (!(swin = e_mod_softkey_win_new(screen))) continue;
|
||||
swins = eina_list_append(swins, swin);
|
||||
if (!(swin = e_mod_softkey_win_new(zone))) continue;
|
||||
swins = eina_list_append(swins, swin);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return m;
|
||||
|
@ -54,14 +57,3 @@ e_modapi_save(E_Module *m)
|
|||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* local function prototypes */
|
||||
static int
|
||||
_cb_screens_sort(const void *data, const void *data2)
|
||||
{
|
||||
E_Screen *s1, *s2;
|
||||
|
||||
if (!(s1 = (E_Screen *)data)) return -1;
|
||||
if (!(s2 = (E_Screen *)data2)) return 1;
|
||||
return s2->escreen - s1->escreen;
|
||||
}
|
||||
|
|
|
@ -9,11 +9,9 @@ static void _il_sk_win_cb_back_click(void *data, void *data2);
|
|||
static void _il_sk_win_cb_close_click(void *data, void *data2);
|
||||
|
||||
Il_Sk_Win *
|
||||
e_mod_softkey_win_new(E_Screen *screen)
|
||||
e_mod_softkey_win_new(E_Zone *zone)
|
||||
{
|
||||
Il_Sk_Win *swin;
|
||||
E_Container *con;
|
||||
E_Zone *zone;
|
||||
Evas *evas;
|
||||
Ecore_X_Window_State states[2];
|
||||
char buff[PATH_MAX];
|
||||
|
@ -23,10 +21,7 @@ e_mod_softkey_win_new(E_Screen *screen)
|
|||
|
||||
snprintf(buff, sizeof(buff), "%s/e-module-illume-softkey.edj", mod_dir);
|
||||
|
||||
con = e_container_current_get(e_manager_current_get());
|
||||
zone = e_util_container_zone_id_get(con->num, screen->escreen);
|
||||
|
||||
swin->win = e_win_new(con);
|
||||
swin->win = e_win_new(zone->container);
|
||||
swin->win->data = swin;
|
||||
states[0] = ECORE_X_WINDOW_STATE_SKIP_TASKBAR;
|
||||
states[1] = ECORE_X_WINDOW_STATE_SKIP_PAGER;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#ifndef E_MOD_WIN_H
|
||||
# define E_MOD_WIN_H
|
||||
|
||||
Il_Sk_Win *e_mod_softkey_win_new(E_Screen *screen);
|
||||
Il_Sk_Win *e_mod_softkey_win_new(E_Zone *zone);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -15,9 +15,10 @@ EAPI E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Illume2" };
|
|||
EAPI void *
|
||||
e_modapi_init(E_Module *m)
|
||||
{
|
||||
E_Manager *man;
|
||||
E_Container *con;
|
||||
E_Zone *zone;
|
||||
Eina_List *l;
|
||||
Eina_List *l, *ll, *lll;
|
||||
|
||||
/* setup eina logging */
|
||||
if (_e_illume_log_dom < 0)
|
||||
|
@ -46,47 +47,48 @@ e_modapi_init(E_Module *m)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
con = e_container_current_get(e_manager_current_get());
|
||||
EINA_LIST_FOREACH(con->zones, l, zone)
|
||||
{
|
||||
E_Illume_Config_Zone *cz;
|
||||
|
||||
cz = e_illume_zone_config_get(zone->id);
|
||||
if (cz->mode.dual == 0)
|
||||
ecore_x_e_illume_mode_set(zone->black_win,
|
||||
ECORE_X_ILLUME_MODE_SINGLE);
|
||||
else
|
||||
{
|
||||
if (cz->mode.side == 0)
|
||||
ecore_x_e_illume_mode_set(zone->black_win,
|
||||
ECORE_X_ILLUME_MODE_DUAL_TOP);
|
||||
else
|
||||
ecore_x_e_illume_mode_set(zone->black_win,
|
||||
ECORE_X_ILLUME_MODE_DUAL_LEFT);
|
||||
}
|
||||
}
|
||||
|
||||
/* initialize the keyboard subsystem */
|
||||
e_kbd_init();
|
||||
|
||||
/* initialize the quickpanel subsystem */
|
||||
e_quickpanel_init();
|
||||
|
||||
/* initialize the layout subsystem */
|
||||
e_mod_layout_init();
|
||||
|
||||
/* create a new vkbd */
|
||||
kbd = e_kbd_new();
|
||||
|
||||
EINA_LIST_FOREACH(con->zones, l, zone)
|
||||
{
|
||||
E_Quickpanel *qp;
|
||||
/* initialize the quickpanel subsystem */
|
||||
e_quickpanel_init();
|
||||
|
||||
/* create a new quickpanel */
|
||||
if (!(qp = e_quickpanel_new(zone))) continue;
|
||||
quickpanels = eina_list_append(quickpanels, qp);
|
||||
EINA_LIST_FOREACH(e_manager_list(), l, man)
|
||||
{
|
||||
EINA_LIST_FOREACH(man->containers, ll, con)
|
||||
{
|
||||
EINA_LIST_FOREACH(con->zones, lll, zone)
|
||||
{
|
||||
E_Illume_Config_Zone *cz;
|
||||
E_Quickpanel *qp;
|
||||
|
||||
/* create a new quickpanel */
|
||||
if (!(qp = e_quickpanel_new(zone))) continue;
|
||||
quickpanels = eina_list_append(quickpanels, qp);
|
||||
|
||||
cz = e_illume_zone_config_get(zone->id);
|
||||
if (cz->mode.dual == 0)
|
||||
ecore_x_e_illume_mode_set(zone->black_win,
|
||||
ECORE_X_ILLUME_MODE_SINGLE);
|
||||
else
|
||||
{
|
||||
if (cz->mode.side == 0)
|
||||
ecore_x_e_illume_mode_set(zone->black_win,
|
||||
ECORE_X_ILLUME_MODE_DUAL_TOP);
|
||||
else
|
||||
ecore_x_e_illume_mode_set(zone->black_win,
|
||||
ECORE_X_ILLUME_MODE_DUAL_LEFT);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* initialize the layout subsystem */
|
||||
e_mod_layout_init();
|
||||
|
||||
return m;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue