Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
ewins.c snaps.c
Log Message:
Client adoption changes - continued.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ewins.c,v
retrieving revision 1.121
retrieving revision 1.122
diff -u -3 -r1.121 -r1.122
--- ewins.c 29 Oct 2005 15:35:39 -0000 1.121
+++ ewins.c 29 Oct 2005 19:57:06 -0000 1.122
@@ -50,8 +50,6 @@
static void EwinSlideIn(int val __UNUSED__, void *data);
-static void EwinGetGeometry(EWin * ewin);
-
static void EwinChangesStart(EWin * ewin);
static void EwinChangesProcess(EWin * ewin);
@@ -244,6 +242,28 @@
ModulesSignal(ESIGNAL_EWIN_CREATE, ewin);
}
+/*
+ * Derive frame window geometry from client window properties
+ */
+static void
+EwinSetGeometry(EWin * ewin)
+{
+ int x, y, l, r, t, b;
+
+ EwinGetPosition(ewin, ewin->client.x, ewin->client.y, ewin->client.bw,
+ ewin->client.grav, &x, &y);
+
+ l = ewin->border->border.left;
+ r = ewin->border->border.right;
+ t = ewin->border->border.top;
+ b = ewin->border->border.bottom;
+
+ ewin->client.x = x + l;
+ ewin->client.y = y + t;
+
+ EoMoveResize(ewin, x, y, ewin->client.w + l + r, ewin->client.h + t + b);
+}
+
static void
EwinConfigure(EWin * ewin)
{
@@ -265,7 +285,7 @@
ICCCM_Adopt(ewin);
EwinBorderSelect(ewin); /* Select border before calculating geometry */
- EwinGetGeometry(ewin); /* Calculate window geometry before border
parts */
+ EwinSetGeometry(ewin); /* Calculate window geometry before border
parts */
EwinBorderSetTo(ewin, NULL);
EwinEventsConfigure(ewin, 1);
@@ -571,28 +591,6 @@
*py = y;
}
-/*
- * Derive frame window geometry from client window properties
- */
-static void
-EwinGetGeometry(EWin * ewin)
-{
- int x, y, l, r, t, b;
-
- EwinGetPosition(ewin, ewin->client.x, ewin->client.y, ewin->client.bw,
- ewin->client.grav, &x, &y);
-
- l = ewin->border->border.left;
- r = ewin->border->border.right;
- t = ewin->border->border.top;
- b = ewin->border->border.bottom;
-
- ewin->client.x = x + l;
- ewin->client.y = y + t;
-
- EoMoveResize(ewin, x, y, ewin->client.w + l + r, ewin->client.h + t + b);
-}
-
void
EwinUpdateShapeInfo(EWin * ewin)
{
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/snaps.c,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -3 -r1.103 -r1.104
--- snaps.c 29 Oct 2005 15:35:39 -0000 1.103
+++ snaps.c 29 Oct 2005 19:57:06 -0000 1.104
@@ -36,6 +36,7 @@
char *win_name;
char *win_class;
char *win_role;
+ Window win;
EWin *used;
char track_changes;
unsigned int match_flags;
@@ -146,6 +147,9 @@
if (!sn->match_flags)
return 0;
+ if (ewin->state.identified)
+ return sn->win == _EwinGetClientXwin(ewin);
+
if (sn->match_flags & SNAP_MATCH_TITLE
&& !SEQ(sn->win_title, ewin->icccm.wm_name))
return 0;
@@ -1098,6 +1102,8 @@
{
sn = lst[i];
fprintf(f, "NEW: %s\n", sn->name);
+ if (sn->used)
+ fprintf(f, "WIN: %#lx\n", _EwinGetClientXwin(sn->used));
if ((sn->match_flags & SNAP_MATCH_TITLE) && sn->win_title)
fprintf(f, "TITLE: %s\n", sn->win_title);
if ((sn->match_flags & SNAP_MATCH_NAME) && sn->win_name)
@@ -1217,7 +1223,11 @@
}
else if (sn)
{
- if (!strcmp(s, "TITLE:"))
+ if (!strcmp(s, "WIN:"))
+ {
+ sn->win = strtoul(atword(buf, 2), NULL, 0);
+ }
+ else if (!strcmp(s, "TITLE:"))
{
sn->win_title = Estrdup(atword(buf, 2));
sn->match_flags |= SNAP_MATCH_TITLE;
@@ -1631,8 +1641,13 @@
}
#define SU(sn, item) ((sn->match_flags & item) ? '>' : ':')
- IpcPrintf(" Snapshot Name: %s %s\n",
- name, (sn->used) ? "" : "*** Unused ***");
+
+ if (sn->used)
+ Esnprintf(param, sizeof(param), "In use - %#lx",
+ _EwinGetClientXwin(sn->used));
+ else
+ Esnprintf(param, sizeof(param), "*** Unused ***");
+ IpcPrintf(" Snapshot Name: %s %s\n", name, param);
if (sn->win_title)
IpcPrintf(" Window Title%c %s\n", SU(sn, SNAP_MATCH_TITLE),
sn->win_title);
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs