~ubuntu-branches/ubuntu/raring/perl-tk/raring

« back to all changes in this revision

Viewing changes to pTk/mTk/generic/tkImgPhoto.c

  • Committer: Bazaar Package Importer
  • Author(s): Colin Tuckley
  • Date: 2008-02-15 13:56:59 UTC
  • mfrom: (1.1.3 upstream) (4.1.1 hardy)
  • Revision ID: james.westby@ubuntu.com-20080215135659-ru2oqlykuju20fav
Tags: 1:804.028-1
* New Upstream Release (Closes: #463080).
* Update to Debhelper v5.
* Build with XFT=1 (Closes: #411129).

Show diffs side-by-side

added added

removed removed

Lines of Context:
2701
2701
        (instancePtr->masterPtr->flags & COMPLEX_ALPHA)
2702
2702
            && visInfo.depth >= 15
2703
2703
            && (visInfo.class == DirectColor || visInfo.class == TrueColor)) {
 
2704
        Tk_ErrorHandler handler;
2704
2705
        XImage *bgImg = NULL;
2705
2706
 
 
2707
        /* 
 
2708
         * Create an error handler to suppress the case where the input was
 
2709
         * not properly constrained, which can cause an X error. [Bug 979239]
 
2710
         * Fix put in perl/tk by Franck Aniere, with help from George Peter
 
2711
         * Staplin.
 
2712
         */
 
2713
 
 
2714
        handler = Tk_CreateErrorHandler(display, -1, -1, -1,
 
2715
                        (Tk_ErrorProc *) NULL, (ClientData) NULL);
 
2716
 
2706
2717
        /*
2707
2718
         * Pull the current background from the display to blend with
2708
2719
         */
2709
2720
        bgImg = XGetImage(display, drawable, drawableX, drawableY,
2710
2721
                (unsigned int)width, (unsigned int)height, AllPlanes, ZPixmap);
2711
2722
        if (bgImg == NULL) {
 
2723
            Tk_DeleteErrorHandler(handler);
2712
2724
            return;
2713
2725
        }
2714
2726
 
2723
2735
                bgImg, 0, 0, drawableX, drawableY,
2724
2736
                (unsigned int) width, (unsigned int) height);
2725
2737
        XDestroyImage(bgImg);
 
2738
        Tk_DeleteErrorHandler(handler);
2726
2739
    } else {
2727
2740
        /*
2728
2741
         * masterPtr->region describes which parts of the image contain