forked from enlightenment/enlightenment
Call the netwm property by it's right name.
Let the startup id be unique (almost). SVN revision: 17067
This commit is contained in:
parent
50fc338b77
commit
a1836622d9
|
@ -1519,7 +1519,6 @@ static int
|
|||
_e_apps_cb_exit(void *data, int type, void *event)
|
||||
{
|
||||
Ecore_Event_Exe_Exit *ev;
|
||||
Evas_List *l;
|
||||
E_App_Instance *ai;
|
||||
E_App *a;
|
||||
|
||||
|
@ -1557,14 +1556,14 @@ _e_app_cb_event_border_add(void *data, int type, void *event)
|
|||
E_App_Instance *inst;
|
||||
|
||||
ev = event;
|
||||
if (ev->border->client.netwm.e_start_launch_id <= 0) return 1;
|
||||
if (ev->border->client.netwm.startup_id <= 0) return 1;
|
||||
for (l = _e_apps_start_pending; l; l = l->next)
|
||||
{
|
||||
a = l->data;
|
||||
for (ll = a->instances; ll; ll = ll->next)
|
||||
{
|
||||
inst = ll->data;
|
||||
if (inst->launch_id == ev->border->client.netwm.e_start_launch_id)
|
||||
if (inst->launch_id == ev->border->client.netwm.startup_id)
|
||||
{
|
||||
if (inst->expire_timer)
|
||||
{
|
||||
|
|
|
@ -2103,7 +2103,7 @@ e_border_icon_add(E_Border *bd, Evas *evas)
|
|||
}
|
||||
if (!a)
|
||||
{
|
||||
a = e_app_launch_id_pid_find(bd->client.netwm.e_start_launch_id,
|
||||
a = e_app_launch_id_pid_find(bd->client.netwm.startup_id,
|
||||
bd->client.netwm.pid);
|
||||
}
|
||||
if (a)
|
||||
|
|
|
@ -238,9 +238,8 @@ struct _E_Border
|
|||
} state;
|
||||
|
||||
Ecore_X_Window_Type type;
|
||||
|
||||
int e_start_launch_id;
|
||||
|
||||
int startup_id;
|
||||
|
||||
struct {
|
||||
unsigned char name : 1;
|
||||
unsigned char icon_name : 1;
|
||||
|
|
|
@ -69,8 +69,6 @@ static Evas_Smart *e_entry_smart = NULL;
|
|||
|
||||
Evas_Object *e_entry_add (Evas *evas)
|
||||
{
|
||||
Evas_Object *o;
|
||||
|
||||
if (!e_entry_smart)
|
||||
{
|
||||
e_entry_smart = evas_smart_new("e_entry",
|
||||
|
|
|
@ -403,12 +403,13 @@ e_hints_window_init(E_Border *bd)
|
|||
((bd->client.icccm.client_leader > 0) && ecore_x_netwm_startup_id_get(bd->client.icccm.client_leader, &str) && (str))
|
||||
)
|
||||
{
|
||||
printf("launch_id: %s %s\n", e_border_name_get(bd), str);
|
||||
if (!strncmp(str, "E_START|", 8))
|
||||
{
|
||||
int id;
|
||||
|
||||
id = atoi(str + 8);
|
||||
if (id > 0) bd->client.netwm.e_start_launch_id = id;
|
||||
if (id > 0) bd->client.netwm.startup_id = id;
|
||||
}
|
||||
free(str);
|
||||
}
|
||||
|
|
|
@ -527,7 +527,8 @@ e_zone_flip_win_restore(void)
|
|||
int
|
||||
e_zone_app_exec(E_Zone *zone, E_App *a)
|
||||
{
|
||||
static int launch_id = 1;
|
||||
static int startup_id = 1;
|
||||
int ret;
|
||||
char *p1, *p2;
|
||||
char *penv_display;
|
||||
char *penv_ld_preload;
|
||||
|
@ -574,19 +575,17 @@ e_zone_app_exec(E_Zone *zone, E_App *a)
|
|||
e_util_env_set("E_CONTAINER", buf);
|
||||
snprintf(buf, sizeof(buf), "%i", zone->container->manager->num);
|
||||
e_util_env_set("E_MANAGER", buf);
|
||||
snprintf(buf, sizeof(buf), "%i", launch_id);
|
||||
snprintf(buf, sizeof(buf), "%i", startup_id);
|
||||
e_util_env_set("E_LAUNCH_ID", buf);
|
||||
snprintf(buf, sizeof(buf), "%s/enlightenment/preload", e_prefix_lib_get());
|
||||
e_util_env_set("LD_PRELOAD_PATH", buf);
|
||||
snprintf(buf, sizeof(buf), "%s/enlightenment/preload/e_hack.so", e_prefix_lib_get());
|
||||
*/
|
||||
snprintf(buf, sizeof(buf), "E_START|%i", launch_id);
|
||||
snprintf(buf, sizeof(buf), "E_START|%i", startup_id++);
|
||||
e_util_env_set("DESKTOP_STARTUP_ID", buf);
|
||||
if (launch_id == 0) launch_id = 1;
|
||||
/* execute */
|
||||
if (!e_app_exec(a, launch_id)) launch_id = 0;
|
||||
launch_id++;
|
||||
|
||||
ret = e_app_exec(a, startup_id);
|
||||
|
||||
/* reset env vars */
|
||||
if (penv_display)
|
||||
{
|
||||
|
@ -605,7 +604,7 @@ e_zone_app_exec(E_Zone *zone, E_App *a)
|
|||
free(penv_ld_preload_path);
|
||||
}
|
||||
*/
|
||||
return launch_id;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* local subsystem functions */
|
||||
|
|
|
@ -1691,7 +1691,7 @@ _ibar_bar_cb_drop_border(void *data, const char *type, void *event)
|
|||
title, bd->client.icccm.window_role);
|
||||
if (!app)
|
||||
{
|
||||
app = e_app_launch_id_pid_find(bd->client.netwm.e_start_launch_id,
|
||||
app = e_app_launch_id_pid_find(bd->client.netwm.startup_id,
|
||||
bd->client.netwm.pid);
|
||||
}
|
||||
if (!app)
|
||||
|
|
Loading…
Reference in New Issue