aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/bin/e_atoms.c7
-rw-r--r--src/bin/e_atoms.h3
-rw-r--r--src/bin/e_border.c21
-rw-r--r--src/bin/e_zone.c26
4 files changed, 54 insertions, 3 deletions
diff --git a/src/bin/e_atoms.c b/src/bin/e_atoms.c
index 2192b7a12..e5c51ecb0 100644
--- a/src/bin/e_atoms.c
+++ b/src/bin/e_atoms.c
@@ -12,6 +12,7 @@ EAPI Ecore_X_Atom E_ATOM_BORDER_SIZE = 0;
EAPI Ecore_X_Atom E_ATOM_WINDOW_STATE = 0;
EAPI Ecore_X_Atom E_ATOM_WINDOW_STATE_CENTERED = 0;
EAPI Ecore_X_Atom E_ATOM_DESKTOP_FILE = 0;
+EAPI Ecore_X_Atom E_ATOM_ZONE_GEOMETRY = 0;
/* externally accessible functions */
EINTERN int
@@ -28,9 +29,10 @@ e_atoms_init(void)
"__E_WINDOW_BORDER_SIZE",
"__E_ATOM_WINDOW_STATE",
"__E_ATOM_WINDOW_STATE_CENTERED",
- "__E_ATOM_DESKTOP_FILE"
+ "__E_ATOM_DESKTOP_FILE",
+ "E_ZONE_GEOMETRY"
};
- Ecore_X_Atom atoms[11];
+ Ecore_X_Atom atoms[12];
ecore_x_atoms_get(atom_names, 11, atoms);
E_ATOM_MANAGED = atoms[0];
@@ -44,6 +46,7 @@ e_atoms_init(void)
E_ATOM_WINDOW_STATE = atoms[8];
E_ATOM_WINDOW_STATE_CENTERED = atoms[9];
E_ATOM_DESKTOP_FILE = atoms[10];
+ E_ATOM_ZONE_GEOMETRY = atoms[11];
return 1;
}
diff --git a/src/bin/e_atoms.h b/src/bin/e_atoms.h
index 871489ee5..831fa3836 100644
--- a/src/bin/e_atoms.h
+++ b/src/bin/e_atoms.h
@@ -15,7 +15,6 @@ extern EAPI Ecore_X_Atom E_ATOM_SHADE_DIRECTION;
extern EAPI Ecore_X_Atom E_ATOM_HIDDEN;
extern EAPI Ecore_X_Atom E_ATOM_BORDER_SIZE;
extern EAPI Ecore_X_Atom E_ATOM_DESKTOP_FILE;
-
/* extra e window states */
/* if we add more states, we need to fix
* * e_hints_window_e_state_get()
@@ -25,6 +24,8 @@ extern EAPI Ecore_X_Atom E_ATOM_DESKTOP_FILE;
extern EAPI Ecore_X_Atom E_ATOM_WINDOW_STATE;
extern EAPI Ecore_X_Atom E_ATOM_WINDOW_STATE_CENTERED;
+extern EAPI Ecore_X_Atom E_ATOM_ZONE_GEOMETRY;
+
EINTERN int e_atoms_init(void);
EINTERN int e_atoms_shutdown(void);
diff --git a/src/bin/e_border.c b/src/bin/e_border.c
index f0496f7eb..f8cbc17ad 100644
--- a/src/bin/e_border.c
+++ b/src/bin/e_border.c
@@ -708,6 +708,15 @@ e_border_new(E_Container *con,
ecore_x_window_prop_card32_set(win, E_ATOM_MANAGED, &managed, 1);
ecore_x_window_prop_card32_set(win, E_ATOM_CONTAINER, &bd->zone->container->num, 1);
ecore_x_window_prop_card32_set(win, E_ATOM_ZONE, &bd->zone->num, 1);
+ {
+ unsigned int zgeom[4];
+
+ zgeom[0] = bd->zone->x;
+ zgeom[1] = bd->zone->y;
+ zgeom[2] = bd->zone->w;
+ zgeom[3] = bd->zone->h;
+ ecore_x_window_prop_card32_set(win, E_ATOM_ZONE_GEOMETRY, zgeom, 4);
+ }
e_desk_xy_get(bd->desk, &deskx, &desky);
desk[0] = deskx;
desk[1] = desky;
@@ -864,6 +873,18 @@ e_border_zone_set(E_Border *bd,
ecore_event_add(E_EVENT_BORDER_ZONE_SET, ev, _e_border_event_border_zone_set_free, NULL);
ecore_x_window_prop_card32_set(bd->client.win, E_ATOM_ZONE, &bd->zone->num, 1);
+ // XXXXXXXXXXXXXXXXXXXXXXXXX
+ // XXX ZZZZZZZZZZZZZZZZZZZzz
+ // need to adjust this if zone pos/size changes
+ {
+ unsigned int zgeom[4];
+
+ zgeom[0] = bd->zone->x;
+ zgeom[1] = bd->zone->y;
+ zgeom[2] = bd->zone->w;
+ zgeom[3] = bd->zone->h;
+ ecore_x_window_prop_card32_set(bd->client.win, E_ATOM_ZONE_GEOMETRY, zgeom, 4);
+ }
e_remember_update(bd);
}
diff --git a/src/bin/e_zone.c b/src/bin/e_zone.c
index 26014c9ab..d96adffd3 100644
--- a/src/bin/e_zone.c
+++ b/src/bin/e_zone.c
@@ -44,6 +44,7 @@ static void _e_zone_object_del_attach(void *o);
static E_Zone_Edge _e_zone_detect_edge(E_Zone *zone,
Ecore_X_Window win);
static void _e_zone_edge_move_resize(E_Zone *zone);
+static void _e_zone_border_geometry_update(E_Zone *zone);
EAPI int E_EVENT_ZONE_DESK_COUNT_SET = 0;
EAPI int E_EVENT_POINTER_WARP = 0;
@@ -299,6 +300,7 @@ e_zone_move(E_Zone *zone,
ecore_evas_move(zone->black_ecore_evas, zone->x, zone->y);
ecore_evas_resize(zone->black_ecore_evas, zone->w, zone->h);
}
+ _e_zone_border_geometry_update(zone);
}
EAPI void
@@ -331,6 +333,7 @@ e_zone_resize(E_Zone *zone,
ecore_evas_move(zone->black_ecore_evas, zone->x, zone->y);
ecore_evas_resize(zone->black_ecore_evas, zone->w, zone->h);
}
+ _e_zone_border_geometry_update(zone);
}
EAPI void
@@ -374,6 +377,7 @@ e_zone_move_resize(E_Zone *zone,
ecore_evas_move(zone->black_ecore_evas, zone->x, zone->y);
ecore_evas_resize(zone->black_ecore_evas, zone->w, zone->h);
}
+ _e_zone_border_geometry_update(zone);
}
EAPI void
@@ -1829,3 +1833,25 @@ _e_zone_edge_move_resize(E_Zone *zone)
ecore_x_window_move_resize(zone->corner.bottom_left,
zone->x + zone->w - cw - 2, zone->y + zone->h - 1, cw, 1);
}
+
+static void
+_e_zone_border_geometry_update(E_Zone *zone)
+{
+ Eina_List *borders, *l;
+ E_Border *bd;
+ unsigned int zgeom[4];
+
+ zgeom[0] = zone->x;
+ zgeom[1] = zone->y;
+ zgeom[2] = zone->w;
+ zgeom[3] = zone->h;
+ borders = e_border_client_list();
+ EINA_LIST_FOREACH(borders, l, bd)
+ {
+ if (bd->zone == zone)
+ ecore_x_window_prop_card32_set(bd->client.win,
+ E_ATOM_ZONE_GEOMETRY,
+ zgeom, 4);
+ }
+}
+