Skip to content

New release prevents taking screenshots larger than screen size  #41

@peesock

Description

@peesock

In the previous release, if you had a window larger than your screen, you could still take a screenshot of the entire window. This is no longer possible:

#!/bin/sh
select="$(hacksaw -f "-i %i -g %g")" 
# my window: "-i 27311718 -g 3028x4036+-554+-1478", screen size is 1920x1080

# new release:
shotgun -f png $select test-1
# stderr: Invalid geometry

# old release (in build dir):
./shotgun -f png $select test-2
# makes big image

Note that using the OLD release of shotgun in an interactive shell also does NOT work:

$ ./shotgun -f png -i 27311718 -g 3028x4036+-554+-1478 test-3  
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  73 (X_GetImage)
  Serial number of failed request:  20
  Current serial number in output stream:  20

While it does in a file. I don't know why. Tested in zsh, bash, and dash.

This feature might seem almost useless, but I do use it from time to time for things like taking screenshots of MPV or feh when I want to share a large image quickly, or capturing GUI programs with window size dependent behavior, like how spek (audio spectrum analyzer) only increases resolution with window size.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions