GNOME Bugzilla – Bug 754952
gdk_pixbuf_get_from_window: always returns same image
Last modified: 2015-09-18 00:06:43 UTC
I always get the same screenshot image, when I take screenshot multiple times. I have to restart gnome-flasback to get a new image again. It can be reproduced easily: 1. Press Print screen key. 2. Open a new window. 3. Press Print screen key again. 4. You'll see the same images saved into the Pictures folder. Tested with gnome-flashback git master.
I can not reproduce. Should I press very fast print key, or should I open some specific window?
I don't do any special. Anytime I press the Print screen key, I get the first screenshot again and again until I restart gnome-flashback. Even if I use Alt-Print screen or Shift-Print screen, always the first image cropped.
Created attachment 311357 [details] Test application This is small test application that has same problem. Compile with: gcc `pkg-config --cflags gtk+-3.0` -o test-gdk-pixbuf-from-window test-gdk-pixbuf-from-window.c `pkg-config --libs gtk+-3.0` I can reproduce this on my laptop with intel card, but not on my main pc with nvidia card.
commit 15d043c5d239facb99fa776c100f520c350562fb Author: Benjamin Otte <otte@redhat.com> Date: Fri Sep 18 02:04:10 2015 +0200 gdk: Mark window surfaces as dirty before reading from them We do not know what happened to this surface outside of GDK. Especially for foreign windows, they will have been modified by external applications. So be on the safe side and tell Cairo to clear all its caches.