~ubuntu-multiseat/ubuntu/raring/xorg-server/bug1209008

« back to all changes in this revision

Viewing changes to hw/xquartz/xpr/xprFrame.c

  • Committer: Package Import Robot
  • Author(s): Timo Aaltonen
  • Date: 2013-01-08 16:40:30 UTC
  • mfrom: (1.1.53)
  • Revision ID: package-import@ubuntu.com-20130108164030-f94ncdwb1uqvws3y
Tags: 2:1.13.1.901-0ubuntu1
Merge from unreleased debian git.

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
#include <pthread.h>
50
50
#endif
51
51
 
 
52
#ifdef DEBUG_XP_LOCK_WINDOW
 
53
#include <execinfo.h>
 
54
#endif
 
55
 
52
56
#define DEFINE_ATOM_HELPER(func, atom_name)                      \
53
57
    static Atom func(void) {                                       \
54
58
        static int generation;                                      \
376
380
    unsigned int rowbytes[2];
377
381
    xp_error err;
378
382
 
 
383
#ifdef DEBUG_XP_LOCK_WINDOW
 
384
    void* callstack[128];
 
385
    int i, frames = backtrace(callstack, 128);
 
386
    char** strs = backtrace_symbols(callstack, frames);
 
387
 
 
388
    ErrorF("=== LOCK %d ===\n", (int)x_cvt_vptr_to_uint(wid));
 
389
    for (i = 0; i < frames; ++i) {
 
390
        ErrorF("    %s\n", strs[i]);
 
391
    }
 
392
    free(strs);
 
393
#endif
 
394
 
379
395
    err = xp_lock_window(x_cvt_vptr_to_uint(
380
396
                             wid), NULL, NULL, data, rowbytes, NULL);
381
397
    if (err != Success)
395
411
{
396
412
    xp_error err;
397
413
 
 
414
#ifdef DEBUG_XP_LOCK_WINDOW
 
415
    void* callstack[128];
 
416
    int i, frames = backtrace(callstack, 128);
 
417
    char** strs = backtrace_symbols(callstack, frames);
 
418
 
 
419
    ErrorF("=== UNLOCK %d ===\n", (int)x_cvt_vptr_to_uint(wid));
 
420
    for (i = 0; i < frames; ++i) {
 
421
        ErrorF("    %s\n", strs[i]);
 
422
    }
 
423
    free(strs);
 
424
#endif
 
425
 
398
426
    err = xp_unlock_window(x_cvt_vptr_to_uint(wid), flush);
399
427
    /* This should be a FatalError, but we started tripping over it.  Make it a
400
428
     * FatalError after http://xquartz.macosforge.org/trac/ticket/482 is fixed.