gnome-screenshot does not save --file when called with --clipboard option

Asked by Stefan Thieme

Dear developers,

I tried both options --file and --clipboard individually and they just work.
user@host ~/ $ gnome-screenshot --area --file=/home/user/Desktop/Screenshot_1.png
user@host ~/ $ gnome-screenshot --area --clipboard

However running gnome-screenshot with both options does not work as intended, i.e. make a copy to the clipboard AND store a copy on my desktop or in a Screenshot folder for later reference. I am used to this behaviour from the LightScreen app.

user@host ~/ $ gnome-screenshot --area --file=/home/user/Desktop/Screenshot_1.png --clipboard

I guess the problem is with the following peace of code from gnome-screenshot-3.16.0/src/screenshot-application.c

  if (screenshot_config->copy_to_clipboard)
    {
      screenshot_save_to_clipboard (self);
      screenshot_play_sound_effect ("screen-capture", _("Screenshot taken"));

      g_application_release (G_APPLICATION (self));

      return;
    }

It obviously does a g_application_release and return before actually saving the image to file.
Suggested fix is to move this code block after the block saving the image to make it work.

Kind regards,
Stefan

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu gnome-screenshot Edit question
Assignee:
No assignee Edit question
Solved by:
Stefan Thieme
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

i suggest you report a bug

Revision history for this message
Stefan Thieme (thymian) said :
#2

right, I did just that under Bug #1446650

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

Could use imagemagick as a work around