add E_Exec_Instance to E_Border and vice versa
authordiscomfitor <mike@zentific.com>
Sat, 18 May 2013 12:29:01 +0000 (13:29 +0100)
committerdiscomfitor <mike@zentific.com>
Sat, 18 May 2013 18:39:51 +0000 (19:39 +0100)
src/bin/e_border.c
src/bin/e_border.h
src/bin/e_exec.h

index ecd6ad6..91a0133 100644 (file)
@@ -4919,6 +4919,12 @@ _e_border_del(E_Border *bd)
    focus_next = eina_list_remove(focus_next, bd);
    bd->changed = 0;
 
+   if (bd->exe_inst)
+     {
+        bd->exe_inst->bd = NULL;
+        bd->exe_inst = NULL;
+     }
+
    if (bd->fullscreen) bd->desk->fullscreen_borders--;
 
    if (bd->moving) e_border_act_move_end(bd, NULL);
@@ -7968,6 +7974,8 @@ _e_border_eval0(E_Border *bd)
                   desk = e_desk_at_xy_get(bd->zone, inst->desk_x,
                                           inst->desk_y);
                   if (desk) e_border_desk_set(bd, desk);
+                  inst->bd = bd;
+                  bd->exe_inst = inst;
                   e_exec_instance_found(inst);
                }
 
index f36d22c..5ec2b16 100644 (file)
@@ -647,6 +647,7 @@ struct _E_Border
    Eina_List                 *transients;
 
    Efreet_Desktop            *desktop;
+   E_Exec_Instance           *exe_inst;
 
    unsigned char              comp_hidden   : 1;
 
index a6c10cf..31e1952 100644 (file)
@@ -9,6 +9,7 @@ typedef struct _E_Exec_Instance E_Exec_Instance;
 struct _E_Exec_Instance
 {
    Efreet_Desktop *desktop;
+   E_Border       *bd;
    const char     *key;
    Ecore_Exe      *exe;
    int             startup_id;