Remove meta_errors_register_foreign_display()
The functionality to propagate errors for other displays to other a "foreign error handler" was Soeren's compositor and is no longer being used. Remove it. (Now that error.h is being installed and scanned, we need to either do this or add XErrorEvent to xlib-2.0.gir and rename ErrorHandler to MetaErrorHandler. This way is a bit simpler.)
This commit is contained in:
parent
16466cf7d6
commit
91baf552cf
@ -40,31 +40,6 @@ meta_errors_init (void)
|
||||
XSetIOErrorHandler (x_io_error_handler);
|
||||
}
|
||||
|
||||
typedef struct ForeignDisplay ForeignDisplay;
|
||||
|
||||
struct ForeignDisplay
|
||||
{
|
||||
Display *dpy;
|
||||
ErrorHandler handler;
|
||||
gpointer data;
|
||||
ForeignDisplay *next;
|
||||
};
|
||||
|
||||
static ForeignDisplay *foreign_displays;
|
||||
|
||||
void
|
||||
meta_errors_register_foreign_display (Display *foreign_dpy,
|
||||
ErrorHandler handler,
|
||||
gpointer data)
|
||||
{
|
||||
ForeignDisplay *info = g_new0 (ForeignDisplay, 1);
|
||||
info->dpy = foreign_dpy;
|
||||
info->handler = handler;
|
||||
info->data = data;
|
||||
info->next = foreign_displays;
|
||||
foreign_displays = info;
|
||||
}
|
||||
|
||||
static void
|
||||
meta_error_trap_push_internal (MetaDisplay *display,
|
||||
gboolean need_sync)
|
||||
@ -206,18 +181,7 @@ x_error_handler (Display *xdisplay,
|
||||
int retval;
|
||||
gchar buf[64];
|
||||
MetaDisplay *display;
|
||||
ForeignDisplay *foreign;
|
||||
|
||||
for (foreign = foreign_displays; foreign != NULL; foreign = foreign->next)
|
||||
{
|
||||
if (foreign->dpy == xdisplay)
|
||||
{
|
||||
foreign->handler (xdisplay, error, foreign->data);
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
XGetErrorText (xdisplay, error->error_code, buf, 63);
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
|
@ -29,15 +29,8 @@
|
||||
#include "util.h"
|
||||
#include "display.h"
|
||||
|
||||
typedef void (* ErrorHandler) (Display *dpy,
|
||||
XErrorEvent *error,
|
||||
gpointer data);
|
||||
|
||||
void meta_errors_init (void);
|
||||
void meta_errors_register_foreign_display (Display *foreign_dpy,
|
||||
ErrorHandler handler,
|
||||
gpointer data);
|
||||
|
||||
|
||||
void meta_error_trap_push (MetaDisplay *display);
|
||||
void meta_error_trap_pop (MetaDisplay *display,
|
||||
gboolean last_request_was_roundtrip);
|
||||
|
Loading…
Reference in New Issue
Block a user