Taking a screenshot of a window crops out the title bar and borders on Cinnamon
areographe opened this issue · comments
Cinnamon uses a reparenting window manager. This means the frame is a separate, parent window of the actual window. If you want to capture the decorations with the contents, you need to pass shotgun the id of the parent window. xdotool getwindowfocus
is probably what you want.
Thanks, I didn't know that! Unfortunately it seems like getactivewindow
and getwindowfocus
both return the same window id in Cinnamon.
@areographe It might be worth trying hacksaw to get the window ID, as it has a flag to remove some number of nested window manager frames
although it seems to leave a 10-pixel buffer around the edges of the window.
Yeah I suspect this is the window manager reserving some space for a drop shadow. Maybe fixing #4 would help here.
@areographe It might be worth trying hacksaw to get the window ID, as it has a flag to remove some number of nested window manager frames
Good thinking, I've now given this a go. hacksaw
grabs the parent window by default, which is good, but the as @9ary mentioned it looks like the window manager (Muffin? I think?) is leaving space for shadows etc around the edges, i.e. the same issue i mentioned before. Now I'm curious about how gnome-screenshot
manages to get the decoration (title bar + borders) but not the shadow when one uses the 'current active window' option.
The window manager sets special properties on the frame window to tell other programs about this, but currently both shotgun and hacksaw ignore it.