~ubuntu-branches/ubuntu/oneiric/cairo-dock/oneiric

« back to all changes in this revision

Viewing changes to src/gldit/cairo-dock-X-utilities.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthieu Baerts (matttbe)
  • Date: 2010-09-07 20:31:25 UTC
  • mto: (18.1.1 cairo-dock) (19.1.1 cairo-dock)
  • mto: This revision was merged to the branch mainline in revision 14.
  • Revision ID: james.westby@ubuntu.com-20100907203125-a91ch8odv2r6ziic
Tags: upstream-2.2.0~0rc1
ImportĀ upstreamĀ versionĀ 2.2.0~0rc1

Show diffs side-by-side

added added

removed removed

Lines of Context:
424
424
                XPixmapID, &root, &x, &y,
425
425
                &iWidth, &iHeight, &border_width, &iDepth))
426
426
                return NULL;
427
 
        cd_debug ("%s (%d) : %ux%ux%u (%d;%d)", __func__, XPixmapID, iWidth, iHeight, iDepth, x, y);
 
427
        //g_print ("%s (%d) : %ux%ux%u (%d;%d)\n", __func__, XPixmapID, iWidth, iHeight, iDepth, x, y);
428
428
 
429
429
        //\__________________ On recupere le drawable associe.
430
430
        GdkDrawable *pGdkDrawable = gdk_xid_table_lookup (XPixmapID);
431
431
        if (pGdkDrawable)
 
432
        {
432
433
                g_object_ref (G_OBJECT (pGdkDrawable));
 
434
        }
433
435
        else
434
436
        {
435
 
                cd_debug ("pas d'objet GDK present, on en alloue un nouveau");
 
437
                //g_print ("pas d'objet GDK present, on en alloue un nouveau\n");
436
438
                GdkScreen* pScreen = gdk_screen_get_default ();
437
439
                pGdkDrawable = gdk_pixmap_foreign_new_for_screen (pScreen, XPixmapID, iWidth, iHeight, iDepth);
438
440
        }
446
448
                        pColormap = gdk_screen_get_rgba_colormap (pScreen);
447
449
                else
448
450
                        pColormap = gdk_screen_get_rgb_colormap (pScreen);  // au pire on a un colormap nul.
449
 
                cd_debug ("  pColormap : %x  (pScreen:%x)", pColormap, pScreen);
 
451
                //cd_debug ("  pColormap : %x  (pScreen:%x)", pColormap, pScreen);
450
452
        }
451
453
 
452
454
        //\__________________ On recupere le buffer dans un GdkPixbuf.