forked from enlightenment/enlightenment
and now u can set different bg's for different desktops.. and it "just works"
(tm) currently defautt transition is a sinusiodal crossfade - it can be a bit sluggish on big screens or slow machines. need to be able to configure that. SVN revision: 15575
This commit is contained in:
parent
c4f7be5822
commit
22534090d3
17
TODO
17
TODO
|
@ -10,7 +10,9 @@ Some of the things (in very short form) that need to be done to E17...
|
||||||
|
|
||||||
* BUG: when fullscreen should put up big black window above all windows EXCEPT
|
* BUG: when fullscreen should put up big black window above all windows EXCEPT
|
||||||
the fullscreen one (no need to hide other windows). in general fullscreen
|
the fullscreen one (no need to hide other windows). in general fullscreen
|
||||||
needs work, cleaning and testing
|
needs work, cleaning and testing. dont allow desktop switches for the desk
|
||||||
|
a fullscreened window is on, nor allow windows to be raised above the fs win
|
||||||
|
etc. ie the app must seem to be entirely fs for that zone.
|
||||||
* BUG: on font apply borders need to be adjusted for size changes
|
* BUG: on font apply borders need to be adjusted for size changes
|
||||||
* BUG: font apply doesnt seem to keep working (edje problem?) unless you
|
* BUG: font apply doesnt seem to keep working (edje problem?) unless you
|
||||||
restart
|
restart
|
||||||
|
@ -74,10 +76,11 @@ Some of the things (in very short form) that need to be done to E17...
|
||||||
to properly choose the border based on client window properties.
|
to properly choose the border based on client window properties.
|
||||||
* do something with the icccm urgency field hint
|
* do something with the icccm urgency field hint
|
||||||
* different borders for non-resizable windows, shaped windows etc.
|
* different borders for non-resizable windows, shaped windows etc.
|
||||||
* break out ipc to set names for desktops and zones
|
* break out ipc to set names for desktops (and get names/list them)
|
||||||
|
* some sort of gui display of a desktop name (in the pager?)
|
||||||
* window icons should be able to be chosen if e eapp icon overrides netwm
|
* window icons should be able to be chosen if e eapp icon overrides netwm
|
||||||
icon or the other way around.
|
icon or the other way around.
|
||||||
* eapps need to provide title matching too as well as name and class
|
* eaps need to provide title matching too as well as name and class
|
||||||
* add locale and encoding fields to eapp files (to launch eapp in that
|
* add locale and encoding fields to eapp files (to launch eapp in that
|
||||||
locale+encoding)
|
locale+encoding)
|
||||||
* add input method selector stuff to eapp - same as locale
|
* add input method selector stuff to eapp - same as locale
|
||||||
|
@ -101,7 +104,7 @@ Some of the things (in very short form) that need to be done to E17...
|
||||||
* add key input focus control for desktop modules
|
* add key input focus control for desktop modules
|
||||||
* finish off icccm support
|
* finish off icccm support
|
||||||
* finish complete netwm support
|
* finish complete netwm support
|
||||||
* make the cursors an edje buffer canvas for changinig cursor depending on
|
* make the cursors an edje buffer canvas for changing cursor depending on
|
||||||
context
|
context
|
||||||
* different cursors for different parts of the screen
|
* different cursors for different parts of the screen
|
||||||
* add a "taskbar" module
|
* add a "taskbar" module
|
||||||
|
@ -113,13 +116,10 @@ Some of the things (in very short form) that need to be done to E17...
|
||||||
new bars to be created or bars to be deleted
|
new bars to be created or bars to be deleted
|
||||||
* ibar need to support label pop-ups
|
* ibar need to support label pop-ups
|
||||||
* ibar should support subdirs with pop-up icons...
|
* ibar should support subdirs with pop-up icons...
|
||||||
* ibar needs lamp follower to be optional in ibar config (for the user)
|
|
||||||
* borders need to be able to change border theme on the fly by menu or app
|
* borders need to be able to change border theme on the fly by menu or app
|
||||||
properties
|
properties
|
||||||
* add window glueing <rephorm AT rephorm DOT com>
|
* add window glueing <rephorm AT rephorm DOT com>
|
||||||
* add setup/install wizard to seed eapp files etc. etc.
|
* add setup/install wizard to seed eap files etc. etc.
|
||||||
* make ipc try open on other ports numbers if current is taken
|
|
||||||
* make ipc try re-open if connection dies
|
|
||||||
* support text and color classes
|
* support text and color classes
|
||||||
* add clientinfo pane/popdown for borders
|
* add clientinfo pane/popdown for borders
|
||||||
* add sliders, radio and check buttons for clientinfo pane
|
* add sliders, radio and check buttons for clientinfo pane
|
||||||
|
@ -143,7 +143,6 @@ Some of the things (in very short form) that need to be done to E17...
|
||||||
radio etc. not massive menus)
|
radio etc. not massive menus)
|
||||||
* remove module config menus (make them part of the module control panel and
|
* remove module config menus (make them part of the module control panel and
|
||||||
as separate executables)
|
as separate executables)
|
||||||
* actuallly break out ipc and config to set bg per desktop (per zone)
|
|
||||||
]]]
|
]]]
|
||||||
|
|
||||||
[[[
|
[[[
|
||||||
|
|
|
@ -13,6 +13,8 @@ void
|
||||||
e_bg_zone_update(E_Zone *zone, E_Bg_Transition transition)
|
e_bg_zone_update(E_Zone *zone, E_Bg_Transition transition)
|
||||||
{
|
{
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
|
Evas_List *l;
|
||||||
|
int ok;
|
||||||
|
|
||||||
if (transition == E_BG_TRANSITION_START)
|
if (transition == E_BG_TRANSITION_START)
|
||||||
{
|
{
|
||||||
|
@ -66,11 +68,29 @@ e_bg_zone_update(E_Zone *zone, E_Bg_Transition transition)
|
||||||
evas_object_move(o, zone->x, zone->y);
|
evas_object_move(o, zone->x, zone->y);
|
||||||
evas_object_resize(o, zone->w, zone->h);
|
evas_object_resize(o, zone->w, zone->h);
|
||||||
|
|
||||||
/* FIXME: check config and look for a special bg for the current desk */
|
ok = 0;
|
||||||
if (!edje_object_file_set(o,
|
for (l = e_config->desktop_backgrounds; l; l = l->next)
|
||||||
e_config->desktop_default_background,
|
|
||||||
"desktop/background"))
|
|
||||||
{
|
{
|
||||||
|
E_Config_Desktop_Background *cfbg;
|
||||||
|
E_Desk *desk;
|
||||||
|
|
||||||
|
cfbg = l->data;
|
||||||
|
if ((cfbg->container >= 0) &&
|
||||||
|
(zone->container->num != cfbg->container)) continue;
|
||||||
|
if ((cfbg->zone >= 0) &&
|
||||||
|
(zone->num != cfbg->zone)) continue;
|
||||||
|
if ((!cfbg->desk) || (strlen(cfbg->desk) == 0)) continue;
|
||||||
|
desk = e_desk_current_get(zone);
|
||||||
|
if (!desk) continue;
|
||||||
|
if (strcmp(cfbg->desk, desk->name)) continue;
|
||||||
|
ok = edje_object_file_set(o, cfbg->file,
|
||||||
|
"desktop/background");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (!ok)
|
||||||
|
{
|
||||||
|
if (!edje_object_file_set(o, e_config->desktop_default_background,
|
||||||
|
"desktop/background"))
|
||||||
e_theme_edje_object_set(o, "base/theme/background",
|
e_theme_edje_object_set(o, "base/theme/background",
|
||||||
"desktop/background");
|
"desktop/background");
|
||||||
}
|
}
|
||||||
|
@ -103,6 +123,62 @@ e_bg_zone_update(E_Zone *zone, E_Bg_Transition transition)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
e_bg_add(int container, int zone, char *desk, char *file)
|
||||||
|
{
|
||||||
|
E_Config_Desktop_Background *cfbg;
|
||||||
|
|
||||||
|
e_bg_del(container, zone, desk);
|
||||||
|
cfbg = E_NEW(E_Config_Desktop_Background, 1);
|
||||||
|
cfbg->container = container;
|
||||||
|
cfbg->zone = zone;
|
||||||
|
cfbg->desk = strdup(desk);
|
||||||
|
cfbg->file = strdup(file);
|
||||||
|
e_config->desktop_backgrounds = evas_list_append(e_config->desktop_backgrounds, cfbg);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
e_bg_del(int container, int zone, char *desk)
|
||||||
|
{
|
||||||
|
Evas_List *l;
|
||||||
|
|
||||||
|
for (l = e_config->desktop_backgrounds; l; l = l->next)
|
||||||
|
{
|
||||||
|
E_Config_Desktop_Background *cfbg;
|
||||||
|
|
||||||
|
cfbg = l->data;
|
||||||
|
if ((cfbg->container == container) && (cfbg->zone == zone) &&
|
||||||
|
(!strcmp(cfbg->desk, desk)))
|
||||||
|
{
|
||||||
|
e_config->desktop_backgrounds = evas_list_remove_list(e_config->desktop_backgrounds, l);
|
||||||
|
IF_FREE(cfbg->desk);
|
||||||
|
IF_FREE(cfbg->file);
|
||||||
|
free(cfbg);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
e_bg_update(void)
|
||||||
|
{
|
||||||
|
Evas_List *l, *ll;
|
||||||
|
E_Manager *man;
|
||||||
|
E_Container *con;
|
||||||
|
E_Zone *zone;
|
||||||
|
|
||||||
|
for (l = e_manager_list(); l; l = l->next)
|
||||||
|
{
|
||||||
|
man = l->data;
|
||||||
|
for (ll = man->containers; ll; ll = ll->next)
|
||||||
|
{
|
||||||
|
con = ll->data;
|
||||||
|
zone = e_zone_current_get(con);
|
||||||
|
e_zone_bg_reconfigure(zone);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* local subsystem functions */
|
/* local subsystem functions */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
|
@ -21,7 +21,10 @@ typedef enum {
|
||||||
#ifndef E_BG_H
|
#ifndef E_BG_H
|
||||||
#define E_BG_H
|
#define E_BG_H
|
||||||
|
|
||||||
void e_bg_zone_update(E_Zone *zone, E_Bg_Transition transition);
|
EAPI void e_bg_zone_update(E_Zone *zone, E_Bg_Transition transition);
|
||||||
|
EAPI void e_bg_add(int container, int zone, char *desk, char *file);
|
||||||
|
EAPI void e_bg_del(int container, int zone, char *desk);
|
||||||
|
EAPI void e_bg_update(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -32,11 +32,22 @@ static E_Config_DD *_e_config_theme_edd = NULL;
|
||||||
static E_Config_DD *_e_config_bindings_mouse_edd = NULL;
|
static E_Config_DD *_e_config_bindings_mouse_edd = NULL;
|
||||||
static E_Config_DD *_e_config_bindings_key_edd = NULL;
|
static E_Config_DD *_e_config_bindings_key_edd = NULL;
|
||||||
static E_Config_DD *_e_config_path_append_edd = NULL;
|
static E_Config_DD *_e_config_path_append_edd = NULL;
|
||||||
|
static E_Config_DD *_e_config_desktop_bg_edd = NULL;
|
||||||
|
|
||||||
/* externally accessible functions */
|
/* externally accessible functions */
|
||||||
int
|
int
|
||||||
e_config_init(void)
|
e_config_init(void)
|
||||||
{
|
{
|
||||||
|
_e_config_desktop_bg_edd = E_CONFIG_DD_NEW("E_Config_Desktop_Background", E_Config_Desktop_Background);
|
||||||
|
#undef T
|
||||||
|
#undef D
|
||||||
|
#define T E_Config_Desktop_Background
|
||||||
|
#define D _e_config_desktop_bg_edd
|
||||||
|
E_CONFIG_VAL(D, T, container, INT);
|
||||||
|
E_CONFIG_VAL(D, T, zone, INT);
|
||||||
|
E_CONFIG_VAL(D, T, desk, STR);
|
||||||
|
E_CONFIG_VAL(D, T, file, STR);
|
||||||
|
|
||||||
_e_config_path_append_edd = E_CONFIG_DD_NEW("E_Path_Dir", E_Path_Dir);
|
_e_config_path_append_edd = E_CONFIG_DD_NEW("E_Path_Dir", E_Path_Dir);
|
||||||
#undef T
|
#undef T
|
||||||
#undef D
|
#undef D
|
||||||
|
@ -111,6 +122,7 @@ e_config_init(void)
|
||||||
E_CONFIG_VAL(D, T, config_version, INT); /**/
|
E_CONFIG_VAL(D, T, config_version, INT); /**/
|
||||||
E_CONFIG_VAL(D, T, show_splash, INT); /**/
|
E_CONFIG_VAL(D, T, show_splash, INT); /**/
|
||||||
E_CONFIG_VAL(D, T, desktop_default_background, STR); /**/
|
E_CONFIG_VAL(D, T, desktop_default_background, STR); /**/
|
||||||
|
E_CONFIG_LIST(D, T, desktop_backgrounds, _e_config_desktop_bg_edd);
|
||||||
E_CONFIG_VAL(D, T, menus_scroll_speed, DOUBLE); /**/
|
E_CONFIG_VAL(D, T, menus_scroll_speed, DOUBLE); /**/
|
||||||
E_CONFIG_VAL(D, T, menus_fast_mouse_move_threshhold, DOUBLE); /**/
|
E_CONFIG_VAL(D, T, menus_fast_mouse_move_threshhold, DOUBLE); /**/
|
||||||
E_CONFIG_VAL(D, T, menus_click_drag_timeout, DOUBLE); /**/
|
E_CONFIG_VAL(D, T, menus_click_drag_timeout, DOUBLE); /**/
|
||||||
|
@ -836,6 +848,11 @@ e_config_shutdown(void)
|
||||||
E_CONFIG_DD_FREE(_e_config_module_edd);
|
E_CONFIG_DD_FREE(_e_config_module_edd);
|
||||||
E_CONFIG_DD_FREE(_e_config_font_default_edd);
|
E_CONFIG_DD_FREE(_e_config_font_default_edd);
|
||||||
E_CONFIG_DD_FREE(_e_config_font_fallback_edd);
|
E_CONFIG_DD_FREE(_e_config_font_fallback_edd);
|
||||||
|
E_CONFIG_DD_FREE(_e_config_theme_edd);
|
||||||
|
E_CONFIG_DD_FREE(_e_config_bindings_mouse_edd);
|
||||||
|
E_CONFIG_DD_FREE(_e_config_bindings_key_edd);
|
||||||
|
E_CONFIG_DD_FREE(_e_config_path_append_edd);
|
||||||
|
E_CONFIG_DD_FREE(_e_config_desktop_bg_edd);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,7 @@ typedef struct _E_Config_Module E_Config_Module;
|
||||||
typedef struct _E_Config_Theme E_Config_Theme;
|
typedef struct _E_Config_Theme E_Config_Theme;
|
||||||
typedef struct _E_Config_Binding_Mouse E_Config_Binding_Mouse;
|
typedef struct _E_Config_Binding_Mouse E_Config_Binding_Mouse;
|
||||||
typedef struct _E_Config_Binding_Key E_Config_Binding_Key;
|
typedef struct _E_Config_Binding_Key E_Config_Binding_Key;
|
||||||
|
typedef struct _E_Config_Desktop_Background E_Config_Desktop_Background;
|
||||||
typedef Eet_Data_Descriptor E_Config_DD;
|
typedef Eet_Data_Descriptor E_Config_DD;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
@ -57,6 +58,7 @@ struct _E_Config
|
||||||
int config_version;
|
int config_version;
|
||||||
int show_splash;
|
int show_splash;
|
||||||
char *desktop_default_background;
|
char *desktop_default_background;
|
||||||
|
Evas_List *desktop_backgrounds;
|
||||||
double menus_scroll_speed;
|
double menus_scroll_speed;
|
||||||
double menus_fast_mouse_move_threshhold;
|
double menus_fast_mouse_move_threshhold;
|
||||||
double menus_click_drag_timeout;
|
double menus_click_drag_timeout;
|
||||||
|
@ -169,6 +171,14 @@ struct _E_Config_Binding_Key
|
||||||
unsigned char any_mod;
|
unsigned char any_mod;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct _E_Config_Desktop_Background
|
||||||
|
{
|
||||||
|
int container;
|
||||||
|
int zone;
|
||||||
|
char *desk;
|
||||||
|
char *file;
|
||||||
|
};
|
||||||
|
|
||||||
EAPI int e_config_init(void);
|
EAPI int e_config_init(void);
|
||||||
EAPI int e_config_shutdown(void);
|
EAPI int e_config_shutdown(void);
|
||||||
|
|
||||||
|
|
|
@ -709,20 +709,9 @@ break;
|
||||||
REQ_STRING(params[0], HDL);
|
REQ_STRING(params[0], HDL);
|
||||||
#elif (TYPE == E_WM_IN)
|
#elif (TYPE == E_WM_IN)
|
||||||
STRING(s, HDL);
|
STRING(s, HDL);
|
||||||
Evas_List *l, *ll;
|
|
||||||
E_Manager *man;
|
|
||||||
E_Container *con;
|
|
||||||
E_Zone *zone;
|
|
||||||
E_FREE(e_config->desktop_default_background);
|
E_FREE(e_config->desktop_default_background);
|
||||||
e_config->desktop_default_background = strdup(s);
|
e_config->desktop_default_background = strdup(s);
|
||||||
for (l = e_manager_list(); l; l = l->next) {
|
e_bg_update();
|
||||||
man = l->data;
|
|
||||||
for (ll = man->containers; ll; ll = ll->next) {
|
|
||||||
con = ll->data;
|
|
||||||
zone = e_zone_current_get(con);
|
|
||||||
e_zone_bg_reconfigure(zone);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
SAVE;
|
SAVE;
|
||||||
END_STRING(s);
|
END_STRING(s);
|
||||||
#elif (TYPE == E_REMOTE_IN)
|
#elif (TYPE == E_REMOTE_IN)
|
||||||
|
@ -2852,6 +2841,72 @@ break;
|
||||||
#endif
|
#endif
|
||||||
#undef HDL
|
#undef HDL
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
#define HDL E_IPC_OP_DESKTOP_BG_ADD
|
||||||
|
#if (TYPE == E_REMOTE_OPTIONS)
|
||||||
|
OP("-desktop-bg-add", 4, "Add a desktop bg definition. OPT1 = container no. OPT2 = zone no. OPT3 = desktop name OPT4 = bg file path", 0, HDL)
|
||||||
|
#elif (TYPE == E_REMOTE_OUT)
|
||||||
|
REQ_3INT_3STRING_START(HDL);
|
||||||
|
REQ_3INT_3STRING_END(atoi(params[0]), atoi(params[1]), 0, params[2], params[3], "", HDL);
|
||||||
|
#elif (TYPE == E_WM_IN)
|
||||||
|
INT3_STRING3(v, HDL);
|
||||||
|
e_bg_add(v->val1, v->val2, v->str1, v->str2);
|
||||||
|
e_bg_update();
|
||||||
|
SAVE;
|
||||||
|
END_INT3_STRING3(v);
|
||||||
|
#elif (TYPE == E_REMOTE_IN)
|
||||||
|
#endif
|
||||||
|
#undef HDL
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
#define HDL E_IPC_OP_DESKTOP_BG_DEL
|
||||||
|
#if (TYPE == E_REMOTE_OPTIONS)
|
||||||
|
OP("-desktop-bg-del", 3, "Delete a desktop bg definition. OPT1 = container no. OPT2 = zone no. OPT3 = desktop name", 0, HDL)
|
||||||
|
#elif (TYPE == E_REMOTE_OUT)
|
||||||
|
REQ_3INT_3STRING_START(HDL);
|
||||||
|
REQ_3INT_3STRING_END(atoi(params[0]), atoi(params[1]), 0, params[2], "", "", HDL);
|
||||||
|
#elif (TYPE == E_WM_IN)
|
||||||
|
INT3_STRING3(v, HDL);
|
||||||
|
e_bg_del(v->val1, v->val2, v->str1);
|
||||||
|
e_bg_update();
|
||||||
|
SAVE;
|
||||||
|
END_INT3_STRING3(v);
|
||||||
|
#elif (TYPE == E_REMOTE_IN)
|
||||||
|
#endif
|
||||||
|
#undef HDL
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
#define HDL E_IPC_OP_DESKTOP_BG_LIST
|
||||||
|
#if (TYPE == E_REMOTE_OPTIONS)
|
||||||
|
OP("-desktop-bg-list", 0, "List all current desktop bg definitions", 1, HDL)
|
||||||
|
#elif (TYPE == E_REMOTE_OUT)
|
||||||
|
REQ_NULL(HDL);
|
||||||
|
#elif (TYPE == E_WM_IN)
|
||||||
|
SEND_INT3_STRING3_LIST(e_config->desktop_backgrounds, E_Config_Desktop_Background, cfbg, v, HDL);
|
||||||
|
v->val1 = cfbg->container;
|
||||||
|
v->val2 = cfbg->zone;
|
||||||
|
v->val3 = 0;
|
||||||
|
v->str1 = cfbg->desk;
|
||||||
|
v->str2 = cfbg->file;
|
||||||
|
v->str3 = "";
|
||||||
|
END_SEND_INT3_STRING3_LIST(v, E_IPC_OP_DESKTOP_BG_LIST_REPLY);
|
||||||
|
#elif (TYPE == E_REMOTE_IN)
|
||||||
|
#endif
|
||||||
|
#undef HDL
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
#define HDL E_IPC_OP_DESKTOP_BG_LIST_REPLY
|
||||||
|
#if (TYPE == E_REMOTE_OPTIONS)
|
||||||
|
#elif (TYPE == E_REMOTE_OUT)
|
||||||
|
#elif (TYPE == E_WM_IN)
|
||||||
|
#elif (TYPE == E_REMOTE_IN)
|
||||||
|
INT3_STRING3_LIST(v, HDL);
|
||||||
|
printf("REPLY: BG CONTAINER=%i ZONE=%i DESK=\"%s\" FILE=\"%s\"\n",
|
||||||
|
v->val1, v->val2, v->str1, v->str2);
|
||||||
|
END_INT3_STRING3_LIST(v);
|
||||||
|
#endif
|
||||||
|
#undef HDL
|
||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
|
|
@ -111,4 +111,7 @@
|
||||||
#define E_IPC_OP_GADGET_RESIST_SET 111
|
#define E_IPC_OP_GADGET_RESIST_SET 111
|
||||||
#define E_IPC_OP_GADGET_RESIST_GET 112
|
#define E_IPC_OP_GADGET_RESIST_GET 112
|
||||||
#define E_IPC_OP_GADGET_RESIST_GET_REPLY 113
|
#define E_IPC_OP_GADGET_RESIST_GET_REPLY 113
|
||||||
|
#define E_IPC_OP_DESKTOP_BG_ADD 114
|
||||||
|
#define E_IPC_OP_DESKTOP_BG_DEL 115
|
||||||
|
#define E_IPC_OP_DESKTOP_BG_LIST 116
|
||||||
|
#define E_IPC_OP_DESKTOP_BG_LIST_REPLY 117
|
||||||
|
|
Loading…
Reference in New Issue