summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2005-06-29 14:28:47 +0000
committerCarsten Haitzler <raster@rasterman.com>2005-06-29 14:28:47 +0000
commite314c2cc04886cb05deee1e12c6c7a56cf868fc2 (patch)
tree282b5a27f0855bf24c852fe6ed23b273d0e34abf /src
parent63fb8f4a129f1ba763d03e4f03fbd77d7ef7b009 (diff)
bg now allows transitions when changing the bg. also a first step to allow
different bg's per desk - not implemented yet tho, but some infrastructure for it SVN revision: 15568
Diffstat (limited to 'src')
-rw-r--r--src/bin/Makefile.am4
-rw-r--r--src/bin/e.h1
-rw-r--r--src/bin/e_bg.c153
-rw-r--r--src/bin/e_bg.h27
-rw-r--r--src/bin/e_config.c20
-rw-r--r--src/bin/e_config.h9
-rw-r--r--src/bin/e_desk.c9
-rw-r--r--src/bin/e_includes.h1
-rw-r--r--src/bin/e_main.c14
-rw-r--r--src/bin/e_theme.c1
-rw-r--r--src/bin/e_zone.c69
-rw-r--r--src/bin/e_zone.h5
12 files changed, 254 insertions, 59 deletions
diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
index ab4f9c4..b128a0e 100644
--- a/src/bin/Makefile.am
+++ b/src/bin/Makefile.am
@@ -62,7 +62,8 @@ e_msg.h \
62e_winlist.h \ 62e_winlist.h \
63e_alert.h \ 63e_alert.h \
64e_maximize.h \ 64e_maximize.h \
65e_grabinput.h 65e_grabinput.h \
66e_bg.h
66 67
67enlightenment_SOURCES = \ 68enlightenment_SOURCES = \
68e_main.c \ 69e_main.c \
@@ -115,6 +116,7 @@ e_winlist.c \
115e_alert.c \ 116e_alert.c \
116e_maximize.c \ 117e_maximize.c \
117e_grabinput.c \ 118e_grabinput.c \
119e_bg.c \
118$(ENLIGHTENMENTHEADERS) 120$(ENLIGHTENMENTHEADERS)
119 121
120enlightenment_LDFLAGS = -export-dynamic @e_libs@ @x_libs@ @dlopen_libs@ 122enlightenment_LDFLAGS = -export-dynamic @e_libs@ @x_libs@ @dlopen_libs@
diff --git a/src/bin/e.h b/src/bin/e.h
index 6e63dec..7ff8044 100644
--- a/src/bin/e.h
+++ b/src/bin/e.h
@@ -15,6 +15,7 @@
15#include <sys/time.h> 15#include <sys/time.h>
16#include <sys/param.h> 16#include <sys/param.h>
17#include <dlfcn.h> 17#include <dlfcn.h>
18#include <math.h>
18 19
19#include <Evas.h> 20#include <Evas.h>
20#include <Ecore.h> 21#include <Ecore.h>
diff --git a/src/bin/e_bg.c b/src/bin/e_bg.c
new file mode 100644
index 0000000..a14a913
--- /dev/null
+++ b/src/bin/e_bg.c
@@ -0,0 +1,153 @@
1/*
2 * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
3 */
4#include "e.h"
5
6/* local subsystem functions */
7static int _e_bg_animator(void *data);
8
9/* local subsystem globals */
10
11/* externally accessible functions */
12void
13e_bg_zone_update(E_Zone *zone, E_Bg_Transition transition)
14{
15 Evas_Object *o;
16
17 if (transition == E_BG_TRANSITION_START)
18 {
19 zone->bg_transition_mode = e_config->desktop_bg_start_transition;
20 zone->bg_transition_time = e_config->desktop_bg_start_transition_time;
21 }
22 else if (transition == E_BG_TRANSITION_DESK)
23 {
24 zone->bg_transition_mode = e_config->desktop_bg_desk_transition;
25 zone->bg_transition_time = e_config->desktop_bg_desk_transition_time;
26 }
27 else if (transition == E_BG_TRANSITION_CHANGE)
28 {
29 zone->bg_transition_mode = e_config->desktop_bg_change_transition;
30 zone->bg_transition_time = e_config->desktop_bg_change_transition_time;
31 }
32 if ((zone->bg_transition_mode == E_BG_TRANSITION_MODE_NONE) ||
33 (zone->bg_transition_time == 0.0))
34 transition = E_BG_TRANSITION_NONE;
35 if (zone->bg_transition_mode == E_BG_TRANSITION_MODE_RANDOM)
36 {
37 zone->bg_transition_mode =
38 (rand() % (E_BG_TRANSITION_MODE_LAST - E_BG_TRANSITION_MODE_RANDOM))
39 + E_BG_TRANSITION_MODE_RANDOM + 1;
40 if (zone->bg_transition_mode <= E_BG_TRANSITION_MODE_RANDOM)
41 zone->bg_transition_mode = E_BG_TRANSITION_MODE_RANDOM + 1;
42 else if (zone->bg_transition_mode >= E_BG_TRANSITION_MODE_LAST)
43 zone->bg_transition_mode = E_BG_TRANSITION_MODE_LAST - 1;
44 }
45 if (transition == E_BG_TRANSITION_NONE)
46 {
47 if (zone->bg_object)
48 {
49 evas_object_del(zone->bg_object);
50 zone->bg_object = NULL;
51 }
52 }
53 if (transition != E_BG_TRANSITION_NONE)
54 {
55 if (zone->bg_object)
56 {
57 if (zone->prev_bg_object)
58 evas_object_del(zone->prev_bg_object);
59 zone->prev_bg_object = zone->bg_object;
60 zone->bg_object = NULL;
61 }
62 }
63 o = edje_object_add(zone->container->bg_evas);
64 zone->bg_object = o;
65 evas_object_data_set(o, "e_zone", zone);
66 evas_object_move(o, zone->x, zone->y);
67 evas_object_resize(o, zone->w, zone->h);
68
69 /* FIXME: check config and look for a special bg for the current desk */
70 if (!edje_object_file_set(o,
71 e_config->desktop_default_background,
72 "desktop/background"))
73 {
74 e_theme_edje_object_set(o, "base/theme/background",
75 "desktop/background");
76 }
77 evas_object_layer_set(o, -1);
78 evas_object_lower(o);
79
80 evas_object_clip_set(o, zone->bg_clip_object);
81 evas_object_show(o);
82
83 if (zone->prev_bg_object)
84 {
85 const char *pfile = "", *pgroup = "", *file = "", *group = "";
86
87 edje_object_file_get(zone->prev_bg_object, &pfile, &pgroup);
88 edje_object_file_get(zone->bg_object, &file, &group);
89 if ((pfile) && (file) && (!strcmp(pfile, file)) &&
90 (pgroup) && (group) && (!strcmp(pgroup, group)))
91 {
92 evas_object_del(zone->prev_bg_object);
93 zone->prev_bg_object = NULL;
94 return;
95 }
96 }
97
98 if (transition != E_BG_TRANSITION_NONE)
99 {
100 if (!zone->bg_animator)
101 zone->bg_animator= ecore_animator_add(_e_bg_animator, zone);
102 zone->bg_set_time = ecore_time_get();
103 }
104}
105
106/* local subsystem functions */
107
108static int
109_e_bg_animator(void *data)
110{
111 E_Zone *zone;
112 double t;
113 int a;
114
115 zone = data;
116 /* t is an animating INDEX 0.0 - 1.0, it is used as a lookup into
117 * the effect. 1.0 == finished */
118 t = (ecore_time_get() - zone->bg_set_time) / zone->bg_transition_time;
119 if (t < 0.0) t = 0.0;
120 else if (t > 1.0) t = 1.0;
121
122 if (zone->bg_transition_mode == E_BG_TRANSITION_MODE_FADE)
123 {
124 a = (1.0 - t) * 255.0;
125 if (a < 0) a = 0;
126 else if (a > 255) a = 255;
127 evas_object_color_set(zone->prev_bg_object,
128 255, 255, 255, a);
129 }
130 else if (zone->bg_transition_mode == E_BG_TRANSITION_MODE_SINUSOUDAL_FADE)
131 {
132 double t2;
133
134 t2 = (1.0 - cos(t * M_PI)) / 2.0;
135
136 a = (1.0 - t2) * 255.0;
137 if (a < 0) a = 0;
138 else if (a > 255) a = 255;
139 evas_object_color_set(zone->prev_bg_object,
140 255, 255, 255, a);
141 }
142
143 /* if we still animate.. */
144 if (t < 1.0) return 1;
145
146 if (zone->prev_bg_object)
147 {
148 evas_object_del(zone->prev_bg_object);
149 zone->prev_bg_object = NULL;
150 }
151 zone->bg_animator = NULL;
152 return 0;
153}
diff --git a/src/bin/e_bg.h b/src/bin/e_bg.h
new file mode 100644
index 0000000..1ab0f93
--- /dev/null
+++ b/src/bin/e_bg.h
@@ -0,0 +1,27 @@
1/*
2 * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
3 */
4#ifdef E_TYPEDEFS
5
6typedef enum {
7 E_BG_TRANSITION_NONE,
8 E_BG_TRANSITION_START,
9 E_BG_TRANSITION_DESK,
10 E_BG_TRANSITION_CHANGE
11} E_Bg_Transition;
12
13typedef enum {
14 E_BG_TRANSITION_MODE_NONE,
15 E_BG_TRANSITION_MODE_RANDOM,
16 E_BG_TRANSITION_MODE_FADE,
17 E_BG_TRANSITION_MODE_SINUSOUDAL_FADE,
18 E_BG_TRANSITION_MODE_LAST
19} E_Bg_Transition_Mode;
20#else
21#ifndef E_BG_H
22#define E_BG_H
23
24void e_bg_zone_update(E_Zone *zone, E_Bg_Transition transition);
25
26#endif
27#endif
diff --git a/src/bin/e_config.c b/src/bin/e_config.c
index 56a6721..0415a32 100644
--- a/src/bin/e_config.c
+++ b/src/bin/e_config.c
@@ -175,6 +175,12 @@ e_config_init(void)
175 E_CONFIG_VAL(D, T, kill_timer_wait, DOUBLE); 175 E_CONFIG_VAL(D, T, kill_timer_wait, DOUBLE);
176 E_CONFIG_VAL(D, T, ping_clients, INT); 176 E_CONFIG_VAL(D, T, ping_clients, INT);
177 E_CONFIG_VAL(D, T, ping_clients_wait, DOUBLE); 177 E_CONFIG_VAL(D, T, ping_clients_wait, DOUBLE);
178 E_CONFIG_VAL(D, T, desktop_bg_start_transition, INT);
179 E_CONFIG_VAL(D, T, desktop_bg_start_transition_time, DOUBLE);
180 E_CONFIG_VAL(D, T, desktop_bg_desk_transition, INT);
181 E_CONFIG_VAL(D, T, desktop_bg_desk_transition_time, DOUBLE);
182 E_CONFIG_VAL(D, T, desktop_bg_change_transition, INT);
183 E_CONFIG_VAL(D, T, desktop_bg_change_transition_time, DOUBLE);
178 184
179 e_config = e_config_domain_load("e", _e_config_edd); 185 e_config = e_config_domain_load("e", _e_config_edd);
180 if (e_config) 186 if (e_config)
@@ -213,7 +219,7 @@ e_config_init(void)
213 e_config = E_NEW(E_Config, 1); 219 e_config = E_NEW(E_Config, 1);
214 e_config->config_version = E_CONFIG_FILE_VERSION; 220 e_config->config_version = E_CONFIG_FILE_VERSION;
215 e_config->show_splash = 1; 221 e_config->show_splash = 1;
216 e_config->desktop_default_background = strdup(PACKAGE_DATA_DIR"/data/themes/default.edj"); 222 e_config->desktop_default_background = strdup("");
217 e_config->menus_scroll_speed = 1000.0; 223 e_config->menus_scroll_speed = 1000.0;
218 e_config->menus_fast_mouse_move_threshhold = 300.0; 224 e_config->menus_fast_mouse_move_threshhold = 300.0;
219 e_config->menus_click_drag_timeout = DEF_MENUCLICK; 225 e_config->menus_click_drag_timeout = DEF_MENUCLICK;
@@ -272,6 +278,12 @@ e_config_init(void)
272 e_config->kill_timer_wait = 10.0; 278 e_config->kill_timer_wait = 10.0;
273 e_config->ping_clients = 1; 279 e_config->ping_clients = 1;
274 e_config->ping_clients_wait = 10.0; 280 e_config->ping_clients_wait = 10.0;
281 e_config->desktop_bg_start_transition = E_BG_TRANSITION_MODE_NONE;
282 e_config->desktop_bg_start_transition_time = 1.0;
283 e_config->desktop_bg_desk_transition = E_BG_TRANSITION_MODE_SINUSOUDAL_FADE;
284 e_config->desktop_bg_desk_transition_time = 0.5;
285 e_config->desktop_bg_change_transition = E_BG_TRANSITION_MODE_SINUSOUDAL_FADE;
286 e_config->desktop_bg_change_transition_time = 1.0;
275 287
276 { 288 {
277 E_Config_Module *em; 289 E_Config_Module *em;
@@ -802,6 +814,12 @@ e_config_init(void)
802 E_CONFIG_LIMIT(e_config->kill_timer_wait, 0.0, 120.0); 814 E_CONFIG_LIMIT(e_config->kill_timer_wait, 0.0, 120.0);
803 E_CONFIG_LIMIT(e_config->ping_clients, 0, 1); 815 E_CONFIG_LIMIT(e_config->ping_clients, 0, 1);
804 E_CONFIG_LIMIT(e_config->ping_clients_wait, 0.0, 120.0); 816 E_CONFIG_LIMIT(e_config->ping_clients_wait, 0.0, 120.0);
817 E_CONFIG_LIMIT(e_config->desktop_bg_start_transition, E_BG_TRANSITION_MODE_NONE, E_BG_TRANSITION_MODE_LAST);
818 E_CONFIG_LIMIT(e_config->desktop_bg_start_transition_time, 0.01, 60.0);
819 E_CONFIG_LIMIT(e_config->desktop_bg_desk_transition, E_BG_TRANSITION_MODE_NONE, E_BG_TRANSITION_MODE_LAST);
820 E_CONFIG_LIMIT(e_config->desktop_bg_desk_transition_time, 0.01, 60.0);
821 E_CONFIG_LIMIT(e_config->desktop_bg_change_transition, E_BG_TRANSITION_MODE_NONE, E_BG_TRANSITION_MODE_LAST);
822 E_CONFIG_LIMIT(e_config->desktop_bg_change_transition_time, 0.01, 60.0);
805 823
806 /* apply lang config - exception because config is loaded after intl setup */ 824 /* apply lang config - exception because config is loaded after intl setup */
807 825
diff --git a/src/bin/e_config.h b/src/bin/e_config.h
index 35311fd..7c7feae 100644
--- a/src/bin/e_config.h
+++ b/src/bin/e_config.h
@@ -46,7 +46,7 @@ typedef Eet_Data_Descriptor E_Config_DD;
46 * defaults for e to work - started at 100 when we introduced this config 46 * defaults for e to work - started at 100 when we introduced this config
47 * versioning feature 47 * versioning feature
48 */ 48 */
49#define E_CONFIG_FILE_VERSION 115 49#define E_CONFIG_FILE_VERSION 116
50 50
51#define E_EVAS_ENGINE_DEFAULT 0 51#define E_EVAS_ENGINE_DEFAULT 0
52#define E_EVAS_ENGINE_SOFTWARE_X11 1 52#define E_EVAS_ENGINE_SOFTWARE_X11 1
@@ -129,9 +129,14 @@ struct _E_Config
129 double kill_timer_wait; 129 double kill_timer_wait;
130 int ping_clients; 130 int ping_clients;
131 double ping_clients_wait; 131 double ping_clients_wait;
132 int desktop_bg_start_transition;
133 double desktop_bg_start_transition_time;
134 int desktop_bg_desk_transition;
135 double desktop_bg_desk_transition_time;
136 int desktop_bg_change_transition;
137 double desktop_bg_change_transition_time;
132}; 138};
133 139
134/* FIXME: all of thsie needs to become eet lumps for enmcode/decode */
135struct _E_Config_Module 140struct _E_Config_Module
136{ 141{
137 char *name; 142 char *name;
diff --git a/src/bin/e_desk.c b/src/bin/e_desk.c
index d6b4554..28f7490 100644
--- a/src/bin/e_desk.c
+++ b/src/bin/e_desk.c
@@ -71,7 +71,7 @@ void
71e_desk_show(E_Desk *desk) 71e_desk_show(E_Desk *desk)
72{ 72{
73 E_Border_List *bl; 73 E_Border_List *bl;
74 int x, y; 74 int x, y, was_zone = 0;
75 E_Event_Desk_Show *ev; 75 E_Event_Desk_Show *ev;
76 E_Border *bd; 76 E_Border *bd;
77 77
@@ -80,6 +80,7 @@ e_desk_show(E_Desk *desk)
80 if (desk->visible) return; 80 if (desk->visible) return;
81 81
82 bl = e_container_border_list_first(desk->zone->container); 82 bl = e_container_border_list_first(desk->zone->container);
83 if (desk->zone->bg_object) was_zone = 1;
83 while ((bd = e_container_border_list_next(bl))) 84 while ((bd = e_container_border_list_next(bl)))
84 { 85 {
85 if ((bd->desk->zone == desk->zone) && (!bd->iconic)) 86 if ((bd->desk->zone == desk->zone) && (!bd->iconic))
@@ -114,10 +115,16 @@ e_desk_show(E_Desk *desk)
114 evas_object_show(desk->bg_black_object); 115 evas_object_show(desk->bg_black_object);
115 desk->visible = 1; 116 desk->visible = 1;
116 117
118 if (was_zone)
119 e_bg_zone_update(desk->zone, E_BG_TRANSITION_CHANGE);
120 else
121 e_bg_zone_update(desk->zone, E_BG_TRANSITION_START);
122
117 ev = E_NEW(E_Event_Desk_Show, 1); 123 ev = E_NEW(E_Event_Desk_Show, 1);
118 ev->desk = desk; 124 ev->desk = desk;
119 e_object_ref(E_OBJECT(desk)); 125 e_object_ref(E_OBJECT(desk));
120 ecore_event_add(E_EVENT_DESK_SHOW, ev, _e_border_event_desk_show_free, NULL); 126 ecore_event_add(E_EVENT_DESK_SHOW, ev, _e_border_event_desk_show_free, NULL);
127
121} 128}
122 129
123void 130void
diff --git a/src/bin/e_includes.h b/src/bin/e_includes.h
index b274a7c..4cff9ff 100644
--- a/src/bin/e_includes.h
+++ b/src/bin/e_includes.h
@@ -50,3 +50,4 @@
50#include "e_alert.h" 50#include "e_alert.h"
51#include "e_maximize.h" 51#include "e_maximize.h"
52#include "e_grabinput.h" 52#include "e_grabinput.h"
53#include "e_bg.h"
diff --git a/src/bin/e_main.c b/src/bin/e_main.c
index 6c71390..bbbc0de 100644
--- a/src/bin/e_main.c
+++ b/src/bin/e_main.c
@@ -379,6 +379,13 @@ main(int argc, char **argv)
379 _e_main_shutdown(-1); 379 _e_main_shutdown(-1);
380 } 380 }
381 _e_main_shutdown_push(e_app_shutdown); 381 _e_main_shutdown_push(e_app_shutdown);
382 /* init theme system */
383 if (!e_theme_init())
384 {
385 e_error_message_show(_("Enlightenment cannot set up its theme system."));
386 _e_main_shutdown(-1);
387 }
388 _e_main_shutdown_push(e_theme_shutdown);
382 /* manage the root window */ 389 /* manage the root window */
383 if (!_e_main_screens_init()) 390 if (!_e_main_screens_init())
384 { 391 {
@@ -390,13 +397,6 @@ main(int argc, char **argv)
390 e_container_all_freeze(); 397 e_container_all_freeze();
391 398
392 _e_main_shutdown_push(_e_main_screens_shutdown); 399 _e_main_shutdown_push(_e_main_screens_shutdown);
393 /* init theme system */
394 if (!e_theme_init())
395 {
396 e_error_message_show(_("Enlightenment cannot set up its theme system."));
397 _e_main_shutdown(-1);
398 }
399 _e_main_shutdown_push(e_theme_shutdown);
400 400
401 401
402 /* tell the error system that it can use gui dialogs now */ 402 /* tell the error system that it can use gui dialogs now */
diff --git a/src/bin/e_theme.c b/src/bin/e_theme.c
index 9e93c11..70b9b3c 100644
--- a/src/bin/e_theme.c
+++ b/src/bin/e_theme.c
@@ -49,6 +49,7 @@ e_theme_init(void)
49 * 49 *
50 * other possible categories... 50 * other possible categories...
51 * e_theme_file_set("base/theme/borders", "default.edj"); 51 * e_theme_file_set("base/theme/borders", "default.edj");
52 * e_theme_file_set("base/theme/background", "default.edj");
52 * e_theme_file_set("base/theme/menus", "default.edj"); 53 * e_theme_file_set("base/theme/menus", "default.edj");
53 * e_theme_file_set("base/theme/error", "default.edj"); 54 * e_theme_file_set("base/theme/error", "default.edj");
54 * e_theme_file_set("base/theme/gadman", "default.edj"); 55 * e_theme_file_set("base/theme/gadman", "default.edj");
diff --git a/src/bin/e_zone.c b/src/bin/e_zone.c
index 7f3911e..e455709 100644
--- a/src/bin/e_zone.c
+++ b/src/bin/e_zone.c
@@ -47,6 +47,7 @@ e_zone_new(E_Container *con, int num, int x, int y, int w, int h)
47{ 47{
48 E_Zone *zone; 48 E_Zone *zone;
49 char name[40]; 49 char name[40];
50 Evas_Object *o;
50 51
51 zone = E_OBJECT_ALLOC(E_Zone, E_ZONE_TYPE, _e_zone_free); 52 zone = E_OBJECT_ALLOC(E_Zone, E_ZONE_TYPE, _e_zone_free);
52 if (!zone) return NULL; 53 if (!zone) return NULL;
@@ -80,44 +81,24 @@ e_zone_new(E_Container *con, int num, int x, int y, int w, int h)
80 81
81 con->zones = evas_list_append(con->zones, zone); 82 con->zones = evas_list_append(con->zones, zone);
82 83
83 if (1) 84 o = evas_object_rectangle_add(con->bg_evas);
84 { 85 zone->bg_clip_object = o;
85 char name[40]; 86 evas_object_move(o, x, y);
86 Evas_Object *o; 87 evas_object_resize(o, w, h);
87 88 evas_object_color_set(o, 255, 255, 255, 255);
88 o = evas_object_rectangle_add(con->bg_evas); 89 evas_object_repeat_events_set(o, 1);
89 zone->bg_clip_object = o; 90 evas_object_show(o);
90 evas_object_move(o, x, y); 91
91 evas_object_resize(o, w, h); 92 o = evas_object_rectangle_add(con->bg_evas);
92 evas_object_color_set(o, 255, 255, 255, 255); 93 zone->bg_event_object = o;
93 evas_object_repeat_events_set(o, 1); 94 evas_object_clip_set(o, zone->bg_clip_object);
94 evas_object_show(o); 95 evas_object_move(o, x, y);
95 96 evas_object_resize(o, w, h);
96 o = edje_object_add(con->bg_evas); 97 evas_object_color_set(o, 255, 255, 255, 0);
97 zone->bg_object = o; 98 evas_object_show(o);
98 evas_object_layer_set(o, -1); 99 evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN, _e_zone_cb_bg_mouse_down, zone);
99 snprintf(name, sizeof(name), "desktop/background/%d", zone->num); 100 evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_UP, _e_zone_cb_bg_mouse_up, zone);
100 evas_object_name_set(o, name); 101 evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_MOVE, _e_zone_cb_bg_mouse_move, zone);
101 evas_object_data_set(o, "e_zone", zone);
102 evas_object_move(o, x, y);
103 evas_object_resize(o, w, h);
104 edje_object_file_set(o,
105 e_config->desktop_default_background,
106 "desktop/background");
107 evas_object_clip_set(o, zone->bg_clip_object);
108 evas_object_show(o);
109
110 o = evas_object_rectangle_add(con->bg_evas);
111 zone->bg_event_object = o;
112 evas_object_clip_set(o, zone->bg_clip_object);
113 evas_object_move(o, x, y);
114 evas_object_resize(o, w, h);
115 evas_object_color_set(o, 255, 255, 255, 0);
116 evas_object_show(o);
117 evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN, _e_zone_cb_bg_mouse_down, zone);
118 evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_UP, _e_zone_cb_bg_mouse_up, zone);
119 evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_MOVE, _e_zone_cb_bg_mouse_move, zone);
120 }
121 102
122 zone->desk_x_count = 0; 103 zone->desk_x_count = 0;
123 zone->desk_y_count = 0; 104 zone->desk_y_count = 0;
@@ -239,17 +220,9 @@ e_zone_current_get(E_Container *con)
239void 220void
240e_zone_bg_reconfigure(E_Zone *zone) 221e_zone_bg_reconfigure(E_Zone *zone)
241{ 222{
242 Evas_Object *o;
243
244 E_OBJECT_CHECK(zone); 223 E_OBJECT_CHECK(zone);
245 E_OBJECT_TYPE_CHECK(zone, E_ZONE_TYPE); 224 E_OBJECT_TYPE_CHECK(zone, E_ZONE_TYPE);
246 o = zone->bg_object; 225 e_bg_zone_update(zone, E_BG_TRANSITION_CHANGE);
247 evas_object_hide(o);
248 edje_object_file_set(o,
249 e_config->desktop_default_background,
250 "desktop/background");
251 evas_object_layer_set(o, -1);
252 evas_object_show(o);
253} 226}
254 227
255void 228void
@@ -569,6 +542,8 @@ _e_zone_free(E_Zone *zone)
569 evas_object_del(zone->bg_event_object); 542 evas_object_del(zone->bg_event_object);
570 evas_object_del(zone->bg_clip_object); 543 evas_object_del(zone->bg_clip_object);
571 evas_object_del(zone->bg_object); 544 evas_object_del(zone->bg_object);
545 if (zone->prev_bg_object) evas_object_del(zone->prev_bg_object);
546 if (zone->bg_animator) ecore_animator_del(zone->bg_animator);
572 /* free desks */ 547 /* free desks */
573 for (x = 0; x < zone->desk_x_count; x++) 548 for (x = 0; x < zone->desk_x_count; x++)
574 { 549 {
diff --git a/src/bin/e_zone.h b/src/bin/e_zone.h
index 943172b..509b4ae 100644
--- a/src/bin/e_zone.h
+++ b/src/bin/e_zone.h
@@ -28,6 +28,11 @@ struct _E_Zone
28 Evas_Object *bg_object; 28 Evas_Object *bg_object;
29 Evas_Object *bg_event_object; 29 Evas_Object *bg_event_object;
30 Evas_Object *bg_clip_object; 30 Evas_Object *bg_clip_object;
31 Evas_Object *prev_bg_object;
32 Ecore_Animator *bg_animator;
33 double bg_set_time;
34 double bg_transition_time;
35 E_Bg_Transition_Mode bg_transition_mode;
31 36
32 int desk_x_count, desk_y_count; 37 int desk_x_count, desk_y_count;
33 int desk_x_current, desk_y_current; 38 int desk_x_current, desk_y_current;