Enlightenment CVS committal
Author : raster
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e_apps.c e_apps.h e_border.c
Log Message:
get app from border now - no more zillions of params. also use wm command to
match
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_apps.c,v
retrieving revision 1.174
retrieving revision 1.175
diff -u -3 -r1.174 -r1.175
--- e_apps.c 5 Sep 2006 13:42:19 -0000 1.174
+++ e_apps.c 5 Sep 2006 14:44:27 -0000 1.175
@@ -919,31 +919,36 @@
}
EAPI E_App *
-e_app_window_name_class_title_role_find(const char *name, const char *class,
- const char *title, const char *role)
+e_app_border_find(E_Border *bd)
{
Evas_List *l, *l_match = NULL;
int ok, match = 0;
E_App *a, *a_match = NULL;
+ char *title;
- if ((!name) && (!class) && (!title) && (!role))
+ if ((!bd->client.icccm.name) && (!bd->client.icccm.class) &&
+ (!bd->client.icccm.title) && (bd->client.netwm.name) &&
+ (!bd->client.icccm.window_role) && (!bd->client.icccm.command.argv))
return NULL;
+ title = bd->client.netwm.name;
+ if (!title) title = bd->client.icccm.title;
for (l = _e_apps_list; l; l = l->next)
{
a = l->data;
ok = 0;
if ((a->win_name) || (a->win_class) || (a->win_title) || (a->win_role))
{
- if ((a->win_name) && (a->win_class) && (name) && (class))
+ if ((a->win_name) && (a->win_class) &&
+ (bd->client.icccm.name) && (bd->client.icccm.class))
{
- if ((e_util_glob_match(name, a->win_name)) &&
- (e_util_glob_match(class, a->win_class)))
+ if ((e_util_glob_match(bd->client.icccm.name, a->win_name)) &&
+ (e_util_glob_match(bd->client.icccm.class, a->win_class)))
ok += 2;
}
- else if ((a->win_class) && (class))
+ else if ((a->win_class) && (bd->client.icccm.class))
{
- if (e_util_glob_match(class, a->win_class))
+ if (e_util_glob_match(bd->client.icccm.class, a->win_class))
ok += 2;
}
@@ -951,8 +956,28 @@
((a->win_title) && (title) && (e_util_glob_match(title,
a->win_title))))
ok++;
if (//(!a->win_role) ||
- ((a->win_role) && (role) && (e_util_glob_match(role,
a->win_role))))
+ ((a->win_role) && (bd->client.icccm.window_role) &&
(e_util_glob_match(bd->client.icccm.window_role, a->win_role))))
ok++;
+ if (
+ (a->exe) && (bd->client.icccm.command.argv))
+ {
+ char *ts, *p;
+
+ ts = alloca(strlen(a->exe) + 1);
+ strcpy(ts, a->exe);
+ p = ts;
+ while (*p)
+ {
+ if (isspace(*p))
+ {
+ *p = 0;
+ break;
+ }
+ p++;
+ }
+ if (!strcmp(a->exe, ts))
+ ok++;
+ }
}
if (ok > match)
{
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_apps.h,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -3 -r1.39 -r1.40
--- e_apps.h 1 Sep 2006 09:26:55 -0000 1.39
+++ e_apps.h 5 Sep 2006 14:44:27 -0000 1.40
@@ -117,7 +117,7 @@
EAPI void e_app_change_callback_del (void (*func) (void
*data, E_App *a, E_App_Change ch), void *data);
EAPI E_App *e_app_launch_id_pid_find (int launch_id, pid_t
pid);
-EAPI E_App *e_app_window_name_class_title_role_find (const char *name,
const char *class, const char *title, const char *role);
+EAPI E_App *e_app_border_find (E_Border *bd);
EAPI E_App *e_app_file_find (const char *file);
EAPI E_App *e_app_name_find (const char *name);
EAPI E_App *e_app_generic_find (const char *generic);
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_border.c,v
retrieving revision 1.538
retrieving revision 1.539
diff -u -3 -r1.538 -r1.539
--- e_border.c 3 Sep 2006 05:40:32 -0000 1.538
+++ e_border.c 5 Sep 2006 14:44:27 -0000 1.539
@@ -2586,14 +2586,7 @@
{
if ((bd->client.icccm.name) && (bd->client.icccm.class))
{
- char *title = "";
-
- if (bd->client.netwm.name) title = bd->client.netwm.name;
- else title = bd->client.icccm.title;
- a = e_app_window_name_class_title_role_find(bd->client.icccm.name,
- bd->client.icccm.class,
- title,
-
bd->client.icccm.window_role);
+ a = e_app_border_find(bd);
}
if (!a)
{
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs