aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2013-02-22 09:33:13 +0000
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2013-02-22 09:33:13 +0000
commit12ffdeb62271defd41e2384e10cda3bfe0bf52e3 (patch)
treee5a8eed1e913d8a3ef4c5939029e561ffea16e97
parent49b3a40eb0661e09bb842904fa1cfa0fc3088c1e (diff)
downloadenlightenment-12ffdeb62271defd41e2384e10cda3bfe0bf52e3.tar.gz
enlightenment-12ffdeb62271defd41e2384e10cda3bfe0bf52e3.tar.xz
enlightenment-12ffdeb62271defd41e2384e10cda3bfe0bf52e3.zip
e's compositor now obeys _NET_WM_WINDOW_OPACITY as a normal atom in e_border
additionally: * actions are now available for setting/changing window opacity * window remembers can now remember window opacity SVN revision: 84303
-rw-r--r--ChangeLog4
-rw-r--r--NEWS1
-rw-r--r--src/bin/e_border.c65
-rw-r--r--src/bin/e_border.h4
-rw-r--r--src/bin/e_comp.c144
-rw-r--r--src/bin/e_comp.h3
-rw-r--r--src/bin/e_int_border_remember.c16
-rw-r--r--src/bin/e_main.c22
-rw-r--r--src/bin/e_remember.c8
-rw-r--r--src/bin/e_remember.h2
10 files changed, 193 insertions, 76 deletions
diff --git a/ChangeLog b/ChangeLog
index 7012b7330..5c41b9de8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-02-22 Mike Blumenkrantz
+
+ * compositor now allows user changing/remembering of object opacity
+
2013-02-20 Mike Blumenkrantz
* toolbar gadgets no longer crash when trying to display a popup
diff --git a/NEWS b/NEWS
index 9ecd22b73..810131707 100644
--- a/NEWS
+++ b/NEWS
@@ -113,6 +113,7 @@ Improvements:
* e_popup is now a wrapper for drawing objects onto the compositor canvas
* compositor nocomp mode now dynamically enables/disables based on the state and stacking of fullscreen windows and comp objects
* e_util_size_debug_set now displays delete events
+ * compositor now allows user changing/remembering of object opacity
Fixes:
* IBar menu didn't allow to configure different icon sources, show contents menu even on empty IBar.
diff --git a/src/bin/e_border.c b/src/bin/e_border.c
index e4b50c4c2..7a983d194 100644
--- a/src/bin/e_border.c
+++ b/src/bin/e_border.c
@@ -71,11 +71,7 @@ static Eina_Bool _e_border_cb_window_focus_in(void *data,
static Eina_Bool _e_border_cb_window_focus_out(void *data,
int ev_type,
void *ev);
-#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
-static Eina_Bool _e_border_cb_client_message(void *data,
- int ev_type,
- void *ev);
-#endif
+static Eina_Bool _e_border_cb_client_message(void *data, int ev_type, void *ev);
static Eina_Bool _e_border_cb_window_state_request(void *data,
int ev_type,
void *ev);
@@ -322,10 +318,8 @@ e_border_init(void)
_e_border_cb_window_focus_in, NULL);
E_LIST_HANDLER_APPEND(handlers, ECORE_X_EVENT_WINDOW_FOCUS_OUT,
_e_border_cb_window_focus_out, NULL);
-#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
E_LIST_HANDLER_APPEND(handlers, ECORE_X_EVENT_CLIENT_MESSAGE,
_e_border_cb_client_message, NULL);
-#endif
E_LIST_HANDLER_APPEND(handlers, ECORE_X_EVENT_WINDOW_STATE_REQUEST,
_e_border_cb_window_state_request, NULL);
E_LIST_HANDLER_APPEND(handlers, ECORE_X_EVENT_WINDOW_MOVE_RESIZE_REQUEST,
@@ -634,6 +628,8 @@ e_border_new(E_Container *con,
{
bd->client.netwm.fetch.state = 1;
}
+ else if (atoms[i] == ECORE_X_ATOM_NET_WM_WINDOW_OPACITY)
+ bd->client.netwm.fetch.opacity = 1;
}
/* other misc atoms */
for (i = 0; i < at_num; i++)
@@ -5951,6 +5947,16 @@ _e_border_cb_window_property(void *data __UNUSED__,
bd->client.netwm.fetch.state = 1;
bd->changed = 1;
}
+ else if (e->atom == ECORE_X_ATOM_NET_WM_WINDOW_OPACITY)
+ {
+ if (bd->client.netwm.opacity_changed)
+ bd->client.netwm.opacity_changed = 0;
+ else
+ {
+ bd->client.netwm.fetch.opacity = 1;
+ bd->changed = 1;
+ }
+ }
#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
else if (e->atom == ECORE_X_ATOM_E_WINDOW_PROFILE_SUPPORTED)
{
@@ -6186,28 +6192,31 @@ _e_border_cb_window_focus_out(void *data __UNUSED__,
return ECORE_CALLBACK_PASS_ON;
}
-#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
static Eina_Bool
-_e_border_cb_client_message(void *data __UNUSED__,
- int ev_type __UNUSED__,
- void *ev)
+_e_border_cb_client_message(void *data __UNUSED__, int ev_type __UNUSED__, void *ev)
{
E_Border *bd;
- Ecore_X_Event_Client_Message *e;
- char *profile = NULL;
-
- e = (Ecore_X_Event_Client_Message *)ev;
+ Ecore_X_Event_Client_Message *e = ev;
+
bd = e_border_find_by_client_window(e->win);
if (!bd) return ECORE_CALLBACK_PASS_ON;
- if (e->message_type == ECORE_X_ATOM_E_WINDOW_PROFILE_CHANGE)
+ if (e->message_type == ECORE_X_ATOM_NET_WM_WINDOW_OPACITY)
+ {
+ bd->client.netwm.fetch.opacity = 1;
+ bd->changed = 1;
+ }
+#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
+ else if (e->message_type == ECORE_X_ATOM_E_WINDOW_PROFILE_CHANGE)
{
if (bd->client.e.state.profile.use)
{
+ char *profile;
profile = ecore_x_atom_name_get(e->data.l[1]);
ecore_x_e_window_profile_change_request_send(bd->client.win,
profile);
bd->client.e.state.profile.wait_for_done = 1;
+ free(profile);
}
}
else if (e->message_type == ECORE_X_ATOM_E_WINDOW_PROFILE_CHANGE_DONE)
@@ -6217,29 +6226,25 @@ _e_border_cb_client_message(void *data __UNUSED__,
{
E_Container *con = bd->zone->container;
E_Desk *desk = NULL;
+ char *profile;
profile = ecore_x_atom_name_get(e->data.l[1]);
if (profile)
- {
- if (bd->client.e.state.profile.name)
- eina_stringshare_del(bd->client.e.state.profile.name);
- bd->client.e.state.profile.name = eina_stringshare_add(profile);
- }
+ eina_stringshare_replace(&bd->client.e.state.profile.name, profile);
bd->client.e.state.profile.wait_for_done = 0;
desk = e_container_desk_window_profile_get(con, profile);
if ((desk) && (bd->desk != desk))
e_border_desk_set(bd, desk);
+ free(profile);
}
}
-
- free(profile);
+#endif
return ECORE_CALLBACK_PASS_ON;
}
-#endif
static Eina_Bool
_e_border_cb_window_state_request(void *data __UNUSED__,
int ev_type __UNUSED__,
@@ -7726,6 +7731,13 @@ _e_border_eval0(E_Border *bd)
bd->client.netwm.fetch.icon_name = 0;
rem_change = 1;
}
+ if (bd->client.netwm.fetch.opacity)
+ {
+ unsigned int val;
+
+ if (ecore_x_window_prop_card32_get(bd->client.win, ECORE_X_ATOM_NET_WM_WINDOW_OPACITY, &val, 1) > 0)
+ bd->client.netwm.opacity = (val >> 24);
+ }
if (bd->client.netwm.fetch.icon)
{
int i;
@@ -8460,6 +8472,11 @@ _e_border_eval0(E_Border *bd)
bd->changes.prop = 0;
if (rem_change) e_remember_update(bd);
+ /* the below function updates the border's remember
+ * and relevant netwm atom
+ * ...eventually
+ */
+ e_comp_win_opacity_set(bd->cw, bd->client.netwm.opacity);
if (change_urgent)
{
diff --git a/src/bin/e_border.h b/src/bin/e_border.h
index 078f2f069..19a4358ca 100644
--- a/src/bin/e_border.h
+++ b/src/bin/e_border.h
@@ -192,6 +192,7 @@ struct _E_Border
int l, r, t, b;
} client_inset;
+ E_Comp_Win *cw;
Ecore_Evas *bg_ecore_evas;
Evas *bg_evas;
Ecore_X_Window bg_win;
@@ -295,6 +296,8 @@ struct _E_Border
Ecore_X_Icon *icons;
int num_icons;
unsigned int user_time;
+ unsigned char opacity;
+ Eina_Bool opacity_changed : 1; // prevent fetching opacity next prop change
struct
{
int left;
@@ -365,6 +368,7 @@ struct _E_Border
unsigned char strut : 1;
unsigned char type : 1;
unsigned char state : 1;
+ unsigned char opacity : 1;
/* No, fetch on new_client, shouldn't be changed after map.
unsigned char pid : 1;
*/
diff --git a/src/bin/e_comp.c b/src/bin/e_comp.c
index 4f79c72a1..f9dfc3b63 100644
--- a/src/bin/e_comp.c
+++ b/src/bin/e_comp.c
@@ -17,7 +17,6 @@
// 3. for unmapped windows - when window goes out of unmapped comp cache
// make a miniature copy (1/4 width+height?) and set property on window
// with pixmap id
-// 8. obey transparent property
// 9. shortcut lots of stuff to draw inside the compositor - shelf,
// wallpaper, efm - hell even menus and anything else in e (this is what
// e18 was mostly about)
@@ -31,6 +30,7 @@ static Eina_Hash *windows = NULL;
static Eina_Hash *borders = NULL;
static Eina_Hash *damages = NULL;
static Eina_Hash *ignores = NULL;
+static Eina_List *actions = NULL;
static E_Comp_Config *conf = NULL;
static E_Config_DD *conf_edd = NULL;
@@ -1484,6 +1484,7 @@ _e_comp_object_del(void *data, void *obj)
ecore_x_sync_counter_inc(cw->counter, 1);
}
if (cw->bd) eina_hash_del(borders, e_util_winid_str_get(cw->bd->client.win), cw);
+ cw->bd->cw = NULL;
cw->bd = NULL;
evas_object_data_del(cw->shobj, "border");
// hmm - lockup?
@@ -2023,6 +2024,7 @@ _e_comp_win_add(E_Comp *c, Ecore_X_Window win)
eina_hash_add(borders, e_util_winid_str_get(cw->bd->client.win), cw);
cw->dfn = e_object_delfn_add(E_OBJECT(cw->bd), _e_comp_object_del, cw);
cw->shape = cw->bd->shape;
+ cw->bd->cw = cw;
// setup on show
// _e_comp_win_sync_setup(cw, cw->bd->client.win);
}
@@ -2194,6 +2196,7 @@ _e_comp_win_del(E_Comp_Win *cw)
e_object_unref(E_OBJECT(cw->eobj));
cw->eobj = NULL;
}
+ E_FN_DEL(ecore_timer_del, cw->opacity_set_timer);
if (cw->animating)
{
cw->c->animating--;
@@ -2219,6 +2222,7 @@ _e_comp_win_del(E_Comp_Win *cw)
{
eina_hash_del(borders, e_util_winid_str_get(cw->bd->client.win), cw);
e_object_delfn_del(E_OBJECT(cw->bd), cw->dfn);
+ cw->bd->cw = NULL;
cw->bd = NULL;
}
else if (cw->pop)
@@ -2886,32 +2890,6 @@ _e_comp_stack(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
return ECORE_CALLBACK_PASS_ON;
}
-static void
-_e_comp_win_opacity_set(E_Comp_Win *cw)
-{
- unsigned int val;
-
- if (ecore_x_window_prop_card32_get(cw->win, ECORE_X_ATOM_NET_WM_WINDOW_OPACITY, &val, 1) > 0)
- {
- cw->opacity = (val >> 24);
- evas_object_color_set(cw->shobj, cw->opacity, cw->opacity, cw->opacity, cw->opacity);
- }
-}
-
-static Eina_Bool
-_e_comp_property(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSED)
-{
- Ecore_X_Event_Window_Property *ev = event;
-
- if (ev->atom == ECORE_X_ATOM_NET_WM_WINDOW_OPACITY)
- {
- E_Comp_Win *cw = _e_comp_win_find(ev->win);
- if (!cw) return ECORE_CALLBACK_PASS_ON;
- _e_comp_win_opacity_set(cw);
- }
- return ECORE_CALLBACK_PASS_ON;
-}
-
static Eina_Bool
_e_comp_message(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
{
@@ -2920,14 +2898,6 @@ _e_comp_message(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
int version, w = 0, h = 0;
Eina_Bool force = 0;
- if (ev->message_type == ECORE_X_ATOM_NET_WM_WINDOW_OPACITY)
- {
- cw = _e_comp_win_find(ev->win);
- if (!cw) return ECORE_CALLBACK_PASS_ON;
- _e_comp_win_opacity_set(cw);
- return ECORE_CALLBACK_PASS_ON;
- }
-
if ((ev->message_type != ECORE_X_ATOM_E_COMP_SYNC_DRAW_DONE) ||
(ev->format != 32)) return ECORE_CALLBACK_PASS_ON;
version = ev->data.l[1];
@@ -4515,6 +4485,77 @@ _e_comp_cfg_init(void)
e_configure_option_category_icon_set(_("composite"), "preferences-composite");
}
+static Eina_Bool
+_e_comp_opacity_set_timer_cb(E_Comp_Win *cw)
+{
+ unsigned int opacity;
+
+ cw->bd->client.netwm.opacity = cw->opacity;
+ e_remember_update(cw->bd);
+ opacity = (cw->opacity << 24);
+ ecore_x_window_prop_card32_set(cw->bd->client.win, ECORE_X_ATOM_NET_WM_WINDOW_OPACITY, &opacity, 1);
+ cw->bd->client.netwm.opacity_changed = 1;
+ cw->opacity_set_timer = NULL;
+ return EINA_FALSE;
+}
+
+static E_Comp_Win *
+_e_comp_act_opacity_win_finder(E_Object *obj)
+{
+ E_Border *bd;
+
+ switch (obj->type)
+ {
+ case E_WIN_TYPE:
+ bd = ((E_Win*)obj)->border;
+ if (!bd) return NULL;
+ return _e_comp_border_client_find(bd->client.win);
+ case E_BORDER_TYPE:
+ bd = (E_Border*)obj;
+ return _e_comp_border_client_find(bd->client.win);
+ case E_POPUP_TYPE:
+ return evas_object_data_get(((E_Popup*)obj)->content, "comp_win");
+ default:
+ case E_ZONE_TYPE:
+ case E_CONTAINER_TYPE:
+ case E_MANAGER_TYPE:
+ case E_MENU_TYPE:
+ bd = e_border_focused_get();
+ if (bd) return _e_comp_border_client_find(bd->client.win);
+ }
+ return NULL;
+}
+
+static void
+_e_comp_act_opacity_change_go(E_Object *obj, const char *params)
+{
+ int opacity;
+ E_Comp_Win *cw;
+
+ if ((!params) || (!params[0])) return;
+ cw = _e_comp_act_opacity_win_finder(obj);
+ if (!cw) return;
+ opacity = atoi(params);
+ opacity = E_CLAMP(opacity, -255, 255);
+ opacity += cw->opacity;
+ opacity = MAX(0, opacity);
+ e_comp_win_opacity_set(cw, opacity);
+}
+
+static void
+_e_comp_act_opacity_set_go(E_Object * obj __UNUSED__, const char *params)
+{
+ int opacity;
+ E_Comp_Win *cw;
+
+ if ((!params) || (!params[0])) return;
+ cw = _e_comp_act_opacity_win_finder(obj);
+ if (!cw) return;
+ opacity = atoi(params);
+ opacity = E_CLAMP(opacity, 0, 255);
+ e_comp_win_opacity_set(cw, opacity);
+}
+
//////////////////////////////////////////////////////////////////////////
EINTERN Eina_Bool
@@ -4555,7 +4596,6 @@ e_comp_init(void)
E_LIST_HANDLER_APPEND(handlers, ECORE_X_EVENT_WINDOW_REPARENT, _e_comp_reparent, NULL);
E_LIST_HANDLER_APPEND(handlers, ECORE_X_EVENT_WINDOW_CONFIGURE, _e_comp_configure, NULL);
E_LIST_HANDLER_APPEND(handlers, ECORE_X_EVENT_WINDOW_STACK, _e_comp_stack, NULL);
- E_LIST_HANDLER_APPEND(handlers, ECORE_X_EVENT_WINDOW_PROPERTY, _e_comp_property, NULL);
E_LIST_HANDLER_APPEND(handlers, ECORE_X_EVENT_CLIENT_MESSAGE, _e_comp_message, NULL);
E_LIST_HANDLER_APPEND(handlers, ECORE_X_EVENT_WINDOW_SHAPE, _e_comp_shape, NULL);
E_LIST_HANDLER_APPEND(handlers, ECORE_X_EVENT_DAMAGE_NOTIFY, _e_comp_damage, NULL);
@@ -4609,6 +4649,23 @@ e_comp_init(void)
gl_avail = EINA_TRUE;
}
+ {
+ E_Action *act;
+
+ act = e_action_add("opacity_change");
+ act->func.go = _e_comp_act_opacity_change_go;
+ e_action_predef_name_set(N_("Compositor"),
+ N_("Change current window opacity"), "opacity_change",
+ NULL, "syntax: +/- the amount to change opacity by (>0 for more opaque)", 1);
+ actions = eina_list_append(actions, act);
+ act = e_action_add("opacity_set");
+ act->func.go = _e_comp_act_opacity_set_go;
+ e_action_predef_name_set(N_("Compositor"),
+ N_("Set current window opacity"), "opacity_set",
+ "255", "syntax: number between 0-255 to set for transparent-opaque", 1);
+ actions = eina_list_append(actions, act);
+ }
+
#ifdef HAVE_WAYLAND_CLIENTS
if (!e_comp_wl_init())
EINA_LOG_ERR("Failed to initialize Wayland Client Support !!");
@@ -4642,6 +4699,7 @@ e_comp_shutdown(void)
E_FN_DEL(ecore_timer_del, action_timeout);
E_FREE_LIST(compositors, _e_comp_del);
E_FREE_LIST(handlers, ecore_event_handler_del);
+ E_FREE_LIST(actions, e_object_del);
#ifdef HAVE_WAYLAND_CLIENTS
e_comp_wl_shutdown();
@@ -5079,6 +5137,20 @@ e_comp_ignore_win_add(Ecore_X_Window win)
eina_hash_add(ignores, e_util_winid_str_get(win), (void*)1);
}
+EAPI void
+e_comp_win_opacity_set(E_Comp_Win *cw, unsigned int opacity)
+{
+ EINA_SAFETY_ON_NULL_RETURN(cw);
+ if (opacity == cw->opacity) return;
+ opacity = MIN(opacity, 255);
+ cw->opacity = opacity;
+ if (cw->bd)
+ {
+ if (cw->opacity_set_timer) ecore_timer_reset(cw->opacity_set_timer);
+ else cw->opacity_set_timer = ecore_timer_add(5.0, (Ecore_Task_Cb)_e_comp_opacity_set_timer_cb, cw);
+ }
+ evas_object_color_set(cw->shobj, cw->opacity, cw->opacity, cw->opacity, cw->opacity);
+}
EAPI void
e_comp_override_del(E_Comp *c)
diff --git a/src/bin/e_comp.h b/src/bin/e_comp.h
index 823212aa7..7aef22ac9 100644
--- a/src/bin/e_comp.h
+++ b/src/bin/e_comp.h
@@ -145,6 +145,7 @@ struct _E_Comp_Win
int pending_count; // pending event count
unsigned int opacity; // opacity set with _NET_WM_WINDOW_OPACITY
+ Ecore_Timer *opacity_set_timer; // timer for setting opacity in ecore-x to avoid roundtrips
char *title, *name, *clas, *role; // fetched for override-redirect windowa
Ecore_X_Window_Type primary_type; // fetched for override-redirect windowa
@@ -227,7 +228,7 @@ EAPI E_Comp_Win *e_comp_win_find(Ecore_X_Window win);
EAPI const Eina_List *e_comp_win_list_get(E_Comp *c);
EAPI Evas_Object *e_comp_win_image_mirror_add(E_Comp_Win *cw);
EAPI void e_comp_win_hidden_set(E_Comp_Win *cw, Eina_Bool hidden);
-
+EAPI void e_comp_win_opacity_set(E_Comp_Win *cw, unsigned int opacity);
EAPI E_Comp *e_comp_get(void *o);
diff --git a/src/bin/e_int_border_remember.c b/src/bin/e_int_border_remember.c
index 5d8b76f52..17ce596c9 100644
--- a/src/bin/e_int_border_remember.c
+++ b/src/bin/e_int_border_remember.c
@@ -18,7 +18,7 @@ static Evas_Object *_advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E
E_REMEMBER_APPLY_DESKTOP | E_REMEMBER_APPLY_SHADE | E_REMEMBER_APPLY_ZONE | \
E_REMEMBER_APPLY_SKIP_WINLIST | E_REMEMBER_APPLY_SKIP_PAGER | \
E_REMEMBER_APPLY_SKIP_TASKBAR | E_REMEMBER_APPLY_FULLSCREEN | E_REMEMBER_APPLY_ICON_PREF | \
- E_REMEMBER_APPLY_OFFER_RESISTANCE
+ E_REMEMBER_APPLY_OFFER_RESISTANCE | E_REMEMBER_APPLY_OPACITY
struct _E_Config_Dialog_Data
{
E_Border *border;
@@ -61,6 +61,7 @@ struct _E_Config_Dialog_Data
int set_focus_on_start;
int keep_settings;
int offer_resistance;
+ int apply_opacity;
} remember;
int applied;
@@ -275,6 +276,8 @@ _fill_data(E_Config_Dialog_Data *cfdata)
cfdata->remember.set_focus_on_start = 1;
if (rem->apply & E_REMEMBER_APPLY_OFFER_RESISTANCE)
cfdata->remember.offer_resistance = 1;
+ if (rem->apply & E_REMEMBER_APPLY_OPACITY)
+ cfdata->remember.apply_opacity = 1;
}
if (!rem) cfdata->mode = MODE_NOTHING;
@@ -604,6 +607,8 @@ _advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
rem->apply |= E_REMEMBER_SET_FOCUS_ON_START;
if (cfdata->remember.offer_resistance)
rem->apply |= E_REMEMBER_APPLY_OFFER_RESISTANCE;
+ if (cfdata->remember.apply_opacity)
+ rem->apply |= E_REMEMBER_APPLY_OPACITY;
if (bd && (!rem->apply && !rem->prop.desktop_file))
{
@@ -733,6 +738,7 @@ _advanced_create_widgets(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_D
e_widget_toolbook_page_append(o, NULL, _("Identifiers"), of, 1, 1, 1, 1, 0.5, 0.0);
of = e_widget_table_add(evas, 0);
+ e_widget_table_freeze(of);
ob = e_widget_check_add(evas, _("Position"),
&(cfdata->remember.apply_pos));
e_widget_table_object_append(of, ob, 0, 0, 1, 1, 1, 0, 1, 0);
@@ -778,12 +784,15 @@ _advanced_create_widgets(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_D
ob = e_widget_check_add(evas, _("Offer Resistance"),
&(cfdata->remember.offer_resistance));
e_widget_table_object_append(of, ob, 1, 7, 1, 1, 1, 0, 1, 0);
+ ob = e_widget_check_add(evas, _("Opacity"),
+ &(cfdata->remember.apply_opacity));
+ e_widget_table_object_append(of, ob, 0, 7, 1, 1, 1, 0, 1, 0);
oc = e_widget_check_add(evas, _("Application file or name (.desktop)"),
&(cfdata->remember.apply_desktop_file));
- e_widget_table_object_append(of, oc, 0, 7, 1, 1, 1, 0, 1, 0);
+ e_widget_table_object_append(of, oc, 0, 8, 1, 1, 1, 0, 1, 0);
ob = e_widget_entry_add(evas, &cfdata->desktop, NULL, NULL, NULL);
e_widget_check_widget_disable_on_unchecked_add(oc, ob);
- e_widget_table_object_append(of, ob, 0, 8, 2, 1, 1, 0, 1, 0);
+ e_widget_table_object_append(of, ob, 0, 9, 2, 1, 1, 0, 1, 0);
e_widget_toolbook_page_append(o, NULL, _("Properties"), of, 1, 1, 1, 1, 0.5, 0.0);
of = e_widget_table_add(evas, 0);
@@ -805,6 +814,7 @@ _advanced_create_widgets(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_D
&(cfdata->remember.apply_run));
e_widget_table_object_append(of, ob, 0, 3, 1, 1, 1, 0, 1, 0);
}
+ e_widget_table_thaw(of);
e_widget_toolbook_page_append(o, NULL, _("Options"), of, 1, 1, 1, 1, 0.5, 0.0);
e_widget_toolbook_page_show(o, 0);
diff --git a/src/bin/e_main.c b/src/bin/e_main.c
index 114358b57..7629d9d0e 100644
--- a/src/bin/e_main.c
+++ b/src/bin/e_main.c
@@ -674,6 +674,17 @@ main(int argc, char **argv)
e_screensaver_preinit();
if (e_config->show_splash)
+ e_init_status_set(_("Setup Actions"));
+ TS("E_Actions Init");
+ if (!e_actions_init())
+ {
+ e_error_message_show(_("Enlightenment cannot set up its actions system.\n"));
+ _e_main_shutdown(-1);
+ }
+ TS("E_Actions Init Done");
+ _e_main_shutdown_push(e_actions_shutdown);
+
+ if (e_config->show_splash)
e_init_status_set(_("Setup Screens"));
TS("Screens Init");
if (!_e_main_screens_init())
@@ -788,17 +799,6 @@ main(int argc, char **argv)
_e_main_shutdown_push(e_sys_shutdown);
if (e_config->show_splash)
- e_init_status_set(_("Setup Actions"));
- TS("E_Actions Init");
- if (!e_actions_init())
- {
- e_error_message_show(_("Enlightenment cannot set up its actions system.\n"));
- _e_main_shutdown(-1);
- }
- TS("E_Actions Init Done");
- _e_main_shutdown_push(e_actions_shutdown);
-
- if (e_config->show_splash)
e_init_status_set(_("Setup Execution System"));
TS("E_Exec Init");
if (!e_exec_init())
diff --git a/src/bin/e_remember.c b/src/bin/e_remember.c
index 285ae1b00..c582b852d 100644
--- a/src/bin/e_remember.c
+++ b/src/bin/e_remember.c
@@ -117,7 +117,8 @@ e_remember_internal_save(void)
E_REMEMBER_APPLY_SKIP_WINLIST |
E_REMEMBER_APPLY_SKIP_PAGER |
E_REMEMBER_APPLY_SKIP_TASKBAR |
- E_REMEMBER_APPLY_OFFER_RESISTANCE);
+ E_REMEMBER_APPLY_OFFER_RESISTANCE |
+ E_REMEMBER_APPLY_OPACITY);
_e_remember_update(bd, rem);
remembers->list = eina_list_append(remembers->list, rem);
@@ -453,6 +454,8 @@ _e_remember_update(E_Border *bd, E_Remember *rem)
rem->prop.fullscreen = bd->fullscreen;
if (rem->apply & E_REMEMBER_APPLY_OFFER_RESISTANCE)
rem->prop.offer_resistance = bd->offer_resistance;
+ if (rem->apply & E_REMEMBER_APPLY_OPACITY)
+ rem->prop.opacity = bd->client.netwm.opacity;
rem->no_reopen = bd->internal_no_reopen;
{
E_Event_Remember_Update *ev;
@@ -899,6 +902,8 @@ _e_remember_cb_hook_pre_post_fetch(void *data __UNUSED__, void *border)
bd->offer_resistance = rem->prop.offer_resistance;
if (rem->apply & E_REMEMBER_SET_FOCUS_ON_START)
bd->want_focus = 1;
+ if (rem->apply & E_REMEMBER_APPLY_OPACITY)
+ bd->client.netwm.opacity = rem->prop.opacity;
if (temporary)
_e_remember_free(rem);
@@ -972,6 +977,7 @@ _e_remember_init_edd(void)
E_CONFIG_VAL(D, T, prop.icon_preference, UCHAR);
E_CONFIG_VAL(D, T, prop.desktop_file, STR);
E_CONFIG_VAL(D, T, prop.offer_resistance, UCHAR);
+ E_CONFIG_VAL(D, T, prop.opacity, UCHAR);
#undef T
#undef D
e_remember_list_edd = E_CONFIG_DD_NEW("E_Remember_List", E_Remember_List);
diff --git a/src/bin/e_remember.h b/src/bin/e_remember.h
index 7b6f3d746..c5d79cbf7 100644
--- a/src/bin/e_remember.h
+++ b/src/bin/e_remember.h
@@ -32,6 +32,7 @@ typedef struct _E_Remember E_Remember;
#define E_REMEMBER_SET_FOCUS_ON_START (1 << 14)
#define E_REMEMBER_APPLY_FULLSCREEN (1 << 15)
#define E_REMEMBER_APPLY_OFFER_RESISTANCE (1 << 16)
+#define E_REMEMBER_APPLY_OPACITY (1 << 17)
#define E_REMEMBER_INTERNAL_DIALOGS (1 << 0)
#define E_REMEMBER_INTERNAL_FM_WINS (1 << 1)
@@ -104,6 +105,7 @@ struct _E_Remember
int head;
const char *command;
const char *desktop_file;
+ unsigned char opacity;
} prop;
};