Enlightenment CVS committal Author : kwo Project : e16 Module : e
Dir : e16/e/src Modified Files: E.h Makefile.am session.c Log Message: Enable building without session management support. =================================================================== RCS file: /cvs/e/e16/e/src/E.h,v retrieving revision 1.589 retrieving revision 1.590 diff -u -3 -r1.589 -r1.590 --- E.h 11 Jul 2007 09:21:26 -0000 1.589 +++ E.h 18 Jul 2007 11:18:50 -0000 1.590 @@ -39,8 +39,12 @@ #include <X11/Xlib.h> #include <X11/extensions/shape.h> +#ifdef HAVE_SM +#define USE_SM 1 +#endif + #ifdef HAVE_XSYNC -#define USE_XSYNC 1 /* Experimental */ +#define USE_XSYNC 1 #endif #ifdef HAVE_XSCREENSAVER =================================================================== RCS file: /cvs/e/e16/e/src/Makefile.am,v retrieving revision 1.88 retrieving revision 1.89 diff -u -3 -r1.88 -r1.89 --- Makefile.am 23 Jun 2007 20:35:51 -0000 1.88 +++ Makefile.am 18 Jul 2007 11:18:50 -0000 1.89 @@ -119,8 +119,8 @@ $(IMLIB2_LIBS) \ $(GLX_LIBS) \ $(XFT_LIBS) \ - $(X_PRE_LIBS) \ $(X_LIBS) \ + $(SM_LIBS) \ $(XINERAMA_LIBS) \ $(X_EXTRA_LIBS) \ $(E_X_LIBS) \ =================================================================== RCS file: /cvs/e/e16/e/src/session.c,v retrieving revision 1.144 retrieving revision 1.145 diff -u -3 -r1.144 -r1.145 --- session.c 11 Jul 2007 09:05:43 -0000 1.144 +++ session.c 18 Jul 2007 11:18:50 -0000 1.145 @@ -59,7 +59,7 @@ /* True if we are saving state for a doExit("restart") */ static int restarting = False; -#ifdef HAVE_X11_SM_SMLIB_H +#if USE_SM #include <X11/SM/SMlib.h> @@ -321,12 +321,12 @@ * exit(1) instead of closing the losing connection. */ } -#endif /* HAVE_X11_SM_SMLIB_H */ +#endif /* USE_SM */ void SessionInit(void) { -#ifdef HAVE_X11_SM_SMLIB_H +#if USE_SM static SmPointer context; SmcCallbacks callbacks; #endif @@ -334,7 +334,7 @@ if (Mode.wm.window) return; -#ifdef HAVE_X11_SM_SMLIB_H +#if USE_SM #if 0 /* Unused */ atom_sm_client_id = XInternAtom(disp, "SM_CLIENT_ID", False); #endif @@ -395,7 +395,7 @@ SmcSetProperties(sm_conn, 1, props); fcntl(sm_fd, F_SETFD, fcntl(sm_fd, F_GETFD, 0) | FD_CLOEXEC); } -#endif /* HAVE_X11_SM_SMLIB_H */ +#endif /* USE_SM */ if (!Conf.session.script) Conf.session.script = Estrdup("$EROOT/scripts/session.sh"); @@ -408,7 +408,7 @@ void ProcessICEMSGS(void) { -#ifdef HAVE_X11_SM_SMLIB_H +#if USE_SM IceProcessMessagesStatus status; if (sm_fd < 0) @@ -427,7 +427,7 @@ sm_conn = NULL; sm_fd = -1; } -#endif /* HAVE_X11_SM_SMLIB_H */ +#endif /* USE_SM */ } int @@ -440,7 +440,7 @@ SessionGetInfo(EWin * ewin) { #if 0 /* Unused */ -#ifdef HAVE_X11_SM_SMLIB_H +#if USE_SM if (atom_sm_client_id == None) return; _EFREE(ewin->session_id); @@ -450,7 +450,7 @@ atom_sm_client_id); #else ewin = NULL; -#endif /* HAVE_X11_SM_SMLIB_H */ +#endif /* USE_SM */ #endif ewin = NULL; } @@ -458,11 +458,11 @@ void SetSMID(const char *smid) { -#ifdef HAVE_X11_SM_SMLIB_H +#if USE_SM sm_client_id = Estrdup(smid); #else smid = NULL; -#endif /* HAVE_X11_SM_SMLIB_H */ +#endif /* USE_SM */ } void @@ -473,14 +473,14 @@ /* dont' need anymore */ /* autosave(); */ -#ifdef HAVE_X11_SM_SMLIB_H +#if USE_SM if (shutdown && sm_conn) { SmcCloseConnection(sm_conn, 0, NULL); sm_conn = NULL; sm_fd = -1; } -#endif /* HAVE_X11_SM_SMLIB_H */ +#endif /* USE_SM */ } /* @@ -555,7 +555,7 @@ else if (!Mode.wm.master) l += Esnprintf(s + l, sizeof(s) - l, " -m %d", Mode.wm.master_screen); -#ifdef HAVE_X11_SM_SMLIB_H +#if USE_SM if (sm_client_id) l += Esnprintf(s + l, sizeof(s) - l, " -S %s", sm_client_id); #endif @@ -581,14 +581,14 @@ static void SessionLogout(void) { -#ifdef HAVE_X11_SM_SMLIB_H +#if USE_SM if (sm_conn) { SmcRequestSaveYourself(sm_conn, SmSaveBoth, True, SmInteractStyleAny, False, True); } else -#endif /* HAVE_X11_SM_SMLIB_H */ +#endif /* USE_SM */ { SessionExit(EEXIT_EXIT, NULL); } @@ -597,13 +597,13 @@ static void LogoutCB(Dialog * d, int val, void *data __UNUSED__) { -#ifdef HAVE_X11_SM_SMLIB_H +#if USE_SM if (sm_conn) { SessionLogout(); } else -#endif /* HAVE_X11_SM_SMLIB_H */ +#endif /* USE_SM */ { /* 0:LogOut -: No -or- */ /* 0:Halt 1:Reboot 2:LogOut -:No */ ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs