After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 691715 - 'include pointer' broke
'include pointer' broke
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2013-01-14 13:46 UTC by Matthias Clasen
Modified: 2013-02-11 18:54 UTC
See Also:
GNOME target: 3.8
GNOME version: ---


Attachments
shell-screenshot: Fix cursor fetching for whole screen screenshots (1.42 KB, patch)
2013-02-10 13:31 UTC, drago01
none Details | Review
shell-screenshot: Fix cursor fetching for non single window screenshots (1.43 KB, patch)
2013-02-10 13:33 UTC, drago01
committed Details | Review

Description Matthias Clasen 2013-01-14 13:46:52 UTC
I get a black recangle behind the pointer with 3.7
Comment 1 Cosimo Cecchi 2013-01-14 14:44:53 UTC
It seems to work correctly here with git master of Shell and gnome-screenshot. Make sure you have the latest Clutter as well.
Comment 2 Matthias Clasen 2013-01-14 15:13:22 UTC
thanks, I'll retry once 3.7.4 hits rawhide.
Comment 3 Matthias Clasen 2013-01-17 04:36:39 UTC
still broken here, with 3.7.4 versions
Comment 4 Matthias Clasen 2013-01-20 19:11:33 UTC
hmm, now with gnome-shell 3.7.4.1, I don't seem to get pointers included at all
Comment 5 Matthias Clasen 2013-01-22 23:53:53 UTC
I looked at this some more - the code to include the cursor image now lives in shell-screenshot.c in the shell. I think it must be getting miscompiled or something. With the shell built by koji, I get a black rectangle; with my jhbuilt shell of the same code it works fine. The offending loop is:

  for (i = 0; i < cursor_image->height; i++)
    for (j = 0; j < cursor_image->width; j++)
      {
        *(guint32*)(data + i * stride + 4 * j) = cursor_image->pixels[i * cursor_image->width + j];
      }

which looks a little dangerous since cursor_image->pixels is an array of longs.

Maybe having an explicit cast in there would be safer ? Like

        guint32 argb = (guint32) (cursor_image->pixels[i * cursor_image->width + j]);
        *(guint32*)(data + i * stride + 4 * j) = argb;
Comment 6 Jasper St. Pierre (not reading bugmail) 2013-01-23 18:28:34 UTC
It would be interesting to know why koji vs. jhbuild breaks. Note that this code has been copy/pasted from the recorder code in shell-recorder.c. Does the screen recorder break for you too?
Comment 7 Matthias Clasen 2013-01-23 19:10:09 UTC
screen recorder works fine
Comment 8 Matthias Clasen 2013-02-08 02:58:51 UTC
still happening with 3.7.5
Comment 9 drago01 2013-02-10 12:27:51 UTC
(In reply to comment #8)
> still happening with 3.7.5

I have just tested on my rawhide VM it seems to work just fine (running on llvmpipe).

Does it work for you with LIBGL_ALWAYS_SOFTWARE=1 set?
Comment 10 drago01 2013-02-10 12:38:57 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > still happening with 3.7.5
> 
> I have just tested on my rawhide VM it seems to work just fine (running on
> llvmpipe).
> 
> Does it work for you with LIBGL_ALWAYS_SOFTWARE=1 set?

OK ignore that ... that wasn't rawhide but some mixture of F18 and rawhide. Now on "real rawhide" I can reproduce it.
Comment 11 drago01 2013-02-10 13:31:34 UTC
Created attachment 235620 [details] [review]
shell-screenshot: Fix cursor fetching for whole screen screenshots

We have to mark the cairo_surface dirty after modifying the data behind
cairo's back.

Also use CAIRO_FORMAT_ARGB32 rather then CAIRO_FORMAT_RGB24 for the
surface.

----

I have verifed that this works for koji builds using a scratch build (http://koji.fedoraproject.org/koji/taskinfo?taskID=4946287).
Comment 12 drago01 2013-02-10 13:33:39 UTC
Created attachment 235621 [details] [review]
shell-screenshot: Fix cursor fetching for non single window screenshots

We have to mark the cairo_surface dirty after modifying the data behind
cairo's back.

Also use CAIRO_FORMAT_ARGB32 rather then CAIRO_FORMAT_RGB24 for the
surface.

----

Changed commit message this affects area screenshots as well.
Comment 13 Florian Müllner 2013-02-11 18:49:44 UTC
Review of attachment 235621 [details] [review]:

Makes sense to me.
Comment 14 drago01 2013-02-11 18:54:35 UTC
Attachment 235621 [details] pushed as cdc4f85 - shell-screenshot: Fix cursor fetching for non single window screenshots