include config.h

2002-10-26  Havoc Pennington  <hp@pobox.com>

	* src/iconcache.c: include config.h

	* src/group.c: include config.h

	* src/frame.c: include config.h

	* src/core.c: include config.h so it doesn't crash all over the
	place due to #ifdef HAVE_STARTUP_NOTIFICATION

	* src/util.c (meta_print_backtrace): export from this file

	* src/main.c (log_handler): print backtrace here
This commit is contained in:
Havoc Pennington 2002-10-27 03:03:32 +00:00 committed by Havoc Pennington
parent 4d5cc9d0bb
commit 04c9c3e058
11 changed files with 46 additions and 9 deletions

View File

@ -1,3 +1,18 @@
2002-10-26 Havoc Pennington <hp@pobox.com>
* src/iconcache.c: include config.h
* src/group.c: include config.h
* src/frame.c: include config.h
* src/core.c: include config.h so it doesn't crash all over the
place due to #ifdef HAVE_STARTUP_NOTIFICATION
* src/util.c (meta_print_backtrace): export from this file
* src/main.c (log_handler): print backtrace here
2002-10-26 Havoc Pennington <hp@pobox.com> 2002-10-26 Havoc Pennington <hp@pobox.com>
* src/wm-tester/main.c (evil_timeout): make windows randomly * src/wm-tester/main.c (evil_timeout): make windows randomly

View File

@ -19,6 +19,7 @@
* 02111-1307, USA. * 02111-1307, USA.
*/ */
#include <config.h>
#include "core.h" #include "core.h"
#include "frame.h" #include "frame.h"
#include "workspace.h" #include "workspace.h"

View File

@ -22,6 +22,10 @@
#ifndef META_DISPLAY_H #ifndef META_DISPLAY_H
#define META_DISPLAY_H #define META_DISPLAY_H
#ifndef PACKAGE
#error "config.h not included"
#endif
#include <glib.h> #include <glib.h>
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include "eventqueue.h" #include "eventqueue.h"
@ -154,10 +158,6 @@ struct _MetaDisplay
Atom atom_net_wm_state_above; Atom atom_net_wm_state_above;
Atom atom_net_wm_state_below; Atom atom_net_wm_state_below;
#ifdef HAVE_STARTUP_NOTIFICATION
SnDisplay *sn_display;
#endif
/* This is the actual window from focus events, /* This is the actual window from focus events,
* not the one we last set * not the one we last set
*/ */
@ -258,6 +258,15 @@ struct _MetaDisplay
/* Managed by group.c */ /* Managed by group.c */
GHashTable *groups_by_leader; GHashTable *groups_by_leader;
#ifdef HAVE_STARTUP_NOTIFICATION
/* This is at the end in case someone doesn't include config.h before this file
* the results won't be catastrophic
*/
SnDisplay *sn_display;
#endif
}; };
gboolean meta_display_open (const char *name); gboolean meta_display_open (const char *name);

View File

@ -19,6 +19,7 @@
* 02111-1307, USA. * 02111-1307, USA.
*/ */
#include <config.h>
#include "frame.h" #include "frame.h"
#include "errors.h" #include "errors.h"
#include "keybindings.h" #include "keybindings.h"

View File

@ -19,6 +19,7 @@
* 02111-1307, USA. * 02111-1307, USA.
*/ */
#include <config.h>
#include "util.h" #include "util.h"
#include "group.h" #include "group.h"
#include "window.h" #include "window.h"

View File

@ -19,6 +19,7 @@
* 02111-1307, USA. * 02111-1307, USA.
*/ */
#include <config.h>
#include "iconcache.h" #include "iconcache.h"
#include "ui.h" #include "ui.h"
#include "errors.h" #include "errors.h"

View File

@ -55,6 +55,7 @@ log_handler (const gchar *log_domain,
gpointer user_data) gpointer user_data)
{ {
meta_warning ("Log level %d: %s\n", log_level, message); meta_warning ("Log level %d: %s\n", log_level, message);
meta_print_backtrace ();
} }
static void static void

View File

@ -1,6 +1,11 @@
[Desktop Entry] [Desktop Entry]
_Name=Metacity _Name=Metacity
Exec=metacity Exec=metacity
# name of loadable control center module
X-GNOME-WMSettingsModule=metacity
# name we put on the WM spec check window
X-GNOME-WMName=Metacity
# back compat only
X-GnomeWMSettingsLibrary=metacity X-GnomeWMSettingsLibrary=metacity
[Window Manager] [Window Manager]

View File

@ -20,6 +20,7 @@
* 02111-1307, USA. * 02111-1307, USA.
*/ */
#include <config.h>
#include "stack.h" #include "stack.h"
#include "window.h" #include "window.h"
#include "errors.h" #include "errors.h"

View File

@ -31,8 +31,8 @@
#ifdef HAVE_BACKTRACE #ifdef HAVE_BACKTRACE
#include <execinfo.h> #include <execinfo.h>
static void void
print_backtrace (void) meta_print_backtrace (void)
{ {
void *bt[500]; void *bt[500];
int bt_size; int bt_size;
@ -53,8 +53,8 @@ print_backtrace (void)
free (syms); free (syms);
} }
#else #else
static void void
print_backtrace (void) meta_print_backtrace (void)
{ {
meta_verbose ("Not compiled with backtrace support\n"); meta_verbose ("Not compiled with backtrace support\n");
} }
@ -317,7 +317,7 @@ meta_bug (const char *format, ...)
g_free (str); g_free (str);
print_backtrace (); meta_print_backtrace ();
/* stop us in a debugger */ /* stop us in a debugger */
abort (); abort ();

View File

@ -76,6 +76,8 @@ gint meta_unsigned_long_equal (gconstpointer v1,
gconstpointer v2); gconstpointer v2);
guint meta_unsigned_long_hash (gconstpointer v); guint meta_unsigned_long_hash (gconstpointer v);
void meta_print_backtrace (void);
#include <libintl.h> #include <libintl.h>
#define _(x) dgettext (GETTEXT_PACKAGE, x) #define _(x) dgettext (GETTEXT_PACKAGE, x)
#define N_(x) x #define N_(x) x