~ubuntu-dev/ubuntu/lucid/mutter/lucid-201002110959

« back to all changes in this revision

Viewing changes to src/core/errors.c

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2009-09-05 16:23:00 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090905162300-uh014j826cs7xe76
Tags: 2.27.4-0ubuntu1
* New upstream release
* add debian/watch

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
  XSetIOErrorHandler (x_io_error_handler);
41
41
}
42
42
 
43
 
typedef struct ForeignDisplay ForeignDisplay;
44
 
 
45
 
struct ForeignDisplay
46
 
{
47
 
    Display *dpy;
48
 
    ErrorHandler handler;
49
 
    gpointer data;
50
 
    ForeignDisplay *next;
51
 
};
52
 
 
53
 
static ForeignDisplay *foreign_displays;
54
 
 
55
 
void
56
 
meta_errors_register_foreign_display (Display      *foreign_dpy,
57
 
                                      ErrorHandler  handler,
58
 
                                      gpointer      data)
59
 
{
60
 
    ForeignDisplay *info = g_new0 (ForeignDisplay, 1);
61
 
    info->dpy = foreign_dpy;
62
 
    info->handler = handler;
63
 
    info->data = data;
64
 
    info->next = foreign_displays;
65
 
    foreign_displays = info;
66
 
}
67
 
 
68
43
static void
69
44
meta_error_trap_push_internal (MetaDisplay *display,
70
45
                               gboolean     need_sync)
206
181
  int retval;
207
182
  gchar buf[64];
208
183
  MetaDisplay *display;
209
 
  ForeignDisplay *foreign;
210
 
 
211
 
  for (foreign = foreign_displays; foreign != NULL; foreign = foreign->next)
212
 
  {
213
 
      if (foreign->dpy == xdisplay)
214
 
      {
215
 
          foreign->handler (xdisplay, error, foreign->data);
216
 
 
217
 
          return 0;
218
 
      }
219
 
  }
220
 
  
 
184
 
221
185
  XGetErrorText (xdisplay, error->error_code, buf, 63);  
222
186
 
223
187
  display = meta_display_for_x_display (xdisplay);