Enlightenment CVS committal Author : mej Project : eterm Module : Eterm
Dir : eterm/Eterm/src Modified Files: e.c startup.c startup.h Log Message: Sun Jun 26 21:05:03 2005 Michael Jennings (mej) Attempt to fix autogen.sh for Gentoo and Solaris. Detect and avoid E 0.17 faking E 0.16.x's IPC mechanisms. ---------------------------------------------------------------------- =================================================================== RCS file: /cvsroot/enlightenment/eterm/Eterm/src/e.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -3 -r1.27 -r1.28 --- e.c 19 Apr 2005 01:57:17 -0000 1.27 +++ e.c 27 Jun 2005 00:07:13 -0000 1.28 @@ -21,7 +21,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -static const char cvs_ident[] = "$Id: e.c,v 1.27 2005/04/19 01:57:17 mej Exp $"; +static const char cvs_ident[] = "$Id: e.c,v 1.28 2005/06/27 00:07:13 mej Exp $"; #include "config.h" #include "feature.h" @@ -64,7 +64,6 @@ Window enl_ipc_get_win(void) { - unsigned char *str = NULL; Atom prop; unsigned long num, after; @@ -75,7 +74,7 @@ D_ENL(("Searching for IPC window.\n")); - if (props[PROP_ENL_COMMS] == None) { + if ((props[PROP_ENL_COMMS] == None) || (props[PROP_ENL_VERSION] == None)) { D_ENL((" -> Enlightenment is not running. You lose!\n")); return None; } @@ -85,6 +84,30 @@ XFree(str); } if (ipc_win != None) { + XGetWindowProperty(Xdisplay, Xroot, props[PROP_ENL_VERSION], 0, 14, False, AnyPropertyType, + &prop, &format, &num, &after, &str); + if (str) { + char *ver, *tmp; + + tmp = strchr((char *) str, ' '); + if (tmp) { + ver = tmp + 1; + tmp = strchr((char *) ver, ' '); + if (tmp) { + *tmp = 0; + } + + /* Make sure the version string is within the acceptable range. */ + if (SPIF_CMP_IS_LESS(spiftool_version_compare(SPIF_CAST(charptr) str, SPIF_CAST(charptr) "0.16.4")) + || SPIF_CMP_IS_GREATER(spiftool_version_compare(SPIF_CAST(charptr) str, SPIF_CAST(charptr) "0.16.999"))) { + D_ENL((" -> IPC version string \"%s\" out of range. I'll have to ignore it.\n")); + ipc_win = None; + } + } + XFree(str); + } + } + if (ipc_win != None) { if (!XGetGeometry (Xdisplay, ipc_win, &dummy_win, &dummy_int, &dummy_int, &dummy_uint, &dummy_uint, &dummy_uint, &dummy_uint)) { D_ENL((" -> IPC Window property is valid, but the window doesn't exist. I give up!\n")); =================================================================== RCS file: /cvsroot/enlightenment/eterm/Eterm/src/startup.c,v retrieving revision 1.50 retrieving revision 1.51 diff -u -3 -r1.50 -r1.51 --- startup.c 19 Apr 2005 01:57:23 -0000 1.50 +++ startup.c 27 Jun 2005 00:07:13 -0000 1.51 @@ -21,7 +21,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -static const char cvs_ident[] = "$Id: startup.c,v 1.50 2005/04/19 01:57:23 mej Exp $"; +static const char cvs_ident[] = "$Id: startup.c,v 1.51 2005/06/27 00:07:13 mej Exp $"; #include "config.h" #include "feature.h" @@ -146,6 +146,7 @@ props[PROP_SELECTION_INCR] = XInternAtom(Xdisplay, "INCR", False); props[PROP_SELECTION_TARGETS] = XInternAtom(Xdisplay, "TARGETS", False); props[PROP_ENL_COMMS] = XInternAtom(Xdisplay, "ENLIGHTENMENT_COMMS", True); + props[PROP_ENL_VERSION] = XInternAtom(Xdisplay, "ENLIGHTENMENT_VERSION", True); props[PROP_ENL_MSG] = XInternAtom(Xdisplay, "ENL_MSG", False); props[PROP_DELETE_WINDOW] = XInternAtom(Xdisplay, "WM_DELETE_WINDOW", False); props[PROP_DND_PROTOCOL] = XInternAtom(Xdisplay, "DndProtocol", False); =================================================================== RCS file: /cvsroot/enlightenment/eterm/Eterm/src/startup.h,v retrieving revision 1.20 retrieving revision 1.21 diff -u -3 -r1.20 -r1.21 --- startup.h 14 Dec 2004 23:24:32 -0000 1.20 +++ startup.h 27 Jun 2005 00:07:13 -0000 1.21 @@ -98,6 +98,7 @@ PROP_SELECTION_INCR, PROP_SELECTION_TARGETS, PROP_ENL_COMMS, + PROP_ENL_VERSION, PROP_ENL_MSG, PROP_DELETE_WINDOW, PROP_DND_PROTOCOL, ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs