Enlightenment CVS committal
Author : atmosphere
Project : misc
Module : engage
Dir : misc/engage/src
Modified Files:
icon.c
Log Message:
raise windows that aren't iconified, and exec apps(maybe?) :)
===================================================================
RCS file: /cvsroot/enlightenment/misc/engage/src/icon.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- icon.c 15 Apr 2004 21:01:53 -0000 1.10
+++ icon.c 15 Apr 2004 21:35:59 -0000 1.11
@@ -414,6 +414,8 @@
od_icon_edje_cb(void *data, Evas_Object *obj, const char *emission, const
char *source)
{
+ pid_t pid;
+ Evas_List *l = NULL;
OD_Icon *icon = NULL;
if((icon = (OD_Icon *) data))
@@ -423,6 +425,15 @@
switch(icon->type)
{
case application_link:
+ for(l = clients; l; l = l->next)
+ {
+ OD_Window *win = (OD_Window*)l->data;
+ if(win->applnk == icon)
+ {
+ od_wm_activate_window(win->id);
+ break;
+ }
+ }
break;
case docked_icon:
break;
@@ -433,22 +444,24 @@
}
else if (!strcmp(emission, "engage,app,open"))
{
-#if 0
- if(icon->data.applnk.command)
- {
- switch(fork())
+ switch(icon->type)
{
- case 0:
- execl("/bin/sh", "sh", "-c", icon->data.applnk.command, NULL);
- break;
- case -1:
- fprintf(stderr, "Unable to fork properly\n");
- break;
- default:
- break;
+ case application_link:
+ if((pid = fork()) < 0)
+ return;
+ else if(pid == 0) /* child */
+ {
+ execl("/bin/sh", "sh", "-c", icon->data.applnk.command, NULL);
+ }
+ else /* parent */
+ {
+ }
+ break;
+ case docked_icon:
+ break;
+ case minimised_window:
+ break;
}
- }
-#endif
}
else if (!strcmp(emission, "engage,app,close"))
{
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs