Get window screenshot on 2.18.



Good afternoon!
I'm experiencing some difficulties using 2.18 release.

I'm trying to get window screenshot using such code (working on
previous major releases, including 2.16):

       GdkWindowObject *private = (GdkWindowObject *)(window);
       GdkPixmap *internalPixmap = ((GdkWindowPaint
*)private->paint_stack->data)->pixmap;
       if (internalPixmap == NULL) {
               return NULL;
       }
       //
       GdkPixmap *pixmap = gdk_pixmap_new(internalPixmap, width, height, -1);
       GdkGC *gc = gdk_gc_new(internalPixmap);
       //
       gdk_draw_drawable(pixmap, gc, internalPixmap, 0, 0, 0, 0, width, height);

But I get nothing...
Can anyone help, please?


--
Best regards, Nikolay Zamosenchuk


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]