~ubuntu-branches/ubuntu/raring/gtk+2.0/raring-proposed

« back to all changes in this revision

Viewing changes to gdk/win32/gdkselection-win32.c

  • Committer: Package Import Robot
  • Author(s): Ken VanDine
  • Date: 2011-12-01 11:40:06 UTC
  • mfrom: (1.14.11)
  • Revision ID: package-import@ubuntu.com-20111201114006-nrmf6qu3pg512veo
Tags: 2.24.8-0ubuntu1
* New upstream release 
  - gtkfilechooser should be more robust to malformed URIs
    in .gtk-bookmarks (LP: #189494)
* debian/patches/010_make_bg_changes_queue_repaint.patch
  - dropped it introduces performance regressions in some gtk2 
    apps (LP: #889019)
* 101_filechooser.patch, 000git_file_chooser.patch: dropped, upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
584
584
               * it.
585
585
               *
586
586
               * If the data is from Mozilla Firefox or IE7, and
587
 
               * starts with an "oldfashioned" BITMAPINFOHEADER,
 
587
               * starts with an "old fashioned" BITMAPINFOHEADER,
588
588
               * i.e. with biSize==40, and biCompression == BI_RGB and
589
589
               * biBitCount==32, we assume that the "extra" byte in
590
590
               * each pixel in fact is alpha.
591
591
               *
592
592
               * The gdk-pixbuf bmp loader doesn't trust 32-bit BI_RGB
593
 
               * nitmaps to in fact have alpha, so we have to convince
594
 
               * it by changint the bitmap header to a version 5
 
593
               * bitmaps to in fact have alpha, so we have to convince
 
594
               * it by changing the bitmap header to a version 5
595
595
               * BI_BITFIELDS one with explicit alpha mask indicated.
596
596
               *
597
597
               * The RGB bytes that are in bitmaps on the clipboard
718
718
                                       bi->biSize +
719
719
                                       bi->biClrUsed * sizeof (RGBQUAD));
720
720
 
 
721
                      if (bi->biCompression == BI_BITFIELDS && bi->biBitCount >= 16)
 
722
                        {
 
723
                          /* Screenshots taken with PrintScreen or
 
724
                           * Alt + PrintScreen are found on the clipboard in
 
725
                           * this format. In this case the BITMAPINFOHEADER is
 
726
                           * followed by three DWORD specifying the masks of the
 
727
                           * red green and blue components, so adjust the offset
 
728
                           * accordingly. */
 
729
                          bf->bfOffBits += (3 * sizeof (DWORD));
 
730
                        }
 
731
 
721
732
                      memcpy ((char *) data + sizeof (BITMAPFILEHEADER),
722
733
                              bi,
723
734
                              data_length);