summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/default/e.src2
-rw-r--r--config/mobile/e.src2
-rw-r--r--config/standard/e.src2
-rw-r--r--src/modules/wizard/page_150.c128
4 files changed, 33 insertions, 101 deletions
diff --git a/config/default/e.src b/config/default/e.src
index 64b702b75..c94d89e09 100644
--- a/config/default/e.src
+++ b/config/default/e.src
@@ -20,7 +20,7 @@ group "E_Config" struct {
20 value "zone_desks_y_count" int: 1; 20 value "zone_desks_y_count" int: 1;
21 value "show_desktop_icons" int: 1; 21 value "show_desktop_icons" int: 1;
22 value "edge_flip_dragging" int: 0; 22 value "edge_flip_dragging" int: 0;
23 value "use_composite" int: 0; 23 value "use_composite" int: 1;
24 value "no_module_delay" int: 1; 24 value "no_module_delay" int: 1;
25 group "modules" list { 25 group "modules" list {
26 group "E_Config_Module" struct { 26 group "E_Config_Module" struct {
diff --git a/config/mobile/e.src b/config/mobile/e.src
index 70d2767f0..98bf4b993 100644
--- a/config/mobile/e.src
+++ b/config/mobile/e.src
@@ -20,7 +20,7 @@ group "E_Config" struct {
20 value "zone_desks_y_count" int: 1; 20 value "zone_desks_y_count" int: 1;
21 value "show_desktop_icons" int: 1; 21 value "show_desktop_icons" int: 1;
22 value "edge_flip_dragging" int: 1; 22 value "edge_flip_dragging" int: 1;
23 value "use_composite" int: 0; 23 value "use_composite" int: 1;
24 value "language" string: "en_US.UTF-8"; 24 value "language" string: "en_US.UTF-8";
25 value "window_placement_policy" int: 0; 25 value "window_placement_policy" int: 0;
26 value "window_grouping" int: 0; 26 value "window_grouping" int: 0;
diff --git a/config/standard/e.src b/config/standard/e.src
index 3e384ea24..be39afc9f 100644
--- a/config/standard/e.src
+++ b/config/standard/e.src
@@ -20,7 +20,7 @@ group "E_Config" struct {
20 value "zone_desks_y_count" int: 1; 20 value "zone_desks_y_count" int: 1;
21 value "show_desktop_icons" int: 1; 21 value "show_desktop_icons" int: 1;
22 value "edge_flip_dragging" int: 1; 22 value "edge_flip_dragging" int: 1;
23 value "use_composite" int: 0; 23 value "use_composite" int: 1;
24 value "language" string: "en_US.UTF-8"; 24 value "language" string: "en_US.UTF-8";
25 value "window_placement_policy" int: 0; 25 value "window_placement_policy" int: 0;
26 value "window_grouping" int: 0; 26 value "window_grouping" int: 0;
diff --git a/src/modules/wizard/page_150.c b/src/modules/wizard/page_150.c
index 92d6e9c21..61044738f 100644
--- a/src/modules/wizard/page_150.c
+++ b/src/modules/wizard/page_150.c
@@ -5,7 +5,6 @@
5#define ENGINE_SW 1 5#define ENGINE_SW 1
6#define ENGINE_GL 2 6#define ENGINE_GL 2
7 7
8static int do_comp = 1;
9static int do_gl = 0; 8static int do_gl = 0;
10static int do_vsync = 0; 9static int do_vsync = 0;
11 10
@@ -45,20 +44,8 @@ match_xorg_log(const char *globbing)
45 } 44 }
46 return 0; 45 return 0;
47} 46}
48/*
49EAPI int
50wizard_page_init(E_Wizard_Page *pg __UNUSED__, Eina_Bool *need_xdg_desktops __UNUSED__, Eina_Bool *need_xdg_icons __UNUSED__)
51{
52 return 1;
53}
54 47
55EAPI int 48EAPI int
56wizard_page_shutdown(E_Wizard_Page *pg __UNUSED__)
57{
58 return 1;
59}
60*/
61EAPI int
62wizard_page_show(E_Wizard_Page *pg) 49wizard_page_show(E_Wizard_Page *pg)
63{ 50{
64 Evas_Object *o, *of, *ob; 51 Evas_Object *o, *of, *ob;
@@ -72,6 +59,9 @@ wizard_page_show(E_Wizard_Page *pg)
72 ecore_x_window_attributes_get(ecore_x_window_root_first_get(), &att); 59 ecore_x_window_attributes_get(ecore_x_window_root_first_get(), &att);
73 if ((att.depth <= 8)) return 0; 60 if ((att.depth <= 8)) return 0;
74 61
62 if (!ecore_evas_engine_type_supported_get(ECORE_EVAS_ENGINE_OPENGL_X11))
63 return 0;
64
75 ee = ecore_evas_gl_x11_new(NULL, 0, 0, 0, 320, 240); 65 ee = ecore_evas_gl_x11_new(NULL, 0, 0, 0, 320, 240);
76 if (ee) 66 if (ee)
77 { 67 {
@@ -89,110 +79,52 @@ wizard_page_show(E_Wizard_Page *pg)
89 } 79 }
90 80
91 o = e_widget_list_add(pg->evas, 1, 0); 81 o = e_widget_list_add(pg->evas, 1, 0);
92 e_wizard_title_set(_("Compositing")); 82 e_wizard_title_set(_("Engine"));
93
94 of = e_widget_framelist_add(pg->evas, _("Transparent windows and effects"), 0);
95
96 ob = e_widget_textblock_add(pg->evas);
97 e_widget_size_min_set(ob, 260 * e_scale, 200 * e_scale);
98 e_widget_textblock_markup_set
99 (ob,
100 _("Compositing provides translucency<br>"
101 "for windows, window effects like<br>"
102 "fading in and out and zooming<br>"
103 "when they appear and dissapear.<br>"
104 "It is highly recommended to<br>"
105 "enable this for a better<br>"
106 "experience, but it comes at a<br>"
107 "cost. It requires extra CPU<br>"
108 "or a GLSL Shader capable GPU<br>"
109 "with well written drivers.<br>"
110 "It also will add between 10 to<br>"
111 "100 MB to the memory needed<br>"
112 "for Enlightenment."
113 )
114 );
115 e_widget_framelist_object_append(of, ob);
116 83
117 ob = e_widget_check_add(pg->evas, _("Enable Compositing"), &(do_comp)); 84 of = e_widget_framelist_add(pg->evas, _("HW acceleration"), 0);
118 e_widget_framelist_object_append(of, ob);
119 85
120 if (ecore_evas_engine_type_supported_get(ECORE_EVAS_ENGINE_OPENGL_X11)) 86 ob = e_widget_check_add(pg->evas, _("Hardware Accelerated (OpenGL)"), &(do_gl));
121 { 87 e_widget_framelist_object_append(of, ob);
122 ob = e_widget_check_add(pg->evas, _("Hardware Accelerated (OpenGL)"), &(do_gl));
123 e_widget_framelist_object_append(of, ob);
124 88
125 ob = e_widget_check_add(pg->evas, _("Tear-free Rendering (OpenGL only)"), &(do_vsync)); 89 ob = e_widget_check_add(pg->evas, _("Tear-free Rendering (OpenGL only)"), &(do_vsync));
126 e_widget_framelist_object_append(of, ob); 90 e_widget_framelist_object_append(of, ob);
127 }
128 91
129 e_widget_list_object_append(o, of, 0, 0, 0.5); 92 e_widget_list_object_append(o, of, 0, 0, 0.5);
130
131 evas_object_show(of); 93 evas_object_show(of);
132
133 e_wizard_page_show(o); 94 e_wizard_page_show(o);
134// pg->data = o; 95
135 return 1; /* 1 == show ui, and wait for user, 0 == just continue */ 96 return 1; /* 1 == show ui, and wait for user, 0 == just continue */
136} 97}
137 98
138EAPI int 99EAPI int
139wizard_page_hide(E_Wizard_Page *pg __UNUSED__) 100wizard_page_hide(E_Wizard_Page *pg __UNUSED__)
140{ 101{
141 if (!do_comp) 102 E_Config_DD *conf_edd = NULL;
142 { 103 E_Config_DD *conf_match_edd = NULL;
143 E_Config_Module *em; 104 Config *cfg = NULL;
144 Eina_List *l;
145 105
146 EINA_LIST_FOREACH(e_config->modules, l, em) 106 e_mod_comp_cfdata_edd_init(&(conf_edd), &(conf_match_edd));
147 { 107 cfg = e_mod_comp_cfdata_config_new();
148 if (!em->name) continue; 108
149 if (!strcmp(em->name, "comp")) 109 if (do_gl)
150 { 110 {
151 e_config->modules = eina_list_remove_list 111 cfg->engine = ENGINE_GL;
152 (e_config->modules, l); 112 cfg->smooth_windows = 1;
153 if (em->name) eina_stringshare_del(em->name); 113 cfg->vsync = do_vsync;
154 free(em);
155 break;
156 }
157 }
158 e_config->use_composite = 0;
159 } 114 }
160 else 115 else
161 { 116 {
162 E_Config_DD *conf_edd = NULL; 117 cfg->engine = ENGINE_SW;
163 E_Config_DD *conf_match_edd = NULL; 118 cfg->smooth_windows = 0;
164 Config *cfg = NULL; 119 cfg->vsync = 0;
120 }
165 121
166 e_config->use_composite = 1; 122 e_config_domain_save("module.comp", conf_edd, cfg);
167 e_mod_comp_cfdata_edd_init(&(conf_edd), &(conf_match_edd)); 123 E_CONFIG_DD_FREE(conf_match_edd);
168 cfg = e_mod_comp_cfdata_config_new(); 124 E_CONFIG_DD_FREE(conf_edd);
125 e_mod_cfdata_config_free(cfg);
169 126
170 if (do_gl)
171 {
172 cfg->engine = ENGINE_GL;
173 cfg->smooth_windows = 1;
174 cfg->vsync = do_vsync;
175 }
176 else
177 {
178 cfg->engine = ENGINE_SW;
179 cfg->smooth_windows = 0;
180 cfg->vsync = 0;
181 }
182
183 e_config_domain_save("module.comp", conf_edd, cfg);
184 E_CONFIG_DD_FREE(conf_match_edd);
185 E_CONFIG_DD_FREE(conf_edd);
186 e_mod_cfdata_config_free(cfg);
187 }
188 e_config_save_queue(); 127 e_config_save_queue();
189// if (pg->data) evas_object_del(pg->data); 128
190 return 1;
191}
192/*
193EAPI int
194wizard_page_apply(E_Wizard_Page *pg __UNUSED__)
195{
196 return 1; 129 return 1;
197} 130}
198*/