# include "../config.h"
#endif
-#include "../version.h"
#include "openbox.hh"
#include "client.hh"
#include "screen.hh"
python_exec(SCRIPTDIR"/config.py"); // load openbox config values
// run all of the python scripts
python_exec(SCRIPTDIR"/builtins.py"); // builtin callbacks
- // run the user's script
- python_exec(_scriptfilepath.c_str());
+ // run the user's script or the system defaults if that fails
+ if (!python_exec(_scriptfilepath.c_str()))
+ python_exec(SCRIPTDIR"/defaults.py"); // system default bahaviors
// initialize all the screens
OBScreen *screen;
void Openbox::showVersion()
{
- printf(_("Openbox - version %s\n"), OPENBOX_VERSION);
+ printf(_("Openbox - version %s\n"), VERSION);
printf(" (c) 2002 - 2002 Ben Jansens\n\n");
}
printf(_("Compile time options:\n\
Debugging: %s\n\
Shape: %s\n\
- Xinerama: %s\n"),
+ Xinerama: %s\n\
+ Xkb: %s\n"),
#ifdef DEBUG
_("yes"),
#else // !DEBUG
#endif // SHAPE
#ifdef XINERAMA
- _("yes")
+ _("yes"),
#else // !XINERAMA
- _("no")
+ _("no"),
#endif // XINERAMA
+
+#ifdef XKB
+ _("yes")
+#else // !XKB
+ _("no")
+#endif // XKB
);
}
}
// call the python Focus callbacks
- EventData *data = new_event_data(_focused_screen->number(),
- c ? c->window() : 0,
- EventFocus, 0);
- Openbox::instance->bindings()->fireEvent(data);
- Py_XDECREF((PyObject*)data);
+ EventData data(_focused_screen->number(), c, EventFocus, 0);
+ Openbox::instance->bindings()->fireEvent(&data);
}
void Openbox::execute(int screen, const std::string &bin)