Compare commits
48 Commits
master
...
enlightenm
Author | SHA1 | Date |
---|---|---|
Carsten Haitzler | 27dcd2d755 | |
Carsten Haitzler | 59dba6192a | |
Marcel Hollerbach | caaff77b42 | |
Marcel Hollerbach | d42adad715 | |
Marcel Hollerbach | 6a3648a5fd | |
Carsten Haitzler | d311403947 | |
Carsten Haitzler | b45d7b9ba3 | |
Carsten Haitzler | 5242f90ea1 | |
Carsten Haitzler | 5d69d2be2e | |
Alastair Poole | 1e3fcd263e | |
Alastair Poole | 782c09bf7f | |
Carsten Haitzler | 3068e261e0 | |
Carsten Haitzler | 74ba5e1604 | |
Carsten Haitzler | 84d7e796a2 | |
Christopher Michael | 099d42c02f | |
Carsten Haitzler | 3b377bac00 | |
Carsten Haitzler | 9cfdc04f12 | |
Carsten Haitzler | a0d4d2cf0a | |
Carsten Haitzler | f1fe06edbb | |
Carsten Haitzler | 84bf7fc2fa | |
Carsten Haitzler | d100938c07 | |
Carsten Haitzler | 70a70658cd | |
Carsten Haitzler | 26309766b5 | |
Carsten Haitzler | ddefdc1c45 | |
Carsten Haitzler | 653a456a02 | |
q66 | a175903a21 | |
q66 | fde49a2f6b | |
q66 | 3bd64d19a2 | |
Carsten Haitzler | 29c736e327 | |
Carsten Haitzler | d17d6151d5 | |
Carsten Haitzler | 29ade56c20 | |
Carsten Haitzler | e898224672 | |
Carsten Haitzler | 9efb53b80d | |
Carsten Haitzler | 2d811cc994 | |
Carsten Haitzler | adb376b23b | |
Carsten Haitzler | e86c457f97 | |
Carsten Haitzler | 3a5c671ddd | |
Carsten Haitzler | 3326b7e579 | |
Carsten Haitzler | 3cdcc10c18 | |
Carsten Haitzler | 3dfead6653 | |
Carsten Haitzler | 9fc2b13c69 | |
Carsten Haitzler | 68dc80f25a | |
Carsten Haitzler | 8a641727da | |
Marcel Hollerbach | 67bdd4d071 | |
Carsten Haitzler | 4fd99de9fa | |
Carsten Haitzler | 964fa5c921 | |
Carsten Haitzler | 61ebfffcd6 | |
Carsten Haitzler | 7c7527da2b |
|
@ -1,6 +1,6 @@
|
|||
##### project
|
||||
project('enlightenment', 'c',
|
||||
version : '0.24.0',
|
||||
version : '0.24.2',
|
||||
license : 'BSD 2 clause',
|
||||
default_options: [ 'buildtype=release', 'c_std=gnu99', 'warning_level=2' ],
|
||||
meson_version : '>= 0.47.0')
|
||||
|
@ -184,6 +184,9 @@ if cc.has_header('netinet/in.h') == true
|
|||
endif
|
||||
if cc.has_header('execinfo.h') == true
|
||||
config_h.set('HAVE_EXECINFO_H' , '1')
|
||||
dep_execinfo = cc.find_library('execinfo', required: false)
|
||||
else
|
||||
dep_execinfo = dependency('', required: false)
|
||||
endif
|
||||
if cc.has_function('explicit_bzero') == true
|
||||
config_h.set('HAVE_EXPLICIT_BZERO' , '1')
|
||||
|
@ -202,9 +205,7 @@ if cc.has_header('fnmatch.h') == false
|
|||
error('fnmatch.h not found')
|
||||
endif
|
||||
|
||||
if cc.has_function('fnmatch') == false
|
||||
dep_fnmatch = dependency('fnmatch', required: true)
|
||||
endif
|
||||
dep_fnmatch = cc.find_library('fnmatch', required: false)
|
||||
|
||||
add_global_arguments('-DPACKAGE_BIN_DIR="@0@"'.format(dir_bin), language: 'c')
|
||||
add_global_arguments('-DPACKAGE_LIB_DIR="@0@"'.format(dir_lib), language: 'c')
|
||||
|
|
|
@ -18,7 +18,15 @@ static void
|
|||
password_out(void)
|
||||
{
|
||||
const char *str = elm_object_text_get(entry);
|
||||
if (str) printf("%s\n", str);
|
||||
if (str)
|
||||
{
|
||||
char *plain = elm_entry_markup_to_utf8(str);
|
||||
if (plain)
|
||||
{
|
||||
printf("%s\n", plain);
|
||||
free(plain);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -45,7 +45,7 @@ _backlight_mismatch_retry(Backlight_Device *bd)
|
|||
// and the delta between expected and val >= 0.05
|
||||
(fabs(bd->expected_val - bd->val) >= 0.05) &&
|
||||
// and we retried < 20 times
|
||||
(bd->retries < 20))
|
||||
(bd->retries < 10))
|
||||
{ // try again
|
||||
printf("RETRY backlight set as %1.2f != %1.2f (expected) try=%i\n",
|
||||
bd->val, bd->expected_val, bd->retries);
|
||||
|
@ -127,10 +127,11 @@ _backlight_devices_zone_device_find(E_Zone *zone)
|
|||
Eina_List *l;
|
||||
Backlight_Device *bd;
|
||||
char *tmp, *sep;
|
||||
const char *out, *edid;
|
||||
const char *out, *edid, *id;
|
||||
|
||||
if (!zone->randr2_id) return NULL;
|
||||
tmp = strdup(zone->randr2_id);
|
||||
id = zone->randr2_id;
|
||||
if (!id) id = "/";
|
||||
tmp = strdup(id);
|
||||
if (!tmp) return NULL;
|
||||
sep = strchr(tmp, '/');
|
||||
if (!sep)
|
||||
|
@ -222,8 +223,8 @@ _backlight_devices_randr_output_get(Ecore_X_Window root, const char *output, con
|
|||
static void
|
||||
_backlight_devices_device_set(Backlight_Device *bd, double val)
|
||||
{
|
||||
if (fabs(bd->expected_val - val) > DBL_EPSILON) bd->retries = 0;
|
||||
bd->val = bd->expected_val = val;
|
||||
bd->retries = 0;
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
if (!strcmp(bd->dev, "randr"))
|
||||
{
|
||||
|
@ -261,8 +262,21 @@ _backlight_devices_device_zone_get(Backlight_Device *bd)
|
|||
snprintf(buf, sizeof(buf), "%s/%s", bd->output? bd->output: "", bd->edid ? bd->edid : "");
|
||||
EINA_LIST_FOREACH(e_comp->zones, l, zone)
|
||||
{
|
||||
if (!zone->randr2_id) continue;
|
||||
if (!strcmp(zone->randr2_id, buf)) return zone;
|
||||
const char *id = zone->randr2_id;
|
||||
fprintf(stderr, "look at %p %s\n", zone, id);
|
||||
if (!id)
|
||||
{
|
||||
const char *id2 = bd->edid;
|
||||
if (!id2) id2 = "";
|
||||
id = "";
|
||||
fprintf(stderr, "cmp1 [%s] == [%s]\n", id, id2);
|
||||
if (!strcmp(id, id2)) return zone;
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "cmp2 [%s] == [%s]\n", id, buf);
|
||||
if (!strcmp(id, buf)) return zone;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
@ -344,12 +358,14 @@ _backlight_devices_screen_edid_get(const char *edid)
|
|||
{
|
||||
Eina_List *l;
|
||||
E_Randr2_Screen *sc;
|
||||
const char *id;
|
||||
|
||||
if (!e_randr2) return NULL;
|
||||
EINA_LIST_FOREACH(e_randr2->screens, l, sc)
|
||||
{
|
||||
if (!sc->info.edid) continue;
|
||||
if (!strncmp(sc->info.edid, edid, strlen(edid))) return sc;
|
||||
id = sc->info.edid;
|
||||
if (!id) id = "";
|
||||
if (!strncmp(id, edid, strlen(edid))) return sc;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
@ -372,17 +388,20 @@ static void
|
|||
_backlight_devices_lid_register(const char *dev, Eina_Bool force)
|
||||
{
|
||||
E_Randr2_Screen *sc = _backlight_devices_screen_lid_get();
|
||||
Backlight_Device *bd;
|
||||
Backlight_Device *bd = NULL;
|
||||
const char *id;
|
||||
|
||||
if (!sc) return;
|
||||
if (!sc->info.edid) return;
|
||||
bd = _backlight_devices_edid_find(sc->info.edid);
|
||||
id = sc->info.edid;
|
||||
if (!id) id = "";
|
||||
bd = _backlight_devices_edid_find(id);
|
||||
if (!bd)
|
||||
{
|
||||
E_Zone *zone;
|
||||
|
||||
bd = calloc(1, sizeof(Backlight_Device));
|
||||
if (!bd) return;
|
||||
bd->edid = eina_stringshare_add(sc->info.edid);
|
||||
bd->edid = eina_stringshare_add(id);
|
||||
bd->output = eina_stringshare_add(sc->info.name);
|
||||
_devices = eina_list_append(_devices, bd);
|
||||
zone = _backlight_devices_device_zone_get(bd);
|
||||
|
@ -415,10 +434,13 @@ _backlight_devices_edid_register(const char *dev, const char *edid)
|
|||
if (!bd)
|
||||
{
|
||||
E_Zone *zone;
|
||||
const char *id;
|
||||
|
||||
bd = calloc(1, sizeof(Backlight_Device));
|
||||
if (!bd) return;
|
||||
bd->edid = eina_stringshare_add(sc->info.edid);
|
||||
id = sc->info.edid;
|
||||
if (!id) id = "";
|
||||
bd->edid = eina_stringshare_add(id);
|
||||
bd->output = eina_stringshare_add(sc->info.name);
|
||||
_devices = eina_list_append(_devices, bd);
|
||||
zone = _backlight_devices_device_zone_get(bd);
|
||||
|
@ -529,6 +551,7 @@ _backlight_devices_probe(Eina_Bool initial)
|
|||
Ecore_X_Window root = e_comp->root;
|
||||
Ecore_X_Randr_Output *out;
|
||||
int i, num = 0;
|
||||
Eina_Bool found = EINA_FALSE;
|
||||
|
||||
bl_devs = eina_list_append(bl_devs, eina_stringshare_add("randr"));
|
||||
out = ecore_x_randr_window_outputs_get(root, &num);
|
||||
|
@ -552,6 +575,7 @@ _backlight_devices_probe(Eina_Bool initial)
|
|||
bd->output = eina_stringshare_add(name);
|
||||
bd->edid = edid_str;
|
||||
_devices = eina_list_append(_devices, bd);
|
||||
found = EINA_TRUE;
|
||||
}
|
||||
else free(bd);
|
||||
}
|
||||
|
@ -560,6 +584,8 @@ _backlight_devices_probe(Eina_Bool initial)
|
|||
}
|
||||
}
|
||||
free(out);
|
||||
if (found)
|
||||
e_backlight_level_set(NULL, e_config->backlight.normal, -1.0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -702,11 +728,13 @@ e_backlight_level_set(E_Zone *zone, double val, double tim)
|
|||
if (zone->bl_mode == E_BACKLIGHT_MODE_NORMAL) tim = 0.5;
|
||||
else if (tim < 0.0) tim = e_config->backlight.transition;
|
||||
|
||||
if ((bd->anim) && (fabs(bd->to_val - val) < DBL_EPSILON)) return;
|
||||
|
||||
E_FREE_FUNC(bd->retry_timer, ecore_timer_del);
|
||||
E_FREE_FUNC(bd->anim, ecore_animator_del);
|
||||
bd->anim = ecore_animator_timeline_add(tim, _bl_anim, bd);
|
||||
bd->from_val = bl_now;
|
||||
bd->to_val = val;
|
||||
bd->anim = ecore_animator_timeline_add(tim, _bl_anim, bd);
|
||||
}
|
||||
|
||||
E_API double
|
||||
|
|
|
@ -180,11 +180,11 @@ polkit_agent_response(void *data EINA_UNUSED, const Eldbus_Message *msg,
|
|||
ecore_main_loop_quit();
|
||||
if (eldbus_message_error_get(msg, &name, &text))
|
||||
{
|
||||
printf("Could not respond to auth.\n %s:\n %s\n", name, text);
|
||||
fprintf(stderr, "AUTH: Could not respond to auth.\n %s:\n %s\n", name, text);
|
||||
return;
|
||||
}
|
||||
polkit_auth_ok = 0;
|
||||
printf("Auth OK\n");
|
||||
fprintf(stderr, "AUTH: OK\n");
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -200,46 +200,42 @@ polkit_auth(const char *cookie, unsigned int auth_uid)
|
|||
ecore_init();
|
||||
eldbus_init();
|
||||
c = eldbus_connection_get(ELDBUS_CONNECTION_TYPE_SYSTEM);
|
||||
if (!c) return -1;
|
||||
#define BARF(str) do { \
|
||||
fprintf(stderr, "AUTH: POLKIT: %s\n", str); \
|
||||
return -1; \
|
||||
} while (0)
|
||||
if (!c) BARF("Cannot get session dbus");
|
||||
obj = eldbus_object_get(c, "org.freedesktop.PolicyKit1",
|
||||
"/org/freedesktop/PolicyKit1/Authority");
|
||||
if (!obj) return -1;
|
||||
if (!obj) BARF("Cannot get obj: org.freedesktop.PolicyKit1 /org/freedesktop/PolicyKit1/Authority");
|
||||
proxy = eldbus_proxy_get(obj, "org.freedesktop.PolicyKit1.Authority");
|
||||
if (!proxy) return -1;
|
||||
if (!proxy) BARF("Cannot proxy: org.freedesktop.PolicyKit1.Authority");
|
||||
m = eldbus_proxy_method_call_new(proxy, "AuthenticationAgentResponse2");
|
||||
if (!m) return -1;
|
||||
if (!m) BARF("Cannot get method call: AuthenticationAgentResponse2");
|
||||
iter = eldbus_message_iter_get(m);
|
||||
if (!iter) return -1;
|
||||
if (eldbus_message_iter_arguments_append(iter, "us", auth_uid, cookie))
|
||||
{
|
||||
if (eldbus_message_iter_arguments_append(iter, "(sa{sv})", &subj))
|
||||
{
|
||||
if (eldbus_message_iter_basic_append(subj, 's', "unix-user"))
|
||||
{
|
||||
if (eldbus_message_iter_arguments_append(subj, "a{sv}", &array))
|
||||
{
|
||||
if (eldbus_message_iter_arguments_append(array, "{sv}", &dict))
|
||||
{
|
||||
if (eldbus_message_iter_basic_append(dict, 's', "uid"))
|
||||
{
|
||||
vari = eldbus_message_iter_container_new(dict, 'v', "u");
|
||||
if (vari)
|
||||
{
|
||||
if (eldbus_message_iter_basic_append(vari, 'u', auth_uid))
|
||||
{
|
||||
eldbus_message_iter_container_close(dict, vari);
|
||||
} else return -1;
|
||||
} else return -1;
|
||||
} else return -1;
|
||||
eldbus_message_iter_container_close(array, dict);
|
||||
} else return -1;
|
||||
eldbus_message_iter_container_close(subj, array);
|
||||
} else return -1;
|
||||
} else return -1;
|
||||
eldbus_message_iter_container_close(iter, subj);
|
||||
} else return -1;
|
||||
eldbus_proxy_send(proxy, m, polkit_agent_response, NULL, -1);
|
||||
} else return -1;
|
||||
if (!iter) BARF("Cannot set iter on proxy");
|
||||
if (!eldbus_message_iter_arguments_append(iter, "us", uid, cookie))
|
||||
BARF("Cannot append 'us' args");
|
||||
if (!eldbus_message_iter_arguments_append(iter, "(sa{sv})", &subj))
|
||||
BARF("Cannot append '(sa{sv})' args");
|
||||
if (!eldbus_message_iter_basic_append(subj, 's', "unix-user"))
|
||||
BARF("Cannot append 's' arg for unix-user");
|
||||
if (!eldbus_message_iter_arguments_append(subj, "a{sv}", &array))
|
||||
BARF("Cannot append 'a{sv}' args");
|
||||
if (!eldbus_message_iter_arguments_append(array, "{sv}", &dict))
|
||||
BARF("Cannot append '{sv}' args");
|
||||
if (!eldbus_message_iter_basic_append(dict, 's', "uid"))
|
||||
BARF("Cannot append 's' arg for uid");
|
||||
vari = eldbus_message_iter_container_new(dict, 'v', "u");
|
||||
if (!vari)
|
||||
BARF("Cannot create new iter container");
|
||||
if (!eldbus_message_iter_basic_append(vari, 'u', auth_uid))
|
||||
BARF("Cannot append 'u' arg for auth_id");
|
||||
eldbus_message_iter_container_close(dict, vari);
|
||||
eldbus_message_iter_container_close(array, dict);
|
||||
eldbus_message_iter_container_close(subj, array);
|
||||
eldbus_message_iter_container_close(iter, subj);
|
||||
eldbus_proxy_send(proxy, m, polkit_agent_response, NULL, -1);
|
||||
|
||||
ecore_main_loop_begin();
|
||||
|
||||
|
@ -274,7 +270,7 @@ main(int argc, char **argv)
|
|||
rd = read(0, pw, sizeof(pw) - 1);
|
||||
if (rd < 0)
|
||||
{
|
||||
fprintf(stderr, "Error. Can't read passwd on stdin\n");
|
||||
fprintf(stderr, "AUTH: Error. Can't read passwd on stdin\n");
|
||||
goto err;
|
||||
}
|
||||
pw[rd] = 0;
|
||||
|
@ -297,14 +293,14 @@ main(int argc, char **argv)
|
|||
rd = read(0, pw + pos, 1);
|
||||
if (rd < 0)
|
||||
{
|
||||
fprintf(stderr, "Error. Can't read polkit cookie on stdin\n");
|
||||
fprintf(stderr, "AUTH: POLKIT: Error. Can't read polkit cookie on stdin\n");
|
||||
goto err;
|
||||
}
|
||||
if (pw[pos] == ' ')
|
||||
{
|
||||
memcpy(polkit_cookie, pw, pos);
|
||||
polkit_cookie[pos] = 0;
|
||||
printf("COOKIE: [%s]\n", polkit_cookie);
|
||||
fprintf(stderr, "AUTH: POLKIT: [%s]\n", polkit_cookie);
|
||||
pos = 0;
|
||||
break;
|
||||
}
|
||||
|
@ -313,7 +309,7 @@ main(int argc, char **argv)
|
|||
pos++;
|
||||
if (pos > 4000)
|
||||
{
|
||||
fprintf(stderr, "Error. Polkit cookie too long\n");
|
||||
fprintf(stderr, "AUTH: POLKIT: Error. Polkit cookie too long\n");
|
||||
return -10;
|
||||
}
|
||||
}
|
||||
|
@ -323,14 +319,14 @@ main(int argc, char **argv)
|
|||
rd = read(0, pw + pos, 1);
|
||||
if (rd < 0)
|
||||
{
|
||||
fprintf(stderr, "Error. Can't read polkit uid on stdin\n");
|
||||
fprintf(stderr, "AUTH: Error. Can't read polkit uid on stdin\n");
|
||||
goto err;
|
||||
}
|
||||
if (pw[pos] == ' ')
|
||||
{
|
||||
pw[pos] = 0;
|
||||
polkit_uid = atoi(pw);
|
||||
printf("UID: [%u]\n", polkit_uid);
|
||||
fprintf(stderr, "AUTH: UID: [%u]\n", polkit_uid);
|
||||
break;
|
||||
}
|
||||
else
|
||||
|
@ -338,17 +334,17 @@ main(int argc, char **argv)
|
|||
pos++;
|
||||
if (pos > 4000)
|
||||
{
|
||||
fprintf(stderr, "Error. Polkit uid too long\n");
|
||||
fprintf(stderr, "AUTH: Error. Polkit uid too long\n");
|
||||
return -11;
|
||||
}
|
||||
}
|
||||
}
|
||||
// password
|
||||
printf("READPASS...\n");
|
||||
fprintf(stderr, "AUTH: readpass...\n");
|
||||
rd = read(0, pw, sizeof(pw) - 1);
|
||||
if (rd < 0)
|
||||
{
|
||||
fprintf(stderr, "Error. Can't read passwd on stdin\n");
|
||||
fprintf(stderr, "AUTH: Error. Can't read passwd on stdin\n");
|
||||
goto err;
|
||||
}
|
||||
pw[rd] = 0;
|
||||
|
@ -365,22 +361,22 @@ main(int argc, char **argv)
|
|||
// ok to fail - auth will just possibly fail then
|
||||
e_setuid_setup(&uid, &gid, &user_name, &group_name);
|
||||
|
||||
if (_check_auth(uid, pw) == 0)
|
||||
if (_check_auth(polkit_mode ? polkit_uid : uid, pw) == 0)
|
||||
{
|
||||
fprintf(stderr, "Password OK\n");
|
||||
fprintf(stderr, "AUTH: Password OK\n");
|
||||
if (polkit_mode == 1)
|
||||
{
|
||||
if (polkit_auth(polkit_cookie, polkit_uid) == 0)
|
||||
{
|
||||
fprintf(stderr, "Polkit AuthenticationAgentResponse2 success\n");
|
||||
fprintf(stderr, "AUTH: Polkit AuthenticationAgentResponse2 success\n");
|
||||
return 0;
|
||||
}
|
||||
fprintf(stderr, "Polkit AuthenticationAgentResponse2 failure\n");
|
||||
fprintf(stderr, "AUTH: Polkit AuthenticationAgentResponse2 failure\n");
|
||||
return -2;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
err:
|
||||
fprintf(stderr, "Password auth fail\n");
|
||||
fprintf(stderr, "AUTH: Password auth fail\n");
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -4709,7 +4709,7 @@ e_client_urgent_set(E_Client *ec, Eina_Bool urgent)
|
|||
int x, y;
|
||||
ecore_evas_pointer_xy_get(e_comp->ee, &x, &y);
|
||||
ecore_evas_pointer_warp(e_comp->ee, x, y);
|
||||
e_screensaver_notidle();
|
||||
e_comp_canvas_notidle();
|
||||
}
|
||||
if (!ec->zone) return;
|
||||
|
||||
|
|
|
@ -379,11 +379,11 @@ _e_comp_cb_update(void)
|
|||
ecore_animator_freeze(e_comp->render_animator);
|
||||
DBG("UPDATE ALL");
|
||||
if (e_comp->nocomp) goto nocomp;
|
||||
if (conf->grab && (!e_comp->grabbed))
|
||||
{
|
||||
if (e_comp->grab_cb) e_comp->grab_cb();
|
||||
e_comp->grabbed = 1;
|
||||
}
|
||||
// if (conf->grab && (!e_comp->grabbed))
|
||||
// {
|
||||
// if (e_comp->grab_cb) e_comp->grab_cb();
|
||||
// e_comp->grabbed = 1;
|
||||
// }
|
||||
e_comp->updating = 1;
|
||||
l = e_comp->updates;
|
||||
e_comp->updates = NULL;
|
||||
|
@ -460,11 +460,6 @@ _e_comp_cb_update(void)
|
|||
// if (!e_comp->nocomp) ecore_evas_manual_render(e_comp->ee);
|
||||
}
|
||||
|
||||
if (conf->grab && e_comp->grabbed)
|
||||
{
|
||||
if (e_comp->grab_cb) e_comp->grab_cb();
|
||||
e_comp->grabbed = 0;
|
||||
}
|
||||
if (e_comp->updates && (!e_comp->update_job))
|
||||
ecore_animator_thaw(e_comp->render_animator);
|
||||
/*
|
||||
|
@ -1589,7 +1584,7 @@ e_comp_ignore_win_find(Ecore_Window win)
|
|||
}
|
||||
|
||||
E_API void
|
||||
e_comp_override_del()
|
||||
e_comp_override_del(void)
|
||||
{
|
||||
e_comp->nocomp_override--;
|
||||
if (e_comp->nocomp_override <= 0)
|
||||
|
@ -1600,7 +1595,7 @@ e_comp_override_del()
|
|||
}
|
||||
|
||||
E_API void
|
||||
e_comp_override_add()
|
||||
e_comp_override_add(void)
|
||||
{
|
||||
e_comp->nocomp_override++;
|
||||
if ((e_comp->nocomp_override > 0) && (e_comp->nocomp)) _e_comp_nocomp_end();
|
||||
|
|
|
@ -31,7 +31,7 @@ _e_comp_canvas_cb_first_frame(void *data EINA_UNUSED, Evas *e, void *event_info
|
|||
{
|
||||
case 'A': abort();
|
||||
case 'E':
|
||||
case 'D': exit(-1);
|
||||
case 'D': exit(101);
|
||||
case 'T': fprintf(stderr, "Startup time: '%f' - '%f' = '%f'\n", now, e_first_frame_start_time, now - e_first_frame_start_time);
|
||||
break;
|
||||
}
|
||||
|
@ -42,6 +42,7 @@ _e_comp_canvas_cb_first_frame(void *data EINA_UNUSED, Evas *e, void *event_info
|
|||
static void
|
||||
_e_comp_canvas_render_post(void *data EINA_UNUSED, Evas *e EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
E_Comp_Config *conf = e_comp_config_get();
|
||||
E_Client *ec;
|
||||
//Evas_Event_Render_Post *ev = event_info;
|
||||
//Eina_List *l;
|
||||
|
@ -65,6 +66,11 @@ _e_comp_canvas_render_post(void *data EINA_UNUSED, Evas *e EINA_UNUSED, void *ev
|
|||
UNREFD(ec, 111);
|
||||
e_object_unref(E_OBJECT(ec));
|
||||
}
|
||||
if (conf->grab && e_comp->grabbed)
|
||||
{
|
||||
if (e_comp->grab_cb) e_comp->grab_cb();
|
||||
e_comp->grabbed = 0;
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////
|
||||
|
@ -74,7 +80,7 @@ _e_comp_canvas_cb_mouse_in(void *d EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object
|
|||
{
|
||||
E_Client *ec;
|
||||
|
||||
e_screensaver_notidle();
|
||||
e_comp_canvas_notidle();
|
||||
if (e_client_action_get() || e_grabinput_mouse_win_get()) return;
|
||||
ec = e_client_focused_get();
|
||||
if (ec && (!ec->border_menu)) e_focus_event_mouse_out(ec);
|
||||
|
@ -83,7 +89,7 @@ _e_comp_canvas_cb_mouse_in(void *d EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object
|
|||
static void
|
||||
_e_comp_canvas_cb_mouse_down(void *d EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
|
||||
{
|
||||
e_screensaver_notidle();
|
||||
e_comp_canvas_notidle();
|
||||
if (e_client_action_get() || e_grabinput_mouse_win_get()) return;
|
||||
e_bindings_mouse_down_evas_event_handle(E_BINDING_CONTEXT_COMPOSITOR, E_OBJECT(e_comp), event_info);
|
||||
}
|
||||
|
@ -91,7 +97,7 @@ _e_comp_canvas_cb_mouse_down(void *d EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Obje
|
|||
static void
|
||||
_e_comp_canvas_cb_mouse_up(void *d EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
|
||||
{
|
||||
e_screensaver_notidle();
|
||||
e_comp_canvas_notidle();
|
||||
if (e_client_action_get() || e_grabinput_mouse_win_get()) return;
|
||||
e_bindings_mouse_up_evas_event_handle(E_BINDING_CONTEXT_COMPOSITOR, E_OBJECT(e_comp), event_info);
|
||||
}
|
||||
|
@ -99,7 +105,7 @@ _e_comp_canvas_cb_mouse_up(void *d EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object
|
|||
static void
|
||||
_e_comp_canvas_cb_mouse_wheel(void *d EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
|
||||
{
|
||||
e_screensaver_notidle();
|
||||
e_comp_canvas_notidle();
|
||||
if (e_client_action_get() || e_grabinput_mouse_win_get()) return;
|
||||
e_bindings_wheel_evas_event_handle(E_BINDING_CONTEXT_COMPOSITOR, E_OBJECT(e_comp), event_info);
|
||||
}
|
||||
|
@ -107,7 +113,7 @@ _e_comp_canvas_cb_mouse_wheel(void *d EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Obj
|
|||
static Eina_Bool
|
||||
_key_down(int ctx, Ecore_Event_Key *ev)
|
||||
{
|
||||
e_screensaver_notidle();
|
||||
e_comp_canvas_notidle();
|
||||
if (e_desklock_state_get() && (ctx == E_BINDING_CONTEXT_MANAGER))
|
||||
{
|
||||
E_Desklock_Interface *iface = e_desklock_interface_current_get();
|
||||
|
@ -157,7 +163,7 @@ _e_comp_cb_key_down(void *data EINA_UNUSED, int ev_type EINA_UNUSED, Ecore_Event
|
|||
static Eina_Bool
|
||||
_key_up(int ctx, Ecore_Event_Key *ev)
|
||||
{
|
||||
e_screensaver_notidle();
|
||||
e_comp_canvas_notidle();
|
||||
if (e_desklock_state_get() && (ctx == E_BINDING_CONTEXT_MANAGER))
|
||||
{
|
||||
E_Desklock_Interface *iface = e_desklock_interface_current_get();
|
||||
|
@ -354,9 +360,16 @@ _e_comp_canvas_prerender(void *data EINA_UNUSED, Evas *e EINA_UNUSED, void *even
|
|||
{
|
||||
E_Comp_Cb cb;
|
||||
Eina_List *l;
|
||||
E_Comp_Config *conf = e_comp_config_get();
|
||||
|
||||
e_comp->rendering = EINA_TRUE;
|
||||
|
||||
if (conf->grab && (!e_comp->grabbed))
|
||||
{
|
||||
if (e_comp->grab_cb) e_comp->grab_cb();
|
||||
e_comp->grabbed = 1;
|
||||
}
|
||||
|
||||
EINA_LIST_FOREACH(e_comp->pre_render_cbs, l, cb)
|
||||
cb();
|
||||
}
|
||||
|
@ -404,7 +417,7 @@ e_comp_canvas_init(int w, int h)
|
|||
// ecore_evas_manual_render_set(e_comp->ee, conf->lock_fps);
|
||||
ecore_evas_show(e_comp->ee);
|
||||
|
||||
evas_event_callback_add(e_comp->evas, EVAS_CALLBACK_RENDER_POST, _e_comp_canvas_render_post, NULL);
|
||||
evas_event_callback_add(e_comp->evas, EVAS_CALLBACK_RENDER_FLUSH_POST, _e_comp_canvas_render_post, NULL);
|
||||
|
||||
e_comp->ee_win = ecore_evas_window_get(e_comp->ee);
|
||||
|
||||
|
@ -437,6 +450,10 @@ e_comp_canvas_init(int w, int h)
|
|||
if ((!after_restart) || (!e_comp_x))
|
||||
ecore_evas_pointer_warp(e_comp->ee, e_comp->w / 2, e_comp->h / 2);
|
||||
|
||||
#ifdef HAVE_WAYLAND
|
||||
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
|
||||
e_comp_wl_notidle();
|
||||
#endif
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
|
@ -874,6 +891,14 @@ e_comp_canvas_feed_mouse_up(unsigned int activate_time)
|
|||
}
|
||||
}
|
||||
|
||||
E_API void
|
||||
e_comp_canvas_notidle(void)
|
||||
{
|
||||
#ifdef HAVE_WAYLAND
|
||||
if (e_comp->comp_type == E_PIXMAP_TYPE_WL) e_comp_wl_notidle();
|
||||
#endif
|
||||
}
|
||||
|
||||
E_API Evas_Object *
|
||||
e_comp_canvas_event_grabber_add(void)
|
||||
{
|
||||
|
|
|
@ -29,6 +29,7 @@ E_API E_Layer e_comp_canvas_client_layer_map_nearest(int layer);
|
|||
E_API void e_comp_canvas_keys_grab(void);
|
||||
E_API void e_comp_canvas_keys_ungrab(void);
|
||||
E_API void e_comp_canvas_feed_mouse_up(unsigned int activate_time);
|
||||
E_API void e_comp_canvas_notidle(void);
|
||||
E_API Evas_Object *e_comp_canvas_event_grabber_add(void);
|
||||
EINTERN void e_comp_canvas_intercept(void);
|
||||
|
||||
|
|
|
@ -1106,6 +1106,16 @@ _e_comp_wl_client_evas_init(E_Client *ec)
|
|||
_e_comp_wl_evas_cb_color_set, ec);
|
||||
|
||||
ec->comp_data->evas_init = EINA_TRUE;
|
||||
E_LIST_HANDLER_APPEND(handlers, E_EVENT_SCREENSAVER_ON, _e_comp_wl_screensaver_on, NULL);
|
||||
E_LIST_HANDLER_APPEND(handlers, E_EVENT_SCREENSAVER_OFF, _e_comp_wl_screensaver_off, NULL);
|
||||
e_comp_wl_notidle();
|
||||
|
||||
e_screensaver_attrs_set(e_screensaver_timeout_get(EINA_TRUE),
|
||||
e_config->screensaver_blanking,
|
||||
e_config->screensaver_expose);
|
||||
// XXX: maybe later like x work on explicit suspend of compositor stuff?
|
||||
// e_desklock_show_hook_add(_e_comp_x_desklock_show);
|
||||
// e_desklock_hide_hook_add(_e_comp_x_desklock_hide);
|
||||
}
|
||||
|
||||
static inline int
|
||||
|
@ -1199,7 +1209,7 @@ _e_comp_wl_cb_mouse_move(void *d EINA_UNUSED, int t EINA_UNUSED, Ecore_Event_Mou
|
|||
|
||||
e_comp_wl->ptr.x = ev->x;
|
||||
e_comp_wl->ptr.y = ev->y;
|
||||
e_screensaver_notidle();
|
||||
e_comp_canvas_notidle();
|
||||
if (e_comp_wl->selection.target &&
|
||||
(!e_client_has_xwindow(e_comp_wl->selection.target)) &&
|
||||
e_comp_wl->drag)
|
||||
|
@ -3405,7 +3415,9 @@ e_comp_wl_key_down(Ecore_Event_Key *ev, E_Client *ec)
|
|||
((ev->modifiers & ECORE_EVENT_MODIFIER_ALT) ||
|
||||
(ev->modifiers & ECORE_EVENT_MODIFIER_ALTGR)) &&
|
||||
eina_streq(ev->key, "BackSpace"))
|
||||
exit(0);
|
||||
{
|
||||
if (!e_desklock_state_get()) exit(0);
|
||||
}
|
||||
#endif
|
||||
|
||||
end = (uint32_t *)e_comp_wl->kbd.keys.data + (e_comp_wl->kbd.keys.size / sizeof(*k));
|
||||
|
@ -3682,3 +3694,149 @@ e_comp_wl_grab_client_mouse_button(const Ecore_Event_Mouse_Button *ev)
|
|||
e_comp_canvas_feed_mouse_up(0);
|
||||
return ECORE_CALLBACK_DONE;
|
||||
}
|
||||
|
||||
static Eina_Bool saver_inhibit = EINA_FALSE;
|
||||
static Eina_Bool saver_on = EINA_FALSE;
|
||||
static Ecore_Timer *screensaver_eval_timer = NULL;
|
||||
static Ecore_Timer *screensaver_idle_timer = NULL;
|
||||
|
||||
static Eina_Bool
|
||||
_e_comp_wl_screensaver_eval_cb(void *d EINA_UNUSED)
|
||||
{
|
||||
screensaver_eval_timer = NULL;
|
||||
if (!saver_on)
|
||||
{
|
||||
if (e_comp->screen && e_comp->screen->dpms)
|
||||
e_comp->screen->dpms(0);
|
||||
}
|
||||
e_screensaver_eval(saver_on);
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_e_comp_wl_screensaver_idle_cb(void *data EINA_UNUSED)
|
||||
{
|
||||
screensaver_idle_timer = NULL;
|
||||
if (e_screensaver_ignore_get()) return EINA_FALSE;
|
||||
if (!saver_on)
|
||||
{
|
||||
saver_on = EINA_TRUE;
|
||||
E_FREE_FUNC(screensaver_eval_timer, ecore_timer_del);
|
||||
screensaver_eval_timer = ecore_timer_loop_add
|
||||
(0.3, _e_comp_wl_screensaver_eval_cb, NULL);
|
||||
}
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
_e_comp_cb_pointer_suspend_resume_done(void *data, Evas_Object *obj, const char *emission, const char *source)
|
||||
{
|
||||
edje_object_signal_callback_del(obj, emission, source,
|
||||
_e_comp_cb_pointer_suspend_resume_done);
|
||||
if (!data)
|
||||
{
|
||||
e_pointer_grab_set(e_comp->pointer, EINA_FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
EINTERN Eina_Bool
|
||||
_e_comp_wl_screensaver_on()
|
||||
{
|
||||
const char *s;
|
||||
|
||||
if ((!e_comp->pointer) || (!e_comp->pointer->o_ptr)) return ECORE_CALLBACK_RENEW;
|
||||
s = edje_object_data_get(e_comp->pointer->o_ptr, "can_suspend");
|
||||
|
||||
if ((s) && (atoi(s) == 1))
|
||||
{
|
||||
if (!e_desklock_state_get())
|
||||
{
|
||||
e_pointer_grab_set(e_comp->pointer, EINA_FALSE);
|
||||
e_pointer_grab_set(e_comp->pointer, EINA_TRUE);
|
||||
}
|
||||
edje_object_signal_callback_del(e_comp->pointer->o_ptr,
|
||||
"e,state,mouse,suspend,done", "e",
|
||||
_e_comp_cb_pointer_suspend_resume_done);
|
||||
edje_object_signal_callback_del(e_comp->pointer->o_ptr,
|
||||
"e,state,mouse,resume,done", "e",
|
||||
_e_comp_cb_pointer_suspend_resume_done);
|
||||
edje_object_signal_callback_add(e_comp->pointer->o_ptr,
|
||||
"e,state,mouse,suspend,done",
|
||||
"e",
|
||||
_e_comp_cb_pointer_suspend_resume_done,
|
||||
e_comp);
|
||||
edje_object_signal_emit(e_comp->pointer->o_ptr,
|
||||
"e,state,mouse,suspend", "e");
|
||||
}
|
||||
return ECORE_CALLBACK_RENEW;
|
||||
}
|
||||
|
||||
EINTERN Eina_Bool
|
||||
_e_comp_wl_screensaver_off()
|
||||
{
|
||||
const char *s;
|
||||
|
||||
e_pointer_grab_set(e_comp->pointer, EINA_FALSE);
|
||||
if ((!e_comp->pointer) || (!e_comp->pointer->o_ptr)) return ECORE_CALLBACK_RENEW;
|
||||
s = edje_object_data_get(e_comp->pointer->o_ptr, "can_suspend");
|
||||
|
||||
if ((s) && (atoi(s) == 1))
|
||||
{
|
||||
if (!e_desklock_state_get())
|
||||
{
|
||||
e_pointer_grab_set(e_comp->pointer, EINA_TRUE);
|
||||
}
|
||||
edje_object_signal_callback_del(e_comp->pointer->o_ptr,
|
||||
"e,state,mouse,suspend,done", "e",
|
||||
_e_comp_cb_pointer_suspend_resume_done);
|
||||
edje_object_signal_callback_del(e_comp->pointer->o_ptr,
|
||||
"e,state,mouse,resume,done", "e",
|
||||
_e_comp_cb_pointer_suspend_resume_done);
|
||||
edje_object_signal_callback_add(e_comp->pointer->o_ptr,
|
||||
"e,state,mouse,resume,done",
|
||||
"e",
|
||||
_e_comp_cb_pointer_suspend_resume_done,
|
||||
NULL);
|
||||
edje_object_signal_emit(e_comp->pointer->o_ptr,
|
||||
"e,state,mouse,resume", "e");
|
||||
}
|
||||
return ECORE_CALLBACK_RENEW;
|
||||
}
|
||||
|
||||
E_API void
|
||||
e_comp_wl_notidle(void)
|
||||
{
|
||||
int timeout;
|
||||
|
||||
if (saver_on)
|
||||
{
|
||||
saver_on = EINA_FALSE;
|
||||
E_FREE_FUNC(screensaver_eval_timer, ecore_timer_del);
|
||||
screensaver_eval_timer = ecore_timer_loop_add
|
||||
(0.3, _e_comp_wl_screensaver_eval_cb, NULL);
|
||||
}
|
||||
E_FREE_FUNC(screensaver_idle_timer, ecore_timer_del);
|
||||
timeout = e_screensaver_timeout_get(EINA_TRUE);
|
||||
if (timeout > 0)
|
||||
screensaver_idle_timer = ecore_timer_add
|
||||
(timeout, _e_comp_wl_screensaver_idle_cb, NULL);
|
||||
}
|
||||
|
||||
E_API void
|
||||
e_comp_wl_screensaver_activate(void)
|
||||
{
|
||||
saver_on = EINA_TRUE;
|
||||
E_FREE_FUNC(screensaver_eval_timer, ecore_timer_del);
|
||||
E_FREE_FUNC(screensaver_idle_timer, ecore_timer_del);
|
||||
e_screensaver_eval(saver_on);
|
||||
}
|
||||
|
||||
E_API void
|
||||
e_comp_wl_screensaver_inhibit(Eina_Bool inhibit)
|
||||
{
|
||||
if (inhibit == saver_inhibit) return;
|
||||
saver_inhibit = inhibit;
|
||||
e_comp_wl_notidle();
|
||||
if (inhibit)
|
||||
E_FREE_FUNC(screensaver_idle_timer, ecore_timer_del);
|
||||
}
|
||||
|
|
|
@ -439,6 +439,12 @@ E_API void e_comp_wl_extension_pointer_unconstrain(E_Client *ec);
|
|||
E_API void e_comp_wl_extension_action_route_pid_allowed_set(uint32_t pid, Eina_Bool allow);
|
||||
E_API const void *e_comp_wl_extension_action_route_interface_get(int *version);
|
||||
|
||||
E_API void e_comp_wl_notidle(void);
|
||||
E_API void e_comp_wl_screensaver_activate(void);
|
||||
E_API void e_comp_wl_screensaver_inhibit(Eina_Bool inhibit);
|
||||
|
||||
EINTERN Eina_Bool _e_comp_wl_screensaver_on();
|
||||
EINTERN Eina_Bool _e_comp_wl_screensaver_off();
|
||||
|
||||
E_API void
|
||||
e_policy_wl_aux_message_send(E_Client *ec,
|
||||
|
|
|
@ -5272,13 +5272,25 @@ _e_comp_x_screensaver_off()
|
|||
}
|
||||
|
||||
static Ecore_Timer *screensaver_eval_timer = NULL;
|
||||
static Ecore_Animator *screensaver_eval_animator = NULL;
|
||||
static Eina_Bool saver_on = EINA_FALSE;
|
||||
|
||||
static Eina_Bool
|
||||
_e_comp_x_screensaver_eval_cb(void *d EINA_UNUSED)
|
||||
{
|
||||
e_screensaver_eval(saver_on);
|
||||
E_FREE_FUNC(screensaver_eval_animator, ecore_animator_del);
|
||||
screensaver_eval_timer = NULL;
|
||||
e_screensaver_eval(saver_on);
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_e_comp_x_screensaver_pre_eval_cb(void *d EINA_UNUSED)
|
||||
{
|
||||
E_FREE_FUNC(screensaver_eval_timer, ecore_timer_del);
|
||||
screensaver_eval_animator = NULL;
|
||||
screensaver_eval_timer = ecore_timer_loop_add(0.3, _e_comp_x_screensaver_eval_cb, NULL);
|
||||
e_screensaver_eval(saver_on);
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
|
@ -5290,13 +5302,15 @@ _e_comp_x_screensaver_notify_cb(void *data EINA_UNUSED, int type EINA_UNUSED, Ec
|
|||
{
|
||||
saver_on = EINA_TRUE;
|
||||
E_FREE_FUNC(screensaver_eval_timer, ecore_timer_del);
|
||||
E_FREE_FUNC(screensaver_eval_animator, ecore_animator_del);
|
||||
screensaver_eval_timer = ecore_timer_loop_add(0.3, _e_comp_x_screensaver_eval_cb, NULL);
|
||||
}
|
||||
else if ((!ev->on) && (saver_on))
|
||||
{
|
||||
saver_on = EINA_FALSE;
|
||||
E_FREE_FUNC(screensaver_eval_timer, ecore_timer_del);
|
||||
screensaver_eval_timer = ecore_timer_loop_add(0.3, _e_comp_x_screensaver_eval_cb, NULL);
|
||||
E_FREE_FUNC(screensaver_eval_animator, ecore_animator_del);
|
||||
screensaver_eval_animator = ecore_animator_add(_e_comp_x_screensaver_pre_eval_cb, NULL);
|
||||
}
|
||||
return ECORE_CALLBACK_PASS_ON;
|
||||
}
|
||||
|
|
|
@ -490,6 +490,8 @@ e_comp_x_randr_config_apply(void)
|
|||
int crtcs_num = 0, outputs_num = 0, i, numout;
|
||||
Ecore_X_Randr_Crtc_Info *info;
|
||||
int top_priority = 0;
|
||||
int px, py;
|
||||
Eina_Bool fix_pointer = EINA_TRUE;
|
||||
|
||||
ecore_x_grab();
|
||||
// set virtual resolution
|
||||
|
@ -509,6 +511,8 @@ e_comp_x_randr_config_apply(void)
|
|||
if (nh < minh) nh = minh;
|
||||
ww = nw; if (nw < pw) ww = pw;
|
||||
hh = nh; if (nh < ph) hh = ph;
|
||||
|
||||
ecore_x_pointer_xy_get(root, &px, &py);
|
||||
ecore_x_randr_screen_current_size_set(root, ww, hh, -1, -1);
|
||||
{
|
||||
int dww = 0, dhh = 0, dww2 = 0, dhh2 = 0;
|
||||
|
@ -610,6 +614,16 @@ e_comp_x_randr_config_apply(void)
|
|||
screenconf[i]->config.geom.y,
|
||||
mode, orient))
|
||||
printf("RRR: failed to set crtc!!!!!!\n");
|
||||
if (E_INSIDE(px, py,
|
||||
screenconf[i]->config.geom.x,
|
||||
screenconf[i]->config.geom.y,
|
||||
screenconf[i]->config.geom.w,
|
||||
screenconf[i]->config.geom.h))
|
||||
fix_pointer = EINA_FALSE;
|
||||
px = screenconf[i]->config.geom.x +
|
||||
(screenconf[i]->config.geom.w / 2);
|
||||
py = screenconf[i]->config.geom.y +
|
||||
(screenconf[i]->config.geom.h / 2);
|
||||
ecore_x_randr_crtc_panning_area_set
|
||||
(root, crtcs[i],
|
||||
screenconf[i]->config.geom.x,
|
||||
|
@ -644,6 +658,10 @@ e_comp_x_randr_config_apply(void)
|
|||
ecore_x_root_screen_barriers_set(NULL, 0);
|
||||
}
|
||||
}
|
||||
if (fix_pointer)
|
||||
{
|
||||
ecore_x_pointer_warp(root, px, py);
|
||||
}
|
||||
free(outputs);
|
||||
free(crtcs);
|
||||
|
||||
|
|
|
@ -469,7 +469,7 @@ _e_exec_cb_exec(void *data, Efreet_Desktop *desktop, char *exec, int remaining)
|
|||
return NULL;
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (exec)
|
||||
{
|
||||
if ((desktop) && (desktop->terminal))
|
||||
{
|
||||
|
@ -805,6 +805,14 @@ _e_exec_startup_id_pid_find(const Eina_Hash *hash EINA_UNUSED, const void *key E
|
|||
search = data;
|
||||
EINA_LIST_FOREACH(value, l, inst)
|
||||
{
|
||||
pid_t exe_pid;
|
||||
|
||||
exe_pid = 0;
|
||||
if (inst->exe)
|
||||
{
|
||||
exe_pid = ecore_exe_pid_get(inst->exe);
|
||||
if (exe_pid <= 0) inst->exe = NULL;
|
||||
}
|
||||
if (((search->desktop) &&
|
||||
(search->desktop == inst->desktop)) ||
|
||||
|
||||
|
@ -812,7 +820,7 @@ _e_exec_startup_id_pid_find(const Eina_Hash *hash EINA_UNUSED, const void *key E
|
|||
(search->startup_id == inst->startup_id)) ||
|
||||
|
||||
((inst->exe) && (search->pid > 1) && (!inst->phony) &&
|
||||
(search->pid == ecore_exe_pid_get(inst->exe))))
|
||||
(search->pid == exe_pid)))
|
||||
{
|
||||
search->inst = inst;
|
||||
return EINA_FALSE;
|
||||
|
|
|
@ -185,7 +185,7 @@ e_hints_init(Ecore_Window root, Ecore_Window propwin)
|
|||
{
|
||||
e_error_message_show(_("A previous instance of Enlightenment is still active\n"
|
||||
"on this screen. Aborting startup.\n"));
|
||||
exit(1);
|
||||
exit(101);
|
||||
}
|
||||
/* get/check agan */
|
||||
nwins = ecore_x_window_prop_window_get(root,
|
||||
|
|
|
@ -86,7 +86,7 @@ _e_icon_obj_prepare(Evas_Object *obj, E_Smart_Data *sd)
|
|||
{
|
||||
if (!sd->obj) return;
|
||||
|
||||
if (sd->edje)
|
||||
if (!sd->edje)
|
||||
{
|
||||
Evas_Object *pclip;
|
||||
|
||||
|
@ -97,6 +97,7 @@ _e_icon_obj_prepare(Evas_Object *obj, E_Smart_Data *sd)
|
|||
evas_object_image_scale_hint_set(sd->obj,
|
||||
EVAS_IMAGE_SCALE_HINT_STATIC);
|
||||
evas_object_smart_member_add(sd->obj, obj);
|
||||
evas_object_stack_below(sd->obj, sd->eventarea);
|
||||
evas_object_event_callback_add(sd->obj, EVAS_CALLBACK_IMAGE_PRELOADED,
|
||||
_e_icon_preloaded, obj);
|
||||
evas_object_clip_set(sd->obj, pclip);
|
||||
|
@ -236,7 +237,7 @@ e_icon_file_key_set(Evas_Object *obj, const char *file, const char *key)
|
|||
if (sd->preload)
|
||||
{
|
||||
sd->loading = 1;
|
||||
evas_object_image_preload(sd->obj, 0);
|
||||
evas_object_image_preload(sd->obj, EINA_FALSE);
|
||||
}
|
||||
else if (evas_object_visible_get(obj))
|
||||
evas_object_show(sd->obj);
|
||||
|
@ -317,8 +318,9 @@ e_icon_file_edje_set(Evas_Object *obj, const char *file, const char *part)
|
|||
edje_object_file_set(sd->obj, file, part);
|
||||
// if (edje_object_load_error_get(sd->obj) != EDJE_LOAD_ERROR_NONE)
|
||||
// return EINA_FALSE;
|
||||
if (evas_object_visible_get(obj)) evas_object_show(sd->obj);
|
||||
evas_object_smart_member_add(sd->obj, obj);
|
||||
evas_object_stack_below(sd->obj, sd->eventarea);
|
||||
if (evas_object_visible_get(obj)) evas_object_show(sd->obj);
|
||||
_e_icon_smart_reconfigure(sd);
|
||||
}
|
||||
|
||||
|
@ -414,6 +416,7 @@ e_icon_image_object_set(Evas_Object *obj, Evas_Object *o)
|
|||
sd->loading = 0;
|
||||
sd->obj = o;
|
||||
evas_object_smart_member_add(sd->obj, obj);
|
||||
evas_object_stack_below(sd->obj, sd->eventarea);
|
||||
if (evas_object_visible_get(obj)) evas_object_show(sd->obj);
|
||||
_handle_anim(sd);
|
||||
_e_icon_smart_reconfigure(sd);
|
||||
|
|
176
src/bin/e_init.c
176
src/bin/e_init.c
|
@ -8,6 +8,11 @@ static int undone = 0;
|
|||
static Evas_Object *_e_init_object = NULL;
|
||||
static Eina_List *splash_objs = NULL;
|
||||
static Ecore_Timer *_e_init_timeout_timer = NULL;
|
||||
static Ecore_Job *_e_init_update_job = NULL;
|
||||
static Ecore_Event_Handler *_e_init_event_zone_add = NULL;
|
||||
static Ecore_Event_Handler *_e_init_event_zone_del = NULL;
|
||||
static Ecore_Event_Handler *_e_init_event_zone_move_resize = NULL;
|
||||
static Eina_Bool _pre_called = EINA_FALSE;
|
||||
|
||||
static Eina_Bool
|
||||
_e_init_cb_timeout(void *data EINA_UNUSED)
|
||||
|
@ -29,6 +34,7 @@ _e_init_render_pre(void *data EINA_UNUSED, Evas *e, void *info EINA_UNUSED)
|
|||
Eina_List *l;
|
||||
Evas_Object *o;
|
||||
|
||||
_pre_called = EINA_TRUE;
|
||||
evas_event_callback_del(e, EVAS_CALLBACK_RENDER_PRE, _e_init_render_pre);
|
||||
EINA_LIST_FOREACH(splash_objs, l, o)
|
||||
{
|
||||
|
@ -36,6 +42,130 @@ _e_init_render_pre(void *data EINA_UNUSED, Evas *e, void *info EINA_UNUSED)
|
|||
}
|
||||
}
|
||||
|
||||
static E_Zone *
|
||||
_get_zone_num(int num)
|
||||
{
|
||||
E_Zone *zone;
|
||||
Eina_List *l;
|
||||
|
||||
EINA_LIST_FOREACH(e_comp->zones, l, zone)
|
||||
{
|
||||
if ((int)zone->num == num) return zone;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static Evas_Object *
|
||||
_get_splash_num(int num)
|
||||
{
|
||||
Evas_Object *o;
|
||||
Eina_List *l;
|
||||
|
||||
EINA_LIST_FOREACH(splash_objs, l, o)
|
||||
{
|
||||
int n = (intptr_t)evas_object_data_get(o, "num");
|
||||
if (n > 0)
|
||||
{
|
||||
n--;
|
||||
if (num == n) return o;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
_e_init_splash_obj_zone_update(Evas_Object *o, E_Zone *zone)
|
||||
{
|
||||
evas_object_clip_set(o, zone->bg_clip_object);
|
||||
evas_object_move(o, zone->x, zone->y);
|
||||
evas_object_resize(o, zone->w, zone->h);
|
||||
evas_object_layer_set(o, E_LAYER_MAX - 1000);
|
||||
}
|
||||
|
||||
static Evas_Object *
|
||||
_e_init_splash_obj_new(E_Zone *zone)
|
||||
{
|
||||
Evas_Object *o;
|
||||
|
||||
o = edje_object_add(e_comp->evas);
|
||||
evas_object_data_set(o, "num", (void *)(intptr_t)(zone->num + 1));
|
||||
if (!zone->num)
|
||||
{
|
||||
e_theme_edje_object_set(o, NULL, "e/init/splash");
|
||||
edje_object_part_text_set(o, "e.text.disable_text", "");
|
||||
edje_object_signal_callback_add(o, "e,state,done_ok", "e",
|
||||
_e_init_cb_signal_done_ok, NULL);
|
||||
}
|
||||
else
|
||||
e_theme_edje_object_set(o, NULL, "e/init/extra_screen");
|
||||
_e_init_splash_obj_zone_update(o, zone);
|
||||
splash_objs = eina_list_append(splash_objs, o);
|
||||
return o;
|
||||
}
|
||||
|
||||
static void
|
||||
_e_init_zone_change_job(void *data EINA_UNUSED)
|
||||
{
|
||||
Evas_Object *o;
|
||||
E_Zone *zone;
|
||||
Eina_List *l, *ll;
|
||||
|
||||
_e_init_update_job = NULL;
|
||||
if (done > 0) return;
|
||||
// pass 1 - delete splash objects for zones that have gone OR
|
||||
// update the zone obj to have the right clip and geometry
|
||||
EINA_LIST_FOREACH_SAFE(splash_objs, l, ll, o)
|
||||
{
|
||||
int num = (intptr_t)evas_object_data_get(o, "num");
|
||||
if (num > 0)
|
||||
{
|
||||
num--;
|
||||
zone = _get_zone_num(num);
|
||||
if (!zone)
|
||||
{
|
||||
if (o == _e_init_object)
|
||||
{
|
||||
if (_e_init_timeout_timer)
|
||||
{
|
||||
ecore_timer_del(_e_init_timeout_timer);
|
||||
_e_init_timeout_timer =
|
||||
ecore_timer_add(2.0, _e_init_cb_timeout, NULL);
|
||||
}
|
||||
_e_init_object = NULL;
|
||||
}
|
||||
splash_objs = eina_list_remove_list(splash_objs, l);
|
||||
evas_object_del(o);
|
||||
}
|
||||
else _e_init_splash_obj_zone_update(o, zone);
|
||||
}
|
||||
// something went wrong - so delete it
|
||||
else
|
||||
{
|
||||
if (o == _e_init_object) _e_init_object = NULL;
|
||||
splash_objs = eina_list_remove_list(splash_objs, l);
|
||||
evas_object_del(o);
|
||||
}
|
||||
}
|
||||
// pass 2 - add splash objects for new zones
|
||||
EINA_LIST_FOREACH(e_comp->zones, l, zone)
|
||||
{
|
||||
o = _get_splash_num(zone->num);
|
||||
if (!o) // no splash obj for this zone, add one
|
||||
{
|
||||
o = _e_init_splash_obj_new(zone);
|
||||
if (_pre_called) evas_object_show(o);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_e_init_zone_change(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSED)
|
||||
{
|
||||
if (_e_init_update_job) ecore_job_del(_e_init_update_job);
|
||||
_e_init_update_job = ecore_job_add(_e_init_zone_change_job, NULL);
|
||||
return ECORE_CALLBACK_PASS_ON;
|
||||
}
|
||||
|
||||
/* public functions */
|
||||
EINTERN int
|
||||
e_init_init(void)
|
||||
|
@ -50,6 +180,15 @@ EINTERN int
|
|||
e_init_shutdown(void)
|
||||
{
|
||||
/* if not killed, kill init */
|
||||
ecore_event_handler_del(_e_init_event_zone_add);
|
||||
ecore_event_handler_del(_e_init_event_zone_del);
|
||||
if (_e_init_event_zone_move_resize)
|
||||
{
|
||||
ecore_event_handler_del(_e_init_event_zone_move_resize);
|
||||
_e_init_event_zone_move_resize = NULL;
|
||||
}
|
||||
_e_init_event_zone_add = NULL;
|
||||
_e_init_event_zone_del = NULL;
|
||||
e_init_hide();
|
||||
return 1;
|
||||
}
|
||||
|
@ -62,33 +201,20 @@ e_init_show(void)
|
|||
Eina_List *l;
|
||||
/* exec init */
|
||||
|
||||
_e_init_event_zone_add =
|
||||
ecore_event_handler_add(E_EVENT_ZONE_ADD, _e_init_zone_change, NULL);
|
||||
_e_init_event_zone_del =
|
||||
ecore_event_handler_add(E_EVENT_ZONE_DEL, _e_init_zone_change, NULL);
|
||||
_e_init_event_zone_move_resize =
|
||||
ecore_event_handler_add(E_EVENT_ZONE_MOVE_RESIZE, _e_init_zone_change, NULL);
|
||||
EINA_LIST_FOREACH(e_comp->zones, l, zone)
|
||||
{
|
||||
o = edje_object_add(e_comp->evas);
|
||||
if (!zone->num)
|
||||
{
|
||||
e_theme_edje_object_set(o, NULL, "e/init/splash");
|
||||
evas_object_name_set(o, "_e_init_object");
|
||||
_e_init_object = o;
|
||||
}
|
||||
else
|
||||
{
|
||||
e_theme_edje_object_set(o, NULL, "e/init/extra_screen");
|
||||
evas_object_name_set(o, "_e_init_extra_screen");
|
||||
}
|
||||
evas_object_clip_set(o, zone->bg_clip_object);
|
||||
evas_object_move(o, zone->x, zone->y);
|
||||
evas_object_resize(o, zone->w, zone->h);
|
||||
evas_object_layer_set(o, E_LAYER_MAX - 1000);
|
||||
splash_objs = eina_list_append(splash_objs, o);
|
||||
o = _e_init_splash_obj_new(zone);
|
||||
if (!zone->num) _e_init_object = o;
|
||||
}
|
||||
evas_event_callback_add
|
||||
(e_comp->evas, EVAS_CALLBACK_RENDER_PRE, _e_init_render_pre, NULL);
|
||||
edje_object_part_text_set(_e_init_object, "e.text.disable_text",
|
||||
"Disable splash screen");
|
||||
edje_object_signal_callback_add(_e_init_object, "e,state,done_ok", "e",
|
||||
_e_init_cb_signal_done_ok, NULL);
|
||||
_e_init_timeout_timer = ecore_timer_loop_add(240.0, _e_init_cb_timeout, NULL);
|
||||
_e_init_timeout_timer = ecore_timer_loop_add(60.0, _e_init_cb_timeout, NULL);
|
||||
e_init_title_set(_("Enlightenment"));
|
||||
e_init_version_set(VERSION);
|
||||
}
|
||||
|
@ -96,10 +222,16 @@ e_init_show(void)
|
|||
E_API void
|
||||
e_init_hide(void)
|
||||
{
|
||||
if (_e_init_event_zone_move_resize)
|
||||
{
|
||||
ecore_event_handler_del(_e_init_event_zone_move_resize);
|
||||
_e_init_event_zone_move_resize = NULL;
|
||||
}
|
||||
E_FREE_LIST(splash_objs, evas_object_del);
|
||||
e_comp_shape_queue();
|
||||
_e_init_object = NULL;
|
||||
E_FREE_FUNC(_e_init_timeout_timer, ecore_timer_del);
|
||||
E_FREE_FUNC(_e_init_update_job, ecore_job_del);
|
||||
}
|
||||
|
||||
E_API void
|
||||
|
|
|
@ -191,7 +191,7 @@ _e_ipc_cb_client_data(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
|
|||
break;
|
||||
|
||||
case E_ALERT_OP_EXIT:
|
||||
exit(-11);
|
||||
exit(101);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
139
src/bin/e_main.c
139
src/bin/e_main.c
|
@ -295,7 +295,7 @@ main(int argc, char **argv)
|
|||
if (!eina_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot initialize Eina!\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
eina_file_statgen_enable();
|
||||
|
||||
|
@ -304,7 +304,7 @@ main(int argc, char **argv)
|
|||
if (!e_log_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment could not create a logging domain!\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
#ifdef TS_DO
|
||||
#undef TS
|
||||
|
@ -367,7 +367,7 @@ main(int argc, char **argv)
|
|||
if (!eet_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot initialize Eet!\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("Eet Init Done");
|
||||
_e_main_shutdown_push(eet_shutdown);
|
||||
|
@ -376,7 +376,7 @@ main(int argc, char **argv)
|
|||
if (!ecore_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot initialize Ecore!\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("Ecore Init Done");
|
||||
_e_main_shutdown_push(ecore_shutdown);
|
||||
|
@ -395,7 +395,7 @@ main(int argc, char **argv)
|
|||
if (!e_efx_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot initialize EFX!\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("EFX Init Done");
|
||||
_e_main_shutdown_push((void*)e_efx_shutdown);
|
||||
|
@ -404,7 +404,7 @@ main(int argc, char **argv)
|
|||
if (!eio_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot initialize EIO!\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("EIO Init Done");
|
||||
_e_main_shutdown_push(eio_shutdown);
|
||||
|
@ -417,21 +417,21 @@ main(int argc, char **argv)
|
|||
{
|
||||
e_error_message_show(_("Enlightenment cannot set up an exit signal handler.\n"
|
||||
"Perhaps you are out of memory?"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
if (!ecore_event_handler_add(ECORE_EVENT_SIGNAL_HUP,
|
||||
_e_main_cb_signal_hup, NULL))
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot set up a HUP signal handler.\n"
|
||||
"Perhaps you are out of memory?"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
if (!ecore_event_handler_add(ECORE_EVENT_SIGNAL_USER,
|
||||
_e_main_cb_signal_user, NULL))
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot set up a USER signal handler.\n"
|
||||
"Perhaps you are out of memory?"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("Ecore Event Handlers Done");
|
||||
|
||||
|
@ -439,7 +439,7 @@ main(int argc, char **argv)
|
|||
if (!ecore_file_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot initialize Ecore_File!\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("Ecore_File Init Done");
|
||||
_e_main_shutdown_push(ecore_file_shutdown);
|
||||
|
@ -448,7 +448,7 @@ main(int argc, char **argv)
|
|||
if (!ecore_con_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot initialize Ecore_Con!\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("Ecore_Con Init Done");
|
||||
_e_main_shutdown_push(ecore_con_shutdown);
|
||||
|
@ -457,7 +457,7 @@ main(int argc, char **argv)
|
|||
if (!ecore_ipc_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot initialize Ecore_Ipc!\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("Ecore_Ipc Init Done");
|
||||
_e_main_shutdown_push(ecore_ipc_shutdown);
|
||||
|
@ -468,7 +468,7 @@ main(int argc, char **argv)
|
|||
if (!ecore_evas_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot initialize Ecore_Evas!\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("Ecore_Evas Init Done");
|
||||
// _e_main_shutdown_push(ecore_evas_shutdown);
|
||||
|
@ -477,7 +477,7 @@ main(int argc, char **argv)
|
|||
if (!elm_init(argc, argv))
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot initialize Elementary!\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("Elementary Init Done");
|
||||
//_e_main_shutdown_push(elm_shutdown);
|
||||
|
@ -486,7 +486,7 @@ main(int argc, char **argv)
|
|||
if (!emotion_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot initialize Emotion!\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("Emotion Init Done");
|
||||
/* triggers event flush: do not call */
|
||||
|
@ -502,7 +502,7 @@ main(int argc, char **argv)
|
|||
e_error_message_show(_("Enlightenment found ecore_evas doesn't support the Wayland SHM\n"
|
||||
"rendering in Evas. Please check your installation of Evas and\n"
|
||||
"Ecore and check they support the Wayland SHM rendering engine."));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
#else
|
||||
if (!ecore_evas_engine_type_supported_get(ECORE_EVAS_ENGINE_SOFTWARE_XCB))
|
||||
|
@ -512,7 +512,7 @@ main(int argc, char **argv)
|
|||
e_error_message_show(_("Enlightenment found ecore_evas doesn't support the Software X11\n"
|
||||
"rendering in Evas. Please check your installation of Evas and\n"
|
||||
"Ecore and check they support the Software X11 rendering engine."));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -521,7 +521,7 @@ main(int argc, char **argv)
|
|||
e_error_message_show(_("Enlightenment found ecore_evas doesn't support the Software Buffer\n"
|
||||
"rendering in Evas. Please check your installation of Evas and\n"
|
||||
"Ecore and check they support the Software Buffer rendering engine."));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("Ecore_Evas Engine Check Done");
|
||||
|
||||
|
@ -533,7 +533,7 @@ main(int argc, char **argv)
|
|||
if (!e_intl_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot initialize E_Intl!\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("E Intl Init Done");
|
||||
_e_main_shutdown_push(e_intl_shutdown);
|
||||
|
@ -545,7 +545,7 @@ main(int argc, char **argv)
|
|||
{
|
||||
e_error_message_show(_("Enlightenment cannot initialize its emergency alert system.\n"
|
||||
"Have you set your DISPLAY variable?"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("E_Alert Init Done");
|
||||
_e_main_shutdown_push(e_alert_shutdown);
|
||||
|
@ -557,7 +557,7 @@ main(int argc, char **argv)
|
|||
{
|
||||
e_error_message_show(_("Enlightenment cannot create directories in your home directory.\n"
|
||||
"Perhaps you have no home directory or the disk is full?"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("E Directories Init Done");
|
||||
_e_main_shutdown_push(_e_main_dirs_shutdown);
|
||||
|
@ -566,7 +566,7 @@ main(int argc, char **argv)
|
|||
if (!e_filereg_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot set up its file registry system.\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("E_Filereg Init Done");
|
||||
_e_main_shutdown_push(e_filereg_shutdown);
|
||||
|
@ -575,7 +575,7 @@ main(int argc, char **argv)
|
|||
if (!e_config_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot set up its config system.\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("E_Config Init Done");
|
||||
_e_main_shutdown_push(e_config_shutdown);
|
||||
|
@ -604,7 +604,7 @@ main(int argc, char **argv)
|
|||
if (!e_env_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot set up its environment.\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("E_Env Init Done");
|
||||
_e_main_shutdown_push(e_env_shutdown);
|
||||
|
@ -623,7 +623,7 @@ main(int argc, char **argv)
|
|||
{
|
||||
e_error_message_show(_("Enlightenment cannot set up paths for finding files.\n"
|
||||
"Perhaps you are out of memory?"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("E Paths Init Done");
|
||||
_e_main_shutdown_push(_e_main_path_shutdown);
|
||||
|
@ -675,7 +675,7 @@ main(int argc, char **argv)
|
|||
TS("E_Precache Done");
|
||||
|
||||
TS("E_Ipc Init");
|
||||
if (!e_ipc_init()) _e_main_shutdown(-1);
|
||||
if (!e_ipc_init()) _e_main_shutdown(101);
|
||||
TS("E_Ipc Init Done");
|
||||
_e_main_shutdown_push(e_ipc_shutdown);
|
||||
|
||||
|
@ -683,7 +683,7 @@ main(int argc, char **argv)
|
|||
if (!e_font_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot set up its font system.\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("E_Font Init Done");
|
||||
_e_main_shutdown_push(e_font_shutdown);
|
||||
|
@ -696,7 +696,7 @@ main(int argc, char **argv)
|
|||
if (!e_theme_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot set up its theme system.\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("E_Theme Init Done");
|
||||
_e_main_shutdown_push(e_theme_shutdown);
|
||||
|
@ -714,7 +714,7 @@ main(int argc, char **argv)
|
|||
e_error_message_show(_("Enlightenment cannot create a dbus session connection.\n"
|
||||
"At best this will break many things, at worst it will hard lock your machine.\n"
|
||||
"If you're sure you know what you're doing, export E_NO_DBUS_SESSION=1"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -727,7 +727,7 @@ main(int argc, char **argv)
|
|||
e_error_message_show(_("Enlightenment cannot initialize the FDO desktop system.\n"
|
||||
"Perhaps you lack permissions on ~/.cache/efreet or are\n"
|
||||
"out of memory or disk space?"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("Efreet Init Done");
|
||||
_e_main_shutdown_push(efreet_shutdown);
|
||||
|
@ -736,7 +736,7 @@ main(int argc, char **argv)
|
|||
if (!e_intl_post_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot set up its intl system.\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("E_Intl Post Init Done");
|
||||
_e_main_shutdown_push(e_intl_post_shutdown);
|
||||
|
@ -751,7 +751,7 @@ main(int argc, char **argv)
|
|||
if (!e_actions_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot set up its actions system.\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("E_Actions Init Done");
|
||||
_e_main_shutdown_push(e_actions_shutdown);
|
||||
|
@ -767,7 +767,7 @@ main(int argc, char **argv)
|
|||
if (!e_system_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot initialize the Privilege System access system.\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("E_System Init Done");
|
||||
_e_main_shutdown_push(e_system_shutdown);
|
||||
|
@ -776,7 +776,7 @@ main(int argc, char **argv)
|
|||
if (!e_powersave_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot set up its powersave modes.\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("E_Powersave Init Done");
|
||||
_e_main_shutdown_push(e_powersave_shutdown);
|
||||
|
@ -786,7 +786,7 @@ main(int argc, char **argv)
|
|||
{
|
||||
e_error_message_show(_("Enlightenment set up window management for all the screens on your system\n"
|
||||
"failed. Perhaps another window manager is running?\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("Screens Init Done");
|
||||
_e_main_shutdown_push(_e_main_screens_shutdown);
|
||||
|
@ -795,7 +795,7 @@ main(int argc, char **argv)
|
|||
if (!e_pointer_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot set up its pointer system.\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("E_Pointer Init Done");
|
||||
_e_main_shutdown_push(e_pointer_shutdown);
|
||||
|
@ -805,7 +805,7 @@ main(int argc, char **argv)
|
|||
if (!e_scale_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot set up its scale system.\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("E_Scale Init Done");
|
||||
_e_main_shutdown_push(e_scale_shutdown);
|
||||
|
@ -816,7 +816,7 @@ main(int argc, char **argv)
|
|||
if (!e_init_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot set up its init screen.\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("E_Splash Init Done");
|
||||
_e_main_shutdown_push(e_init_shutdown);
|
||||
|
@ -847,7 +847,7 @@ main(int argc, char **argv)
|
|||
if (!e_backlight_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot configure the backlight.\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("E_Backlight Init Done");
|
||||
|
||||
|
@ -855,7 +855,7 @@ main(int argc, char **argv)
|
|||
if (!e_dpms_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot configure the DPMS settings.\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("E_Dpms Init Done");
|
||||
_e_main_shutdown_push(e_dpms_shutdown);
|
||||
|
@ -864,7 +864,7 @@ main(int argc, char **argv)
|
|||
if (!e_desklock_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot set up its desk locking system.\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("E_Desklock Init Done");
|
||||
_e_main_shutdown_push(e_desklock_shutdown);
|
||||
|
@ -883,7 +883,7 @@ main(int argc, char **argv)
|
|||
if (!e_sys_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot initialize the System Command system.\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("E_Sys Init Done");
|
||||
_e_main_shutdown_push(e_sys_shutdown);
|
||||
|
@ -892,7 +892,7 @@ main(int argc, char **argv)
|
|||
if (!e_exec_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot set up its exec system.\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("E_Exec Init Done");
|
||||
|
||||
|
@ -904,7 +904,7 @@ main(int argc, char **argv)
|
|||
if (!e_fm2_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot initialize the File manager.\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("E_Fm2 Init Done");
|
||||
_e_main_shutdown_push(e_fm2_shutdown);
|
||||
|
@ -913,7 +913,7 @@ main(int argc, char **argv)
|
|||
if (!e_msg_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot set up its msg system.\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("E_Msg Init Done");
|
||||
_e_main_shutdown_push(e_msg_shutdown);
|
||||
|
@ -922,7 +922,7 @@ main(int argc, char **argv)
|
|||
if (!e_grabinput_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot set up its grab input handling system.\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("E_Grabinput Init Done");
|
||||
_e_main_shutdown_push(e_grabinput_shutdown);
|
||||
|
@ -931,7 +931,7 @@ main(int argc, char **argv)
|
|||
if (!e_module_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot set up its module system.\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("E_Module Init Done");
|
||||
_e_main_shutdown_push(e_module_shutdown);
|
||||
|
@ -940,7 +940,7 @@ main(int argc, char **argv)
|
|||
if (!e_remember_init(after_restart ? E_STARTUP_RESTART : E_STARTUP_START))
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot setup remember settings.\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("E_Remember Init Done");
|
||||
_e_main_shutdown_push(e_remember_shutdown);
|
||||
|
@ -954,7 +954,7 @@ main(int argc, char **argv)
|
|||
if (!e_gadcon_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot set up its gadget control system.\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("E_Gadcon Init Done");
|
||||
_e_main_shutdown_push(e_gadcon_shutdown);
|
||||
|
@ -963,7 +963,7 @@ main(int argc, char **argv)
|
|||
if (!e_toolbar_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot set up its toolbars.\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("E_Toolbar Init Done");
|
||||
_e_main_shutdown_push(e_toolbar_shutdown);
|
||||
|
@ -972,7 +972,7 @@ main(int argc, char **argv)
|
|||
if (!e_bg_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot set up its desktop background system.\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("E_Bg Init Done");
|
||||
_e_main_shutdown_push(e_bg_shutdown);
|
||||
|
@ -981,7 +981,7 @@ main(int argc, char **argv)
|
|||
if (!e_mouse_update())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot configure the mouse settings.\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("E_Mouse Init Done");
|
||||
|
||||
|
@ -989,7 +989,7 @@ main(int argc, char **argv)
|
|||
if (!e_bindings_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot set up its bindings system.\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("E_Bindings Init Done");
|
||||
_e_main_shutdown_push(e_bindings_shutdown);
|
||||
|
@ -998,7 +998,7 @@ main(int argc, char **argv)
|
|||
if (!e_thumb_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot initialize the Thumbnailing system.\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("E_Thumb Init Done");
|
||||
_e_main_shutdown_push(e_thumb_shutdown);
|
||||
|
@ -1007,7 +1007,7 @@ main(int argc, char **argv)
|
|||
if (!e_icon_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot initialize the Icon Cache system.\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("E_Icon Init Done");
|
||||
_e_main_shutdown_push(e_icon_shutdown);
|
||||
|
@ -1016,7 +1016,7 @@ main(int argc, char **argv)
|
|||
if (!e_update_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot initialize the Update system.\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("E_Update Init Done");
|
||||
_e_main_shutdown_push(e_update_shutdown);
|
||||
|
@ -1025,7 +1025,7 @@ main(int argc, char **argv)
|
|||
if (!e_deskenv_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot initialize its desktop environment.\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("E_Deskenv Init Done");
|
||||
_e_main_shutdown_push(e_deskenv_shutdown);
|
||||
|
@ -1034,7 +1034,7 @@ main(int argc, char **argv)
|
|||
if (!e_order_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot set up its order file system.\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("E_Order Init Done");
|
||||
_e_main_shutdown_push(e_order_shutdown);
|
||||
|
@ -1077,7 +1077,7 @@ main(int argc, char **argv)
|
|||
if (!e_shelf_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot set up its module system.\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
e_shelf_config_update();
|
||||
TS("E_Shelf Init Done");
|
||||
|
@ -1155,7 +1155,7 @@ _e_main_shutdown(int errcode)
|
|||
|
||||
for (i = (_e_main_lvl - 1); i >= 0; i--)
|
||||
(*_e_main_shutdown_func[i])();
|
||||
if (errcode < 0) exit(errcode);
|
||||
if (errcode != 0) exit(errcode);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1228,7 +1228,7 @@ _e_main_parse_arguments(int argc, char **argv)
|
|||
(!strcmp(argv[i], "--version")))
|
||||
{
|
||||
printf(_("Version: %s\n"), PACKAGE_VERSION);
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(0);
|
||||
}
|
||||
else if ((!strcmp(argv[i], "-h")) ||
|
||||
(!strcmp(argv[i], "-help")) ||
|
||||
|
@ -1261,7 +1261,7 @@ _e_main_parse_arguments(int argc, char **argv)
|
|||
"\t-version\n"
|
||||
)
|
||||
);
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1296,20 +1296,15 @@ _e_main_parse_arguments(int argc, char **argv)
|
|||
"will handle setting up environment variables, paths,\n"
|
||||
"and launching any other required services etc.\n"
|
||||
"before enlightenment itself begins running.\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
}
|
||||
|
||||
EINTERN void
|
||||
_e_main_cb_x_fatal(void *data EINA_UNUSED)
|
||||
{
|
||||
e_error_message_show("Lost X Connection.\n");
|
||||
ecore_main_loop_quit();
|
||||
if (!x_fatal)
|
||||
{
|
||||
x_fatal = EINA_TRUE;
|
||||
if (inloop) longjmp(x_fatal_buff, -99);
|
||||
}
|
||||
fprintf(stderr, "X I/O Error - fatal. Exiting.\n");
|
||||
exit(101);
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
|
@ -1559,7 +1554,7 @@ _e_main_screens_init(void)
|
|||
if (!e_comp_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot create a compositor.\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("Compositor Init Done");
|
||||
|
||||
|
@ -1572,7 +1567,7 @@ _e_main_screens_init(void)
|
|||
if (!e_dnd_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot set up its dnd system.\n"));
|
||||
_e_main_shutdown(-1);
|
||||
_e_main_shutdown(101);
|
||||
}
|
||||
TS("E_Dnd Init Done");
|
||||
_e_main_shutdown_push(e_dnd_shutdown);
|
||||
|
|
|
@ -901,7 +901,7 @@ e_pixmap_image_clear(E_Pixmap *cp, Eina_Bool cache)
|
|||
cd->frames = NULL;
|
||||
EINA_LIST_FREE(free_list, cb)
|
||||
{
|
||||
double t = ecore_loop_time_get() - wayland_time_base;
|
||||
double t = ecore_loop_time_get();
|
||||
wl_callback_send_done(cb, t * 1000);
|
||||
wl_resource_destroy(cb);
|
||||
}
|
||||
|
|
|
@ -15,7 +15,6 @@ static E_Dialog *_e_screensaver_ask_presentation_dia = NULL;
|
|||
static int _e_screensaver_ask_presentation_count = 0;
|
||||
|
||||
static int _e_screensaver_timeout = 0;
|
||||
//static int _e_screensaver_interval = 0;
|
||||
static int _e_screensaver_blanking = 0;
|
||||
static int _e_screensaver_expose = 0;
|
||||
|
||||
|
@ -25,11 +24,6 @@ static Eina_Bool _e_screensaver_on = EINA_FALSE;
|
|||
static Ecore_Timer *screensaver_idle_timer = NULL;
|
||||
static Eina_Bool screensaver_dimmed = EINA_FALSE;
|
||||
|
||||
#ifdef HAVE_WAYLAND
|
||||
static Ecore_Timer *_e_screensaver_timer;
|
||||
static Eina_Bool _e_screensaver_inhibited = EINA_FALSE;
|
||||
#endif
|
||||
|
||||
static Eina_Bool _screensaver_ignore = EINA_FALSE;
|
||||
static Eina_Bool _screensaver_now = EINA_FALSE;
|
||||
|
||||
|
@ -37,16 +31,6 @@ E_API int E_EVENT_SCREENSAVER_ON = -1;
|
|||
E_API int E_EVENT_SCREENSAVER_OFF = -1;
|
||||
E_API int E_EVENT_SCREENSAVER_OFF_PRE = -1;
|
||||
|
||||
#ifdef HAVE_WAYLAND
|
||||
static Eina_Bool
|
||||
_e_screensaver_idle_timeout_cb(void *d)
|
||||
{
|
||||
e_screensaver_eval(!!d);
|
||||
_e_screensaver_timer = NULL;
|
||||
return EINA_FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
E_API int
|
||||
e_screensaver_timeout_get(Eina_Bool use_idle)
|
||||
{
|
||||
|
@ -107,7 +91,7 @@ e_screensaver_ignore_get(void)
|
|||
E_API void
|
||||
e_screensaver_update(void)
|
||||
{
|
||||
int timeout;
|
||||
int timeout, interval = 0, blanking = 0, expose = 0;
|
||||
Eina_Bool changed = EINA_FALSE;
|
||||
|
||||
timeout = e_screensaver_timeout_get(EINA_TRUE);
|
||||
|
@ -122,18 +106,11 @@ e_screensaver_update(void)
|
|||
_e_screensaver_timeout = timeout;
|
||||
changed = EINA_TRUE;
|
||||
}
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
int interval = 0, blanking = 0, expose = 0;
|
||||
|
||||
interval = e_config->screensaver_interval;
|
||||
blanking = e_config->screensaver_blanking;
|
||||
expose = e_config->screensaver_expose;
|
||||
|
||||
// if (_e_screensaver_interval != interval)
|
||||
// {
|
||||
// _e_screensaver_interval = interval;
|
||||
// changed = EINA_TRUE;
|
||||
// }
|
||||
if (_e_screensaver_blanking != blanking)
|
||||
{
|
||||
_e_screensaver_blanking = blanking;
|
||||
|
@ -145,9 +122,10 @@ e_screensaver_update(void)
|
|||
changed = EINA_TRUE;
|
||||
}
|
||||
|
||||
if (e_comp->comp_type != E_PIXMAP_TYPE_WL)
|
||||
if (changed)
|
||||
{
|
||||
if (changed)
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
if (e_comp->comp_type != E_PIXMAP_TYPE_WL)
|
||||
{
|
||||
// this toggling of dpms is a bug workaround in x that i found
|
||||
// where if we change screensaver timeouts and force a manual
|
||||
|
@ -168,16 +146,8 @@ e_screensaver_update(void)
|
|||
}
|
||||
ecore_x_screensaver_set(timeout, interval, blanking, expose);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_WAYLAND
|
||||
if (changed && (e_comp->comp_type == E_PIXMAP_TYPE_WL))
|
||||
{
|
||||
E_FREE_FUNC(_e_screensaver_timer, ecore_timer_del);
|
||||
if (timeout)
|
||||
_e_screensaver_timer = ecore_timer_loop_add(timeout, _e_screensaver_idle_timeout_cb, (void*)1);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
|
@ -354,10 +324,6 @@ _e_screensaver_handler_screensaver_off_cb(void *data EINA_UNUSED, int type EINA_
|
|||
}
|
||||
else if (_e_screensaver_ask_presentation_count)
|
||||
_e_screensaver_ask_presentation_count = 0;
|
||||
#ifdef HAVE_WAYLAND
|
||||
if (_e_screensaver_timeout && (e_comp->comp_type == E_PIXMAP_TYPE_WL))
|
||||
_e_screensaver_timer = ecore_timer_loop_add(_e_screensaver_timeout, _e_screensaver_idle_timeout_cb, (void*)1);
|
||||
#endif
|
||||
return ECORE_CALLBACK_PASS_ON;
|
||||
}
|
||||
|
||||
|
@ -534,8 +500,7 @@ e_screensaver_activate(void)
|
|||
#endif
|
||||
#ifdef HAVE_WAYLAND
|
||||
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
|
||||
e_screensaver_eval(1);
|
||||
E_FREE_FUNC(_e_screensaver_timer, ecore_timer_del);
|
||||
e_comp_wl_screensaver_activate();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -550,7 +515,8 @@ e_screensaver_deactivate(void)
|
|||
ecore_x_screensaver_reset();
|
||||
#endif
|
||||
#ifdef HAVE_WAYLAND
|
||||
e_screensaver_notidle();
|
||||
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
|
||||
e_comp_canvas_notidle();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -605,6 +571,13 @@ e_screensaver_eval(Eina_Bool saver_on)
|
|||
}
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef HAVE_WAYLAND
|
||||
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
|
||||
ecore_event_add(E_EVENT_SCREENSAVER_OFF_PRE, NULL, NULL, NULL);
|
||||
#endif
|
||||
}
|
||||
if (screensaver_idle_timer)
|
||||
{
|
||||
E_FREE_FUNC(screensaver_idle_timer, ecore_timer_del);
|
||||
|
@ -632,34 +605,14 @@ e_screensaver_eval(Eina_Bool saver_on)
|
|||
}
|
||||
}
|
||||
|
||||
E_API void
|
||||
e_screensaver_notidle(void)
|
||||
{
|
||||
#ifdef HAVE_WAYLAND
|
||||
if (_e_screensaver_inhibited || (e_comp->comp_type != E_PIXMAP_TYPE_WL)) return;
|
||||
E_FREE_FUNC(_e_screensaver_timer, ecore_timer_del);
|
||||
if (e_screensaver_on_get())
|
||||
{
|
||||
ecore_event_add(E_EVENT_SCREENSAVER_OFF_PRE, NULL, NULL, NULL);
|
||||
_e_screensaver_timer = ecore_timer_loop_add(0.2, _e_screensaver_idle_timeout_cb, NULL);
|
||||
}
|
||||
else if (_e_screensaver_timeout)
|
||||
_e_screensaver_timer = ecore_timer_loop_add(_e_screensaver_timeout, _e_screensaver_idle_timeout_cb, (void*)1);
|
||||
#endif
|
||||
}
|
||||
|
||||
E_API void
|
||||
e_screensaver_inhibit_toggle(Eina_Bool inhibit)
|
||||
{
|
||||
#ifdef HAVE_WAYLAND
|
||||
if (e_comp->comp_type != E_PIXMAP_TYPE_WL) return;
|
||||
E_FREE_FUNC(_e_screensaver_timer, ecore_timer_del);
|
||||
_e_screensaver_inhibited = !!inhibit;
|
||||
if (inhibit)
|
||||
e_screensaver_eval(0);
|
||||
else
|
||||
e_screensaver_notidle();
|
||||
e_comp_wl_screensaver_inhibit(inhibit);
|
||||
#else
|
||||
(void)inhibit;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,6 @@ E_API void e_screensaver_deactivate(void);
|
|||
|
||||
E_API void e_screensaver_now_set(Eina_Bool now);
|
||||
E_API void e_screensaver_eval(Eina_Bool saver_on);
|
||||
E_API void e_screensaver_notidle(void);
|
||||
E_API void e_screensaver_inhibit_toggle(Eina_Bool inhibit);
|
||||
|
||||
E_API extern int E_EVENT_SCREENSAVER_ON;
|
||||
|
|
|
@ -509,7 +509,7 @@ e_shelf_toggle(E_Shelf *es, int show)
|
|||
E_OBJECT_TYPE_CHECK(es, E_SHELF_TYPE);
|
||||
|
||||
es->toggle = show;
|
||||
if (_e_shelf_autohide_timer_extend(es)) return;
|
||||
if (!es->hidden && _e_shelf_autohide_timer_extend(es)) return;
|
||||
if (es->locked) return;
|
||||
es->interrupted = -1;
|
||||
es->urgent_show = 0;
|
||||
|
|
|
@ -795,7 +795,10 @@ not_done:
|
|||
|
||||
if (result == child)
|
||||
{
|
||||
if (WIFSTOPPED(status) && !stop_ptrace)
|
||||
printf("WIFSTOPPED=%i WIFEXITED=%i WEXITSTATUS=%i stop_ptrace=%i\n",
|
||||
WIFSTOPPED(status), WIFEXITED(status),
|
||||
WEXITSTATUS(status), stop_ptrace);
|
||||
if (WIFSTOPPED(status) && (!stop_ptrace))
|
||||
{
|
||||
char *backtrace_str = NULL;
|
||||
|
||||
|
@ -836,14 +839,34 @@ not_done:
|
|||
if (getenv("DISPLAY")) kill(child, SIGKILL);
|
||||
if (WEXITSTATUS(r) == 1) restart = EINA_FALSE;
|
||||
}
|
||||
else if (!WIFEXITED(status) || (stop_ptrace))
|
||||
{
|
||||
restart = EINA_TRUE;
|
||||
done = EINA_TRUE;
|
||||
}
|
||||
else if (WEXITSTATUS(status) == 111)
|
||||
{
|
||||
putenv("E_RESTART_OK=1");
|
||||
restart = EINA_TRUE;
|
||||
done = EINA_TRUE;
|
||||
}
|
||||
else if (!WIFEXITED(status) || stop_ptrace)
|
||||
done = EINA_TRUE;
|
||||
else if (WEXITSTATUS(status) == 101)
|
||||
{
|
||||
printf("Explici error exit from enlightenment\n");
|
||||
restart = EINA_FALSE;
|
||||
done = EINA_TRUE;
|
||||
}
|
||||
else if (WEXITSTATUS(status) == 0)
|
||||
{
|
||||
restart = EINA_FALSE;
|
||||
done = EINA_TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Invalid exit from enlightenment: code=%i\n", WEXITSTATUS(status));
|
||||
restart = EINA_TRUE;
|
||||
done = EINA_TRUE;
|
||||
}
|
||||
}
|
||||
else if (result == -1)
|
||||
{
|
||||
|
|
|
@ -31,7 +31,7 @@ e_startup_mode_set(E_Startup_Mode mode)
|
|||
ecore_event_handler_add(EFREET_EVENT_DESKTOP_CACHE_BUILD,
|
||||
_e_startup_event_cb, NULL);
|
||||
if (timer) ecore_timer_del(timer);
|
||||
timer = ecore_timer_add(10.0, _e_startup_time_exceeded, NULL);
|
||||
timer = ecore_timer_add(20.0, _e_startup_time_exceeded, NULL);
|
||||
e_init_undone();
|
||||
}
|
||||
|
||||
|
|
162
src/bin/e_sys.c
162
src/bin/e_sys.c
|
@ -55,6 +55,10 @@ static Ecore_Timer *_e_sys_screensaver_unignore_timer = NULL;
|
|||
|
||||
static double resume_backlight;
|
||||
|
||||
static Ecore_Timer *_e_sys_suspend_delay_timer = NULL;
|
||||
static Ecore_Timer *_e_sys_hibernate_delay_timer = NULL;
|
||||
static Ecore_Timer *_e_sys_halt_reboot_timer = NULL;
|
||||
|
||||
static Eina_Bool on_the_way_out = EINA_FALSE;
|
||||
|
||||
E_API int E_EVENT_SYS_SUSPEND = -1;
|
||||
|
@ -64,7 +68,7 @@ E_API int E_EVENT_SYS_RESUME = -1;
|
|||
static Eina_Bool
|
||||
_e_sys_comp_done2_cb(void *data)
|
||||
{
|
||||
printf("_e_sys_comp_done2_cb %p\n", data);
|
||||
printf("SSS: _e_sys_comp_done2_cb %p\n", data);
|
||||
e_sys_action_raw_do((E_Sys_Action)(long)data, NULL);
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
@ -185,6 +189,10 @@ _e_sys_comp_emit_cb_wait(E_Sys_Action a, const char *sig, const char *rep, Eina_
|
|||
if (e_comp->comp_type == E_PIXMAP_TYPE_X)
|
||||
_e_comp_x_screensaver_on();
|
||||
#endif
|
||||
#ifdef HAVE_WAYLAND
|
||||
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
|
||||
_e_comp_wl_screensaver_on();
|
||||
#endif
|
||||
|
||||
if (rep)
|
||||
{
|
||||
|
@ -268,9 +276,14 @@ _e_sys_comp_resume2(void *data EINA_UNUSED)
|
|||
Eina_List *l;
|
||||
E_Zone *zone;
|
||||
|
||||
_e_sys_action_current = E_SYS_NONE;
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
if (e_comp->comp_type == E_PIXMAP_TYPE_X)
|
||||
_e_comp_x_screensaver_off();
|
||||
#endif
|
||||
#ifdef HAVE_WAYLAND
|
||||
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
|
||||
_e_comp_wl_screensaver_off();
|
||||
#endif
|
||||
EINA_LIST_FOREACH(e_comp->zones, l, zone)
|
||||
e_backlight_level_set(zone, resume_backlight, -1.0);
|
||||
|
@ -289,6 +302,7 @@ _e_sys_comp_resume2(void *data EINA_UNUSED)
|
|||
static void
|
||||
_e_sys_comp_resume(void)
|
||||
{
|
||||
printf("SSS: sys resume ... \n");
|
||||
edje_thaw();
|
||||
ecore_evas_manual_render_set(e_comp->ee, EINA_FALSE);
|
||||
evas_damage_rectangle_add(e_comp->evas, 0, 0, e_comp->w, e_comp->h);
|
||||
|
@ -394,12 +408,21 @@ e_sys_init(void)
|
|||
EINTERN int
|
||||
e_sys_shutdown(void)
|
||||
{
|
||||
if (_e_sys_halt_reboot_timer)
|
||||
ecore_timer_del(_e_sys_halt_reboot_timer);
|
||||
if (_e_sys_suspend_delay_timer)
|
||||
ecore_timer_del(_e_sys_suspend_delay_timer);
|
||||
if (_e_sys_hibernate_delay_timer)
|
||||
ecore_timer_del(_e_sys_hibernate_delay_timer);
|
||||
if (_e_sys_resume_delay_timer)
|
||||
ecore_timer_del(_e_sys_resume_delay_timer);
|
||||
if (_e_sys_screensaver_unignore_timer)
|
||||
ecore_timer_del(_e_sys_screensaver_unignore_timer);
|
||||
if (_e_sys_acpi_handler)
|
||||
ecore_event_handler_del(_e_sys_acpi_handler);
|
||||
_e_sys_halt_reboot_timer = NULL;
|
||||
_e_sys_suspend_delay_timer = NULL;
|
||||
_e_sys_hibernate_delay_timer = NULL;
|
||||
_e_sys_resume_delay_timer = NULL;
|
||||
_e_sys_screensaver_unignore_timer = NULL;
|
||||
_e_sys_acpi_handler = NULL;
|
||||
|
@ -492,6 +515,7 @@ e_sys_action_do(E_Sys_Action a, char *param)
|
|||
break;
|
||||
}
|
||||
|
||||
printf("SSS: e_sys_ction_do ret=%i a=%i\n", ret, _e_sys_action_current);
|
||||
if (ret) _e_sys_action_current = a;
|
||||
else _e_sys_action_current = E_SYS_NONE;
|
||||
|
||||
|
@ -512,6 +536,7 @@ e_sys_action_raw_do(E_Sys_Action a, char *param)
|
|||
|
||||
ret = _e_sys_action_do(a, param, EINA_TRUE);
|
||||
|
||||
printf("SSS: e_sys_ction_raw_do ret=%i a=%i\n", ret, _e_sys_action_current);
|
||||
if (ret) _e_sys_action_current = a;
|
||||
else _e_sys_action_current = E_SYS_NONE;
|
||||
|
||||
|
@ -669,9 +694,11 @@ _e_sys_systemd_hibernate(void)
|
|||
static Eina_Bool
|
||||
_e_sys_resume_delay(void *d EINA_UNUSED)
|
||||
{
|
||||
printf("SSS: hib check resume delay...\n");
|
||||
_e_sys_resume_delay_timer = NULL;
|
||||
if (_e_sys_suspended)
|
||||
{
|
||||
printf("SSS: suspended to false\n");
|
||||
_e_sys_suspended = EINA_FALSE;
|
||||
ecore_event_add(E_EVENT_SYS_RESUME, NULL, NULL, NULL);
|
||||
_e_sys_comp_resume();
|
||||
|
@ -687,6 +714,7 @@ _e_sys_susp_hib_check_timer_cb(void *data EINA_UNUSED)
|
|||
printf("SSS: hib check @%1.8f (unix %1.8f, delt %1.8f)\n", ecore_time_get(), t, t - _e_sys_susp_hib_check_last_tick);
|
||||
if ((t - _e_sys_susp_hib_check_last_tick) > 0.5)
|
||||
{
|
||||
printf("SSS: hib check long gap\n");
|
||||
_e_sys_susp_hib_check_timer = NULL;
|
||||
if (_e_sys_resume_delay_timer)
|
||||
ecore_timer_del(_e_sys_resume_delay_timer);
|
||||
|
@ -865,6 +893,7 @@ after:
|
|||
static void
|
||||
_e_sys_logout_after(void)
|
||||
{
|
||||
printf("SSS: sys action after %i\n", _e_sys_action_after);
|
||||
_e_sys_action_current = _e_sys_action_after;
|
||||
_e_sys_action_do(_e_sys_action_after, NULL, _e_sys_action_after_raw);
|
||||
_e_sys_action_after = E_SYS_NONE;
|
||||
|
@ -980,6 +1009,59 @@ _e_sys_cb_acpi_event(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
|
|||
return ECORE_CALLBACK_PASS_ON;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_e_sys_suspend_delay(void *data EINA_UNUSED)
|
||||
{
|
||||
_e_sys_suspend_delay_timer = NULL;
|
||||
_e_sys_begin_time = ecore_time_get();
|
||||
if (e_config->suspend_connected_standby == 0)
|
||||
{
|
||||
if (systemd_works) _e_sys_systemd_suspend();
|
||||
else
|
||||
{
|
||||
_e_sys_susp_hib_check();
|
||||
e_system_send("power-suspend", NULL);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_e_sys_acpi_handler)
|
||||
ecore_event_handler_del(_e_sys_acpi_handler);
|
||||
_e_sys_acpi_handler =
|
||||
ecore_event_handler_add(E_EVENT_ACPI,
|
||||
_e_sys_cb_acpi_event,
|
||||
NULL);
|
||||
e_powersave_mode_force(E_POWERSAVE_MODE_FREEZE);
|
||||
// XXX: need some system way of forcing the system into a very low
|
||||
// power level with as many devices suspended as possible. below is
|
||||
// a simple "freeze the cpu/kernel" which is not what we want actually
|
||||
// sleep 2 && echo freeze | sudo tee /sys/power/state
|
||||
}
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_e_sys_hibernate_delay(void *data EINA_UNUSED)
|
||||
{
|
||||
_e_sys_hibernate_delay_timer = NULL;
|
||||
_e_sys_begin_time = ecore_time_get();
|
||||
if (systemd_works) _e_sys_systemd_hibernate();
|
||||
else
|
||||
{
|
||||
_e_sys_susp_hib_check();
|
||||
e_system_send("power-hibernate", NULL);
|
||||
}
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_e_sys_halt_reboot(void *data EINA_UNUSED)
|
||||
{
|
||||
_e_sys_halt_reboot_timer = NULL;
|
||||
ecore_main_loop_quit();
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
static int
|
||||
_e_sys_action_do(E_Sys_Action a, char *param EINA_UNUSED, Eina_Bool raw)
|
||||
{
|
||||
|
@ -993,6 +1075,7 @@ _e_sys_action_do(E_Sys_Action a, char *param EINA_UNUSED, Eina_Bool raw)
|
|||
{
|
||||
e_fm2_die();
|
||||
ecore_main_loop_quit();
|
||||
ret = 1;
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
|
@ -1007,6 +1090,7 @@ _e_sys_action_do(E_Sys_Action a, char *param EINA_UNUSED, Eina_Bool raw)
|
|||
e_fm2_die();
|
||||
restart = 1;
|
||||
ecore_main_loop_quit();
|
||||
ret = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1044,17 +1128,26 @@ _e_sys_action_do(E_Sys_Action a, char *param EINA_UNUSED, Eina_Bool raw)
|
|||
{
|
||||
if (raw)
|
||||
{
|
||||
printf("SSS: do actual halt...\n");
|
||||
_e_sys_begin_time = ecore_time_get();
|
||||
if (systemd_works)
|
||||
_e_sys_systemd_poweroff();
|
||||
{
|
||||
printf("SSS: tell systemd to halt...\n");
|
||||
_e_sys_systemd_poweroff();
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("SSS: tell e system service to halt...\n");
|
||||
e_system_send("power-halt", NULL);
|
||||
ret = 1;
|
||||
}
|
||||
if (!_e_sys_halt_reboot_timer)
|
||||
_e_sys_halt_reboot_timer = ecore_timer_add
|
||||
(1.0, _e_sys_halt_reboot, NULL);
|
||||
ret = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("SSS: begin halt...\n");
|
||||
ret = 0;
|
||||
_e_sys_begin_time = ecore_time_get();
|
||||
_e_sys_logout_begin(a, EINA_TRUE);
|
||||
|
@ -1071,22 +1164,30 @@ _e_sys_action_do(E_Sys_Action a, char *param EINA_UNUSED, Eina_Bool raw)
|
|||
{
|
||||
if (raw)
|
||||
{
|
||||
printf("SSS: do actual reboot...\n");
|
||||
_e_sys_begin_time = ecore_time_get();
|
||||
if (systemd_works)
|
||||
_e_sys_systemd_reboot();
|
||||
{
|
||||
printf("SSS: tell systemd to reboot...\n");
|
||||
_e_sys_systemd_reboot();
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("SSS: tell e system service to reboot...\n");
|
||||
e_system_send("power-reboot", NULL);
|
||||
ret = 1;
|
||||
}
|
||||
if (!_e_sys_halt_reboot_timer)
|
||||
_e_sys_halt_reboot_timer = ecore_timer_add
|
||||
(1.0, _e_sys_halt_reboot, NULL);
|
||||
ret = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("SSS: begin reboot...\n");
|
||||
ret = 0;
|
||||
_e_sys_begin_time = ecore_time_get();
|
||||
_e_sys_logout_begin(a, EINA_TRUE);
|
||||
}
|
||||
/* FIXME: display reboot status */
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1103,34 +1204,12 @@ _e_sys_action_do(E_Sys_Action a, char *param EINA_UNUSED, Eina_Bool raw)
|
|||
if (e_config->desklock_on_suspend)
|
||||
// XXX: this desklock - ensure its instant
|
||||
e_desklock_show(EINA_TRUE);
|
||||
_e_sys_begin_time = ecore_time_get();
|
||||
if (e_config->suspend_connected_standby == 0)
|
||||
{
|
||||
if (systemd_works)
|
||||
_e_sys_systemd_suspend();
|
||||
else
|
||||
{
|
||||
_e_sys_susp_hib_check();
|
||||
e_system_send("power-suspend", NULL);
|
||||
ret = 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_e_sys_acpi_handler)
|
||||
ecore_event_handler_del(_e_sys_acpi_handler);
|
||||
_e_sys_acpi_handler =
|
||||
ecore_event_handler_add(E_EVENT_ACPI,
|
||||
_e_sys_cb_acpi_event,
|
||||
NULL);
|
||||
e_powersave_mode_force(E_POWERSAVE_MODE_FREEZE);
|
||||
// XXX: need some system way of forcing the system
|
||||
// into a very lowe power level with as many
|
||||
// devices suspended as possible. below is a simple
|
||||
// "freeze the cpu/kernel" which is not what we
|
||||
// want actually
|
||||
// sleep 2 && echo freeze | sudo tee /sys/power/state
|
||||
}
|
||||
if (_e_sys_suspend_delay_timer)
|
||||
ecore_timer_del(_e_sys_suspend_delay_timer);
|
||||
if (e_config->suspend_connected_standby == 0) ret = 1;
|
||||
// XXX: make timer shorter if desklock is instant
|
||||
_e_sys_suspend_delay_timer =
|
||||
ecore_timer_add(0.5, _e_sys_suspend_delay, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1155,15 +1234,12 @@ _e_sys_action_do(E_Sys_Action a, char *param EINA_UNUSED, Eina_Bool raw)
|
|||
if (e_config->desklock_on_suspend)
|
||||
// XXX: this desklock - ensure its instant
|
||||
e_desklock_show(EINA_TRUE);
|
||||
_e_sys_begin_time = ecore_time_get();
|
||||
if (systemd_works)
|
||||
_e_sys_systemd_hibernate();
|
||||
else
|
||||
{
|
||||
_e_sys_susp_hib_check();
|
||||
e_system_send("power-hibernate", NULL);
|
||||
ret = 1;
|
||||
}
|
||||
if (_e_sys_hibernate_delay_timer)
|
||||
ecore_timer_del(_e_sys_hibernate_delay_timer);
|
||||
ret = 1;
|
||||
// XXX: make timer shorter if desklock is instant
|
||||
_e_sys_hibernate_delay_timer =
|
||||
ecore_timer_add(0.5, _e_sys_hibernate_delay, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -55,7 +55,7 @@ static Eina_Bool _e_ipc_cb_server_del(void *data,
|
|||
static Eina_Bool _e_ipc_cb_server_data(void *data,
|
||||
int type,
|
||||
void *event);
|
||||
static Eina_Bool _e_cb_timer(void *data);
|
||||
static Eina_Bool _e_cb_idle_enterer(void *data);
|
||||
static void _e_thumb_generate(E_Thumb *eth);
|
||||
static char *_e_thumb_file_id(char *file,
|
||||
char *key,
|
||||
|
@ -66,9 +66,9 @@ static char *_e_thumb_file_id(char *file,
|
|||
Eina_List *sigsrc);
|
||||
|
||||
/* local subsystem globals */
|
||||
static Ecore_Idle_Enterer *_idle_enterer = NULL;
|
||||
static Ecore_Ipc_Server *_e_ipc_server = NULL;
|
||||
static Eina_List *_thumblist = NULL;
|
||||
static Ecore_Timer *_timer = NULL;
|
||||
static char _thumbdir[4096] = "";
|
||||
|
||||
/* externally accessible functions */
|
||||
|
@ -116,7 +116,13 @@ main(int argc,
|
|||
e_user_dir_concat_static(_thumbdir, "fileman/thumbnails");
|
||||
ecore_file_mkpath(_thumbdir);
|
||||
|
||||
if (_e_ipc_init()) ecore_main_loop_begin();
|
||||
_idle_enterer = ecore_idle_enterer_add(_e_cb_idle_enterer, NULL);
|
||||
if (_idle_enterer)
|
||||
{
|
||||
if (_e_ipc_init()) ecore_main_loop_begin();
|
||||
ecore_idle_enterer_del(_idle_enterer);
|
||||
_idle_enterer = NULL;
|
||||
}
|
||||
|
||||
if (_e_ipc_server)
|
||||
{
|
||||
|
@ -240,7 +246,6 @@ _e_ipc_cb_server_data(void *data EINA_UNUSED,
|
|||
eth->sigsrc = sigsrc;
|
||||
if (key) eth->key = strdup(key);
|
||||
_thumblist = eina_list_append(_thumblist, eth);
|
||||
if (!_timer) _timer = ecore_timer_loop_add(0.001, _e_cb_timer, NULL);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -271,13 +276,15 @@ _e_ipc_cb_server_data(void *data EINA_UNUSED,
|
|||
return ECORE_CALLBACK_PASS_ON;
|
||||
}
|
||||
|
||||
static void
|
||||
_cb_wakeup(void *data EINA_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_e_cb_timer(void *data EINA_UNUSED)
|
||||
_e_cb_idle_enterer(void *data EINA_UNUSED)
|
||||
{
|
||||
E_Thumb *eth;
|
||||
/*
|
||||
Eina_List *del_list = NULL, *l;
|
||||
*/
|
||||
|
||||
/* take thumb at head of list */
|
||||
if (_thumblist)
|
||||
|
@ -291,13 +298,9 @@ _e_cb_timer(void *data EINA_UNUSED)
|
|||
free(eth->file);
|
||||
free(eth->key);
|
||||
free(eth);
|
||||
|
||||
if (_thumblist) _timer = ecore_timer_loop_add(0.01, _e_cb_timer, NULL);
|
||||
else _timer = NULL;
|
||||
if (_thumblist) ecore_job_add(_cb_wakeup, NULL);
|
||||
}
|
||||
else
|
||||
_timer = NULL;
|
||||
return ECORE_CALLBACK_CANCEL;
|
||||
return ECORE_CALLBACK_RENEW;
|
||||
}
|
||||
|
||||
typedef struct _Color Color;
|
||||
|
@ -322,7 +325,11 @@ _e_thumb_generate(E_Thumb *eth)
|
|||
const unsigned int *data = NULL;
|
||||
time_t mtime_orig, mtime_thumb;
|
||||
|
||||
id = _e_thumb_file_id(eth->file, eth->key, eth->desk_x, eth->desk_y, eth->desk_x_count, eth->desk_y_count, eth->sigsrc);
|
||||
id = _e_thumb_file_id(eth->file, eth->key,
|
||||
0, 0, 1, 1,
|
||||
// eth->desk_x, eth->desk_y,
|
||||
// eth->desk_x_count, eth->desk_y_count,
|
||||
eth->sigsrc);
|
||||
if (!id) return;
|
||||
|
||||
td = strdup(id);
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <pwd.h>
|
||||
#include <signal.h>
|
||||
#ifdef HAVE_PRCTL
|
||||
# include <sys/prctl.h>
|
||||
#elif defined(HAVE_PROCCTL)
|
||||
|
|
|
@ -6,13 +6,15 @@ static void _e_xkb_type_reconfig(E_Pixmap_Type comp_type);
|
|||
static void _e_xkb_type_update(E_Pixmap_Type comp_type, int cur_group);
|
||||
|
||||
static int _e_xkb_cur_group = -1;
|
||||
static Ecore_Event_Handler *xkb_state_handler = NULL, *xkb_new_keyboard_handler = NULL;
|
||||
|
||||
static Ecore_Exe *cur_exe;
|
||||
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
static Ecore_Event_Handler *xkb_state_handler = NULL;
|
||||
static Ecore_Event_Handler *xkb_new_keyboard_handler = NULL;
|
||||
static Ecore_Event_Handler *xkb_keymap_handler = NULL;
|
||||
static int skip_new_keyboard = 0;
|
||||
static Ecore_Timer *save_group;
|
||||
static Ecore_Timer *save_group = NULL;
|
||||
#endif
|
||||
|
||||
E_API int E_EVENT_XKB_CHANGED = 0;
|
||||
|
@ -41,6 +43,7 @@ _eval_cur_group(void)
|
|||
e_config->xkb.cur_group = 0;
|
||||
}
|
||||
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
static Eina_Bool
|
||||
_e_xkb_init_timer(void *data EINA_UNUSED)
|
||||
{
|
||||
|
@ -49,9 +52,10 @@ _e_xkb_init_timer(void *data EINA_UNUSED)
|
|||
_eval_cur_group();
|
||||
|
||||
e_xkb_update(e_config->xkb.cur_group);
|
||||
|
||||
ecore_x_xkb_track_state();
|
||||
return EINA_FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
|
||||
|
@ -64,12 +68,9 @@ _e_xkb_save_group(void *data)
|
|||
{
|
||||
e_config->xkb.cur_group = group;
|
||||
e_config_save_queue();
|
||||
|
||||
e_xkb_update(e_config->xkb.cur_group);
|
||||
}
|
||||
|
||||
save_group = NULL;
|
||||
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
|
@ -94,10 +95,15 @@ _xkb_new_state(void* data EINA_UNUSED, int type EINA_UNUSED, void *event)
|
|||
{
|
||||
Ecore_X_Event_Xkb *ev = event;
|
||||
|
||||
ecore_timer_del(save_group);
|
||||
if (save_group) ecore_timer_del(save_group);
|
||||
save_group = ecore_timer_loop_add(0.5, _e_xkb_save_group, (void *)(intptr_t)ev->group);
|
||||
|
||||
save_group = ecore_timer_loop_add(0.5, _e_xkb_save_group, (void*)(intptr_t)ev->group);
|
||||
return ECORE_CALLBACK_PASS_ON;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_xkb_keymap(void* data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSED)
|
||||
{
|
||||
return ECORE_CALLBACK_PASS_ON;
|
||||
}
|
||||
#endif
|
||||
|
@ -124,15 +130,19 @@ e_xkb_init(E_Pixmap_Type comp_type)
|
|||
{
|
||||
xkb_state_handler = ecore_event_handler_add(ECORE_X_EVENT_XKB_STATE_NOTIFY, _xkb_new_state, NULL);
|
||||
xkb_new_keyboard_handler = ecore_event_handler_add(ECORE_X_EVENT_XKB_NEWKBD_NOTIFY, _xkb_new_keyboard, NULL);
|
||||
xkb_keymap_handler = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_KEYMAP, _xkb_keymap, NULL);
|
||||
}
|
||||
#endif
|
||||
if (e_config->xkb.dont_touch_my_damn_keyboard) return 1;
|
||||
|
||||
_e_xkb_type_reconfig(comp_type);
|
||||
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
if (comp_type == E_PIXMAP_TYPE_X)
|
||||
ecore_timer_loop_add(1.5, _e_xkb_init_timer, NULL);
|
||||
else if (comp_type == E_PIXMAP_TYPE_WL)
|
||||
else
|
||||
#endif
|
||||
if (comp_type == E_PIXMAP_TYPE_WL)
|
||||
{
|
||||
_eval_cur_group();
|
||||
_e_xkb_type_update(comp_type, e_config->xkb.cur_group);
|
||||
|
@ -144,9 +154,10 @@ e_xkb_init(E_Pixmap_Type comp_type)
|
|||
E_API int
|
||||
e_xkb_shutdown(void)
|
||||
{
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
E_FREE_FUNC(xkb_keymap_handler, ecore_event_handler_del);
|
||||
E_FREE_FUNC(xkb_state_handler, ecore_event_handler_del);
|
||||
E_FREE_FUNC(xkb_new_keyboard_handler, ecore_event_handler_del);
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
ecore_timer_del(save_group);
|
||||
save_group = NULL;
|
||||
#endif
|
||||
|
@ -247,12 +258,16 @@ _e_x_xkb_update(int cur_group)
|
|||
if (e_config->xkb.dont_touch_my_damn_keyboard) return;
|
||||
if ((!e_config->xkb.used_layouts) && (!e_config->xkb.used_options) && (!e_config->xkb.default_model)) return;
|
||||
if (!getenv("DISPLAY")) return;
|
||||
if (cur_group != -1)
|
||||
if (cur_group != _e_xkb_cur_group)
|
||||
{
|
||||
_e_xkb_cur_group = cur_group;
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
if (e_comp->root)
|
||||
ecore_x_xkb_select_group(cur_group);
|
||||
{
|
||||
e_comp_canvas_keys_ungrab();
|
||||
ecore_x_xkb_select_group(cur_group);
|
||||
e_comp_canvas_keys_grab();
|
||||
}
|
||||
#endif
|
||||
e_deskenv_xmodmap_run();
|
||||
_e_xkb_update_event(cur_group);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
// define here to avoid needing x includes directly.
|
||||
#define C16 unsigned short
|
||||
#define C32 unsigned long
|
||||
#define C32 unsigned int
|
||||
|
||||
#define RETRY_TIMEOUT 2.0
|
||||
|
||||
|
|
|
@ -15,6 +15,8 @@ deps_e = [
|
|||
dep_rt,
|
||||
dep_m,
|
||||
dep_dl,
|
||||
dep_execinfo,
|
||||
dep_fnmatch,
|
||||
dep_eina,
|
||||
dep_eet,
|
||||
dep_eeze,
|
||||
|
|
|
@ -123,5 +123,7 @@ void e_system_cpufreq_shutdown(void);
|
|||
void e_system_ddc_init(void);
|
||||
void e_system_ddc_shutdown(void);
|
||||
|
||||
extern Ecore_Exe *e_system_run(const char *exe);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -174,6 +174,7 @@ _light_add(const char *dev)
|
|||
static Eina_Bool
|
||||
_light_device_include(const char *dev)
|
||||
{ // filter out known undesirable devices
|
||||
fprintf(stderr, "BL: found [%s]\n", dev);
|
||||
if (strstr(dev, "::capslock")) return EINA_FALSE;
|
||||
if (strstr(dev, "::numlock")) return EINA_FALSE;
|
||||
if (strstr(dev, "::scrolllock")) return EINA_FALSE;
|
||||
|
@ -198,12 +199,14 @@ _light_refresh_devices()
|
|||
const char *s;
|
||||
|
||||
devs = eeze_udev_find_by_filter("backlight", NULL, NULL);
|
||||
fprintf(stderr, "BL: backlight devices...\n");
|
||||
EINA_LIST_FREE(devs, s)
|
||||
{
|
||||
if (_light_device_include(s)) _light_add(s);
|
||||
eina_stringshare_del(s);
|
||||
}
|
||||
devs = eeze_udev_find_by_filter("leds", NULL, NULL);
|
||||
fprintf(stderr, "BL: led devices...\n");
|
||||
EINA_LIST_FREE(devs, s)
|
||||
{
|
||||
if (_light_device_include(s)) _light_add(s);
|
||||
|
@ -301,6 +304,7 @@ _cb_bklight_set(void *data EINA_UNUSED, const char *params)
|
|||
if (!params) return;
|
||||
if (sscanf(params, "%1023s %i", dev, &val) != 2) return;
|
||||
eina_lock_take(&_devices_lock);
|
||||
fprintf(stderr, "BL: set [%s] -> %i\n", dev, val);
|
||||
lig = _light_find(dev);
|
||||
if (!lig) goto done;
|
||||
lig->val_set = val;
|
||||
|
|
|
@ -203,3 +203,16 @@ main(int argc EINA_UNUSED, const char **argv EINA_UNUSED)
|
|||
eina_shutdown();
|
||||
return 0;
|
||||
}
|
||||
|
||||
Ecore_Exe *
|
||||
e_system_run(const char *cmd)
|
||||
{
|
||||
Ecore_Exe_Flags flags = ECORE_EXE_NONE;
|
||||
#if (ECORE_VERSION_MAJOR >= 1) && (ECORE_VERSION_MINOR >= 21)
|
||||
flags |= ECORE_EXE_ISOLATE_IO;
|
||||
#else
|
||||
flags |= 1024; // isolate_io is bit 10 .... it will be ignored if
|
||||
// efl doesn't do it, so harmless
|
||||
#endif
|
||||
return ecore_exe_pipe_run(cmd, flags, NULL);
|
||||
}
|
||||
|
|
|
@ -8,25 +8,25 @@ char *_cmd_hibernate = NULL;
|
|||
static void
|
||||
_cb_power_halt(void *data EINA_UNUSED, const char *params EINA_UNUSED)
|
||||
{
|
||||
if (_cmd_halt) ecore_exe_run(_cmd_halt, NULL);
|
||||
if (_cmd_halt) e_system_run(_cmd_halt);
|
||||
}
|
||||
|
||||
static void
|
||||
_cb_power_reboot(void *data EINA_UNUSED, const char *params EINA_UNUSED)
|
||||
{
|
||||
if (_cmd_reboot) ecore_exe_run(_cmd_reboot, NULL);
|
||||
if (_cmd_reboot) e_system_run(_cmd_reboot);
|
||||
}
|
||||
|
||||
static void
|
||||
_cb_power_suspend(void *data EINA_UNUSED, const char *params EINA_UNUSED)
|
||||
{
|
||||
if (_cmd_suspend) ecore_exe_run(_cmd_suspend, NULL);
|
||||
if (_cmd_suspend) e_system_run(_cmd_suspend);
|
||||
}
|
||||
|
||||
static void
|
||||
_cb_power_hibernate(void *data EINA_UNUSED, const char *params EINA_UNUSED)
|
||||
{
|
||||
if (_cmd_hibernate) ecore_exe_run(_cmd_hibernate, NULL);
|
||||
if (_cmd_hibernate) e_system_run(_cmd_hibernate);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -272,19 +272,19 @@ _store_action_do(Action *a)
|
|||
{
|
||||
if (a->cmd2)
|
||||
{
|
||||
a->exe = ecore_exe_run(a->cmd2, NULL);
|
||||
a->exe = e_system_run(a->cmd2);
|
||||
free(a->cmd2);
|
||||
a->cmd2 = NULL;
|
||||
}
|
||||
else if (a->cmd1)
|
||||
{
|
||||
a->exe = ecore_exe_run(a->cmd1, NULL);
|
||||
a->exe = e_system_run(a->cmd1);
|
||||
free(a->cmd1);
|
||||
a->cmd1 = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
a->exe = ecore_exe_run(a->cmd, NULL);
|
||||
a->exe = e_system_run(a->cmd);
|
||||
free(a->cmd);
|
||||
a->cmd = NULL;
|
||||
}
|
||||
|
|
|
@ -188,7 +188,7 @@ _battery_sysctl_battery_update()
|
|||
charge = 0;
|
||||
|
||||
/* last full capacity */
|
||||
bat->mib[3] = 7;
|
||||
bat->mib[3] = SENSOR_WATTHOUR;
|
||||
bat->mib[4] = 0;
|
||||
if (sysctl(bat->mib, 5, &s, &slen, NULL, 0) != -1)
|
||||
{
|
||||
|
@ -196,31 +196,30 @@ _battery_sysctl_battery_update()
|
|||
}
|
||||
|
||||
/* remaining capacity */
|
||||
bat->mib[3] = 7;
|
||||
bat->mib[3] = SENSOR_WATTHOUR;
|
||||
bat->mib[4] = 3;
|
||||
if (sysctl(bat->mib, 5, &s, &slen, NULL, 0) != -1)
|
||||
{
|
||||
charge = (double)s.value;
|
||||
}
|
||||
|
||||
/* This is a workaround because there's an ACPI bug */
|
||||
if ((EINA_FLT_EQ(charge, 0.0)) || (EINA_FLT_EQ(bat->last_full_charge, 0.0)))
|
||||
{
|
||||
/* last full capacity */
|
||||
bat->mib[3] = 8;
|
||||
bat->mib[4] = 0;
|
||||
if (sysctl(bat->mib, 5, &s, &slen, NULL, 0) != -1)
|
||||
{
|
||||
bat->last_full_charge = (double)s.value;
|
||||
}
|
||||
/* last full capacity */
|
||||
bat->mib[3] = SENSOR_AMPHOUR;
|
||||
bat->mib[4] = 0;
|
||||
if (sysctl(bat->mib, 5, &s, &slen, NULL, 0) != -1)
|
||||
{
|
||||
bat->last_full_charge = (double)s.value;
|
||||
}
|
||||
|
||||
/* remaining capacity */
|
||||
bat->mib[3] = 8;
|
||||
bat->mib[4] = 3;
|
||||
if (sysctl(bat->mib, 5, &s, &slen, NULL, 0) != -1)
|
||||
{
|
||||
charge = (double)s.value;
|
||||
}
|
||||
/* remaining capacity */
|
||||
bat->mib[3] = SENSOR_AMPHOUR;
|
||||
bat->mib[4] = 3;
|
||||
if (sysctl(bat->mib, 5, &s, &slen, NULL, 0) != -1)
|
||||
{
|
||||
charge = (double)s.value;
|
||||
}
|
||||
}
|
||||
|
||||
bat->got_prop = 1;
|
||||
|
|
|
@ -62,7 +62,7 @@ static void _cpufreq_menu_frequency(void *data, E_Menu *m, E_Menu_Item *mi)
|
|||
static void _cpufreq_menu_pstate_min(void *data, E_Menu *m, E_Menu_Item *mi);
|
||||
static void _cpufreq_menu_pstate_max(void *data, E_Menu *m, E_Menu_Item *mi);
|
||||
|
||||
#if defined(__FreeBSD__) || defined(__DragonFly__) || defined (__OpenBSD__)
|
||||
#if defined (__OpenBSD__)
|
||||
#else
|
||||
static int _cpufreq_cb_sort(const void *item1, const void *item2);
|
||||
#endif
|
||||
|
@ -586,8 +586,8 @@ _cpufreq_set_frequency(int frequency)
|
|||
return;
|
||||
}
|
||||
|
||||
#ifndef __OpenBSD__
|
||||
/* OpenBSD doesn't have governors */
|
||||
#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__)
|
||||
/* No governors (yet). */
|
||||
_cpufreq_set_governor("userspace");
|
||||
#endif
|
||||
_cpufreq_response_init();
|
||||
|
@ -634,7 +634,7 @@ _cpufreq_status_free(Cpu_Status *s)
|
|||
free(s);
|
||||
}
|
||||
|
||||
#if defined(__FreeBSD__) || defined(__DragonFly__) || defined (__OpenBSD__)
|
||||
#if defined (__OpenBSD__)
|
||||
#else
|
||||
static int
|
||||
_cpufreq_cb_sort(const void *item1, const void *item2)
|
||||
|
@ -678,6 +678,8 @@ _cpufreq_status_check_available(Cpu_Status *s)
|
|||
p = 25;
|
||||
s->frequencies = eina_list_append(s->frequencies, (void *)(long int)p);
|
||||
#elif defined (__FreeBSD__) || defined(__DragonFly__)
|
||||
int freq_min = 0x7fffffff;
|
||||
int freq_max = 0;
|
||||
int freq;
|
||||
size_t len = sizeof(buf);
|
||||
char *pos, *q;
|
||||
|
@ -702,11 +704,20 @@ _cpufreq_status_check_available(Cpu_Status *s)
|
|||
*q = '\0';
|
||||
freq = atoi(pos);
|
||||
freq *= 1000;
|
||||
|
||||
if (freq > freq_max) freq_max = freq;
|
||||
if (freq < freq_min) freq_min = freq;
|
||||
|
||||
s->frequencies = eina_list_append(s->frequencies, (void *)(long)freq);
|
||||
|
||||
pos = q + 1;
|
||||
pos = strchr(pos, ' ');
|
||||
}
|
||||
s->cur_min_frequency = freq_min;
|
||||
s->cur_max_frequency = freq_max;
|
||||
s->frequencies = eina_list_sort(s->frequencies,
|
||||
eina_list_count(s->frequencies),
|
||||
_cpufreq_cb_sort);
|
||||
}
|
||||
|
||||
/* sort is not necessary because freq_levels is already sorted */
|
||||
|
@ -875,6 +886,8 @@ _cpufreq_status_check_current(Cpu_Status *s)
|
|||
size_t len = sizeof(frequency);
|
||||
s->active = 0;
|
||||
|
||||
_cpufreq_status_check_available(s);
|
||||
|
||||
/* frequency is stored in dev.cpu.0.freq */
|
||||
if (sysctlbyname("dev.cpu.0.freq", &frequency, &len, NULL, 0) == 0)
|
||||
{
|
||||
|
@ -887,7 +900,6 @@ _cpufreq_status_check_current(Cpu_Status *s)
|
|||
/* hardcoded for testing */
|
||||
s->can_set_frequency = 1;
|
||||
s->cur_governor = NULL;
|
||||
|
||||
#else
|
||||
char buf[4096];
|
||||
FILE *f;
|
||||
|
@ -1043,7 +1055,7 @@ _cpufreq_face_update_available(Instance *inst)
|
|||
edje_object_message_send(inst->o_cpu, EDJE_MESSAGE_STRING_SET, 2, governor_msg);
|
||||
free(governor_msg);
|
||||
}
|
||||
#if defined(__OpenBSD__)
|
||||
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
|
||||
_cpufreq_face_update_current(inst);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -132,7 +132,7 @@ static void _pager_desk_cb_mouse_move(void *data, Evas *e EINA_UNUSE
|
|||
static void _pager_desk_cb_drag_finished(E_Drag *drag, int dropped);
|
||||
static void _pager_desk_cb_mouse_wheel(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info);
|
||||
static Eina_Bool _pager_popup_cb_timeout(void *data);
|
||||
static Pager *_pager_new(Evas *evas, E_Zone *zone, E_Gadcon *gc);
|
||||
static Pager *_pager_new(Evas *evas, E_Zone *zone, E_Gadcon *gc, Instance *inst);
|
||||
static void _pager_free(Pager *p);
|
||||
static void _pager_fill(Pager *p, E_Gadcon *gc);
|
||||
static void _pager_empty(Pager *p);
|
||||
|
@ -169,6 +169,7 @@ static int hold_count = 0;
|
|||
static int hold_mod = 0;
|
||||
static E_Desk *current_desk = NULL;
|
||||
static Eina_List *pagers = NULL;
|
||||
static double _pager_start_time = 0.0;
|
||||
|
||||
EINTERN E_Module *module;
|
||||
EINTERN E_Config_Dialog *config_dialog;
|
||||
|
@ -218,9 +219,7 @@ _gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style)
|
|||
|
||||
inst = E_NEW(Instance, 1);
|
||||
|
||||
p = _pager_new(gc->evas, gc->zone, gc);
|
||||
p->inst = inst;
|
||||
inst->pager = p;
|
||||
p = _pager_new(gc->evas, gc->zone, gc, inst);
|
||||
o = p->o_table;
|
||||
gcc = e_gadcon_client_new(gc, name, id, style, o);
|
||||
gcc->data = inst;
|
||||
|
@ -262,7 +261,7 @@ _gc_shutdown(E_Gadcon_Client *gcc)
|
|||
}
|
||||
|
||||
static void
|
||||
_gc_orient(E_Gadcon_Client *gcc, E_Gadcon_Orient orient EINA_UNUSED)
|
||||
_aspect(E_Gadcon_Client *gcc)
|
||||
{
|
||||
Instance *inst;
|
||||
int aspect_w, aspect_h;
|
||||
|
@ -289,6 +288,12 @@ _gc_orient(E_Gadcon_Client *gcc, E_Gadcon_Orient orient EINA_UNUSED)
|
|||
e_gadcon_client_min_size_set(gcc, 4, 4 * aspect_ratio);
|
||||
}
|
||||
|
||||
static void
|
||||
_gc_orient(E_Gadcon_Client *gcc, E_Gadcon_Orient orient EINA_UNUSED)
|
||||
{
|
||||
_aspect(gcc);
|
||||
}
|
||||
|
||||
static const char *
|
||||
_gc_label(const E_Gadcon_Client_Class *client_class EINA_UNUSED)
|
||||
{
|
||||
|
@ -347,6 +352,7 @@ _pager_recalc(void *data)
|
|||
e_gadcon_client_aspect_set(p->inst->gcc, p->ynum * w, p->xnum * h);
|
||||
else
|
||||
e_gadcon_client_aspect_set(p->inst->gcc, p->xnum * w, p->ynum * h);
|
||||
_aspect(p->inst->gcc);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -360,15 +366,16 @@ _pager_resize(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, voi
|
|||
}
|
||||
|
||||
static Pager *
|
||||
_pager_new(Evas *evas, E_Zone *zone, E_Gadcon *gc)
|
||||
_pager_new(Evas *evas, E_Zone *zone, E_Gadcon *gc, Instance *inst)
|
||||
{
|
||||
Pager *p;
|
||||
|
||||
p = E_NEW(Pager, 1);
|
||||
p->inst = NULL;
|
||||
p->popup = NULL;
|
||||
p->inst = inst;
|
||||
if (inst) inst->pager = p;
|
||||
p->o_table = elm_table_add(e_win_evas_win_get(evas));
|
||||
evas_object_event_callback_add(p->o_table, EVAS_CALLBACK_RESIZE, _pager_resize, p);
|
||||
evas_object_event_callback_add(p->o_table, EVAS_CALLBACK_RESIZE,
|
||||
_pager_resize, p);
|
||||
elm_table_homogeneous_set(p->o_table, 1);
|
||||
p->zone = zone;
|
||||
_pager_fill(p, gc);
|
||||
|
@ -760,7 +767,7 @@ _pager_popup_new(E_Zone *zone, int keyaction)
|
|||
|
||||
/* Show popup */
|
||||
|
||||
pp->pager = _pager_new(e_comp->evas, zone, NULL);
|
||||
pp->pager = _pager_new(e_comp->evas, zone, NULL, NULL);
|
||||
|
||||
pp->pager->popup = pp;
|
||||
pp->urgent = 0;
|
||||
|
@ -1040,7 +1047,8 @@ _pager_cb_event_desk_show(void *data EINA_UNUSED, int type EINA_UNUSED, void *ev
|
|||
edje_object_part_text_set(p->popup->o_bg, "e.text.label", ev->desk->name);
|
||||
}
|
||||
|
||||
if ((pager_config->popup) && (!act_popup))
|
||||
if ((pager_config->popup) && (!act_popup) &&
|
||||
((ecore_time_get() - _pager_start_time) > 0.5)) //. not at start
|
||||
{
|
||||
if ((pp = _pager_popup_find(ev->desk->zone)))
|
||||
evas_object_show(pp->popup);
|
||||
|
@ -1049,7 +1057,7 @@ _pager_cb_event_desk_show(void *data EINA_UNUSED, int type EINA_UNUSED, void *ev
|
|||
if (pp->timer)
|
||||
ecore_timer_loop_reset(pp->timer);
|
||||
else
|
||||
pp->timer = ecore_timer_loop_add(pager_config->popup_speed,
|
||||
pp->timer = ecore_timer_add(pager_config->popup_speed,
|
||||
_pager_popup_cb_timeout, pp);
|
||||
}
|
||||
|
||||
|
@ -2082,6 +2090,7 @@ e_modapi_init(E_Module *m)
|
|||
{
|
||||
E_Module *p;
|
||||
|
||||
_pager_start_time = ecore_time_get();
|
||||
e_modapi_gadget_init(m);
|
||||
p = e_module_find("pager_plain");
|
||||
if (p && p->enabled)
|
||||
|
|
|
@ -41,11 +41,16 @@ _cb_ok(void *data EINA_UNUSED, Evas_Object *obj,
|
|||
|
||||
if (!ps) return;
|
||||
if (ps->exe_exit_handler) return;
|
||||
elm_object_disabled_set(evas_object_data_get(obj, "label"), EINA_TRUE);
|
||||
elm_object_disabled_set(evas_object_data_get(obj, "label2"), EINA_TRUE);
|
||||
elm_object_disabled_set(evas_object_data_get(obj, "entry"), EINA_TRUE);
|
||||
e_dialog_button_disable_num_set(evas_object_data_get(obj, "dia"), 0, 1);
|
||||
e_dialog_button_disable_num_set(evas_object_data_get(obj, "dia"), 1, 1);
|
||||
ps->exe_exit_handler = ecore_event_handler_add(ECORE_EXE_EVENT_DEL,
|
||||
_auth_cb_exit, ps);
|
||||
if (str)
|
||||
{
|
||||
char *passwd = strdup(str);
|
||||
char *passwd = elm_entry_markup_to_utf8(str);
|
||||
if (passwd)
|
||||
{
|
||||
ps->auth_pid = e_auth_polkit_begin(passwd, ps->cookie, ps->target_uid);
|
||||
|
@ -82,7 +87,9 @@ void
|
|||
auth_ui(Polkit_Session *ps)
|
||||
{
|
||||
E_Dialog *dia;
|
||||
Evas_Object *o, *win, *box, *ent;
|
||||
Evas_Object *o, *win, *box, *fr, *lab, *lab2, *ent;
|
||||
char buf[512];
|
||||
struct passwd *pass;
|
||||
|
||||
dia = e_dialog_new(NULL, "E", "_polkit_auth");
|
||||
e_dialog_title_set(dia, _("Please enter password"));
|
||||
|
@ -114,25 +121,65 @@ auth_ui(Polkit_Session *ps)
|
|||
evas_object_show(o);
|
||||
*/
|
||||
|
||||
o = elm_label_add(win);
|
||||
fr = o = elm_frame_add(win);
|
||||
elm_object_style_set(o, "pad_medium");
|
||||
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
|
||||
evas_object_size_hint_align_set(o, 0.0, 0.0);
|
||||
elm_box_pack_end(box, o);
|
||||
evas_object_show(o);
|
||||
|
||||
lab = o = elm_label_add(win);
|
||||
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
|
||||
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.0);
|
||||
elm_object_text_set(o, ps->message);
|
||||
elm_object_content_set(fr, o);
|
||||
evas_object_show(o);
|
||||
evas_object_data_set(win, "label", o);
|
||||
|
||||
fr = o = elm_frame_add(win);
|
||||
elm_object_style_set(o, "pad_medium");
|
||||
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
|
||||
evas_object_size_hint_align_set(o, 0.0, 0.0);
|
||||
elm_box_pack_end(box, o);
|
||||
evas_object_show(o);
|
||||
|
||||
pass = getpwuid(ps->target_uid);
|
||||
if ((pass) && (pass->pw_name))
|
||||
snprintf(buf, sizeof(buf), _("Enter password for <b>%s</b>"), pass->pw_name);
|
||||
else
|
||||
snprintf(buf, sizeof(buf), _("Enter passowrd for UID %u"), ps->target_uid);
|
||||
lab2 = o = elm_label_add(win);
|
||||
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
|
||||
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.0);
|
||||
elm_object_text_set(o, buf);
|
||||
elm_object_content_set(fr, o);
|
||||
evas_object_show(o);
|
||||
evas_object_data_set(win, "label2", o);
|
||||
|
||||
fr = o = elm_frame_add(win);
|
||||
elm_object_style_set(o, "pad_medium");
|
||||
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
|
||||
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 1.0);
|
||||
elm_box_pack_end(box, o);
|
||||
evas_object_show(o);
|
||||
|
||||
ent = o = elm_entry_add(win);
|
||||
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
|
||||
evas_object_size_hint_align_set(o, -1.0, 1.0);
|
||||
elm_entry_single_line_set(ent, EINA_TRUE);
|
||||
elm_entry_scrollable_set(ent, EINA_TRUE);
|
||||
elm_entry_password_set(ent, EINA_TRUE);
|
||||
elm_object_part_text_set(ent, "elm.guide", "Enter Password");
|
||||
evas_object_data_set(ent, "session", ps);
|
||||
evas_object_smart_callback_add(ent, "activated", _cb_ok, NULL);
|
||||
evas_object_smart_callback_add(ent, "aborted", _cb_cancel, NULL);
|
||||
elm_box_pack_end(box, o);
|
||||
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.0);
|
||||
elm_entry_single_line_set(o, EINA_TRUE);
|
||||
elm_entry_scrollable_set(o, EINA_TRUE);
|
||||
elm_entry_password_set(o, EINA_TRUE);
|
||||
elm_object_part_text_set(o, "elm.guide", "Enter Password");
|
||||
evas_object_data_set(o, "session", ps);
|
||||
evas_object_data_set(o, "label", lab);
|
||||
evas_object_data_set(o, "label2", lab2);
|
||||
evas_object_data_set(o, "entry", ent);
|
||||
evas_object_data_set(o, "dia", dia);
|
||||
evas_object_smart_callback_add(o, "activated", _cb_ok, win);
|
||||
evas_object_smart_callback_add(o, "aborted", _cb_cancel, win);
|
||||
elm_object_content_set(fr, o);
|
||||
evas_object_show(o);
|
||||
evas_object_data_set(win, "entry", o);
|
||||
|
||||
e_dialog_button_add(dia, _("OK"), NULL, _cb_button_ok, ent);
|
||||
e_dialog_button_add(dia, _("Cancel"), NULL, _cb_button_cancel, ent);
|
||||
|
|
|
@ -2108,6 +2108,7 @@ ui_edit(Evas_Object *window, Evas_Object *o_bg, E_Zone *zone,
|
|||
evas_object_show(o);
|
||||
|
||||
o_img = o = evas_object_image_filled_add(evas2);
|
||||
evas_object_image_smooth_scale_set(o_img, EINA_FALSE);
|
||||
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN,
|
||||
_cb_draw_none_mouse_down, NULL);
|
||||
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
|
@ -2117,6 +2118,7 @@ ui_edit(Evas_Object *window, Evas_Object *o_bg, E_Zone *zone,
|
|||
evas_object_image_data_copy_set(o, dst);
|
||||
evas_object_image_data_update_add(o, 0, 0, sw, sh);
|
||||
evas_object_size_hint_min_set(o, img_w, img_h);
|
||||
evas_object_size_hint_max_set(o, img_w, img_h);
|
||||
elm_win_resize_object_add(win2, o);
|
||||
evas_object_show(o);
|
||||
|
||||
|
|
|
@ -46,7 +46,6 @@ typedef struct Client_Extra
|
|||
Eina_Bool floating E_BITFIELD;
|
||||
Eina_Bool tiled E_BITFIELD;
|
||||
Eina_Bool tracked E_BITFIELD;
|
||||
Eina_Bool being_removed E_BITFIELD;
|
||||
} Client_Extra;
|
||||
|
||||
typedef struct _Instance
|
||||
|
@ -116,6 +115,7 @@ static struct tiling_mod_main_g
|
|||
*act_move_right, *act_toggle_split_mode, *act_swap_window;
|
||||
|
||||
Desk_Split_Type *current_split_type;
|
||||
Ecore_Job *apply_tree_job;
|
||||
|
||||
struct {
|
||||
Evas_Object *comp_obj;
|
||||
|
@ -481,7 +481,7 @@ _reapply_tree(void)
|
|||
if (zw > 0 && zh > 0)
|
||||
tiling_window_tree_apply(_G.tinfo->tree, zx, zy, zw, zh,
|
||||
tiling_g.config->window_padding,
|
||||
EINA_FALSE);
|
||||
EINA_TRUE);
|
||||
else
|
||||
ERR("The zone desk geometry was not useful at all (%d,%d,%d,%d)", zx, zy, zw, zh);
|
||||
}
|
||||
|
@ -796,8 +796,6 @@ _client_remove_no_apply(E_Client *ec)
|
|||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
extra->being_removed = EINA_TRUE;
|
||||
|
||||
if (extra->drag.drag)
|
||||
{
|
||||
_client_drag_terminate(ec);
|
||||
|
@ -845,8 +843,6 @@ toggle_floating(E_Client *ec)
|
|||
return;
|
||||
}
|
||||
|
||||
if (extra->being_removed) return;
|
||||
|
||||
extra->floating = !extra->floating;
|
||||
|
||||
if (!desk_should_tile_check(ec->desk))
|
||||
|
@ -864,11 +860,22 @@ toggle_floating(E_Client *ec)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_window_tree_apply_delayed(void *data EINA_UNUSED)
|
||||
{
|
||||
_reapply_tree();
|
||||
ecore_job_del(_G.apply_tree_job);
|
||||
_G.apply_tree_job = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
tiling_e_client_does_not_fit(E_Client *ec)
|
||||
{
|
||||
E_Notification_Notify n;
|
||||
Eina_Strbuf *buf;
|
||||
Client_Extra *extra = tiling_entry_no_desk_func(ec);
|
||||
|
||||
EINA_SAFETY_ON_NULL_RETURN(extra);
|
||||
|
||||
buf = eina_strbuf_new();
|
||||
eina_strbuf_append_printf(buf, _("Window %s cannot be tiled\n"),
|
||||
|
@ -881,9 +888,17 @@ tiling_e_client_does_not_fit(E_Client *ec)
|
|||
n.body = eina_strbuf_string_get(buf);
|
||||
n.timeout = 8000;
|
||||
e_notification_client_send(&n, NULL, NULL);
|
||||
toggle_floating(ec);
|
||||
|
||||
eina_strbuf_string_free(buf);
|
||||
|
||||
EINA_SAFETY_ON_TRUE_RETURN(extra->floating);
|
||||
|
||||
//remove the client here without applying the tree again to break maybe possible recursions
|
||||
{
|
||||
extra->floating = EINA_TRUE;
|
||||
_restore_client(ec);
|
||||
_client_remove_no_apply(ec);
|
||||
_G.apply_tree_job = ecore_job_add(_window_tree_apply_delayed, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -306,10 +306,14 @@ _tiling_window_tree_level_apply(Window_Tree *root, Evas_Coord x, Evas_Coord y,
|
|||
if (!e_object_is_del(E_OBJECT(root->client)))
|
||||
{
|
||||
if ((root->client->icccm.min_w > (w - padding)) ||
|
||||
(root->client->icccm.min_h > (h - padding)))
|
||||
(root->client->icccm.min_h > (h - padding))) {
|
||||
*floaters = eina_list_append(*floaters, root->client);
|
||||
tiling_e_client_move_resize_extra(root->client, x, y,
|
||||
w - padding, h - padding);
|
||||
} else {
|
||||
tiling_e_client_move_resize_extra(root->client, x, y,
|
||||
w - padding, h - padding);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1010,7 +1010,6 @@ _e_kbd_int_layout_build(E_Kbd_Int *ki)
|
|||
|
||||
evas_object_grid_size_set(ki->layout_obj, ki->layout.w, ki->layout.h);
|
||||
|
||||
printf("================ layout build %ix%i\n", ki->layout.w, ki->layout.h);
|
||||
EINA_LIST_FOREACH(ki->layout.keys, l, ky)
|
||||
{
|
||||
E_Kbd_Int_Key_State *st;
|
||||
|
|
Loading…
Reference in New Issue