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 772133 - The cursor never gets included in screenshots
The cursor never gets included in screenshots
Status: RESOLVED FIXED
Product: gnome-flashback
Classification: Other
Component: screenshot
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Flashback Maintainers
GNOME Flashback Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-09-28 16:56 UTC by Antonio Ospite
Modified: 2016-09-28 17:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix a typo which prevented to include the cursor in screenshots (3.19 KB, patch)
2016-09-28 16:56 UTC, Antonio Ospite
none Details | Review

Description Antonio Ospite 2016-09-28 16:56:51 UTC
Created attachment 336458 [details] [review]
Fix a typo which prevented to include the cursor in screenshots

When using gnome-flashback, taking screenshots never includes the cursor, regardless of the "include_cursor" argument.

This happens either from the UI or from the command line:

  $ dbus-send --type=method_call --dest=org.gnome.Shell.Screenshot /org/gnome/Shell/Screenshot org.gnome.Shell.Screenshot.Screenshot boolean:false boolean:true string:/tmp/screenshot_NO_cursor.png

  $ dbus-send --type=method_call --dest=org.gnome.Shell.Screenshot /org/gnome/Shell/Screenshot org.gnome.Shell.Screenshot.Screenshot boolean:true boolean:true string:/tmp/screenshot_WITH_cursor.png


This happens because of a wrong check about the screenshot type, see the attached patch.

Fixing the issue also exposed a segfault. That was happening because wm_window
was used but never assigned in the case of capturing the root window.

Maybe some gcc options can help to spot errors like that.

In the patch I decided to assign wm_windows in an else branch, instead of initializing it at the beginnning of the function, because it looked more explicit and symmetric in this case.

Ciao ciao,
   Antonio
Comment 1 Alberts Muktupāvels 2016-09-28 17:44:43 UTC
Thanks!