Why/how do Spectacle's full-screen screenshot and active window screenshot options display different things?

Recently, I wanted to capture a screenshot of an application that somehow disables Breeze’s window decoration buttons without having them right-align themselves. [1] However, I couldn’t capture it via Spectacle’s “Active window” mode:

…yet could via “Fullscreen” mode (it’s cropped)!

How is this possible?

Environment

spectacle-6.3.2.1-1.fc41.x86_64


  1. github.com/Mbucari/Libation/commit/252a216e897a866016057fd479dfcc9b1ad2484a#commitcomment-153615432 ↩︎

No idea at all… perhaps you went out of your way to create a strange environment - and then you list your whole environment as:

Environment: spectacle-6.3.2.1-1.fc41.x86_64

So I’m guessing nobody will have a clue - unless it’s a pretty random stab in the dark or a wild guess.

I’m using Version 6.3.2.1-1, but I have no idea where you get the 'fc41.x86_64` from…

Environment is best given using inxy -Fazy or something similar.

What distribution, desktop, you know - the actual environment - is the only way anyone’s going to have any kind of handle on this.

Spectacle doesn’t do this for me - whether fullscreen, window, or rectangle.

@ben2talk, I don’t know what “going out of my way to make a strange environment” would entail, but fc41.x86_64 is from rpm -qa. Its more verbose equivalent, dnf info, would output the undermentioned:

Name            : spectacle
Epoch           : 1
Version         : 6.3.2.1
Release         : 1.fc41
Architecture    : x86_64
Installed size  : 6.1 MiB
Source          : spectacle-6.3.2.1-1.fc41.src.rpm
From repository : @stored_transaction

Hopefully that demonstrates which sections refer to what. However, if not, it’s a concatenation of the Release and Architecture keys’ values. I suppose I shouldn’t have expected everyone here to be familiar with how a specific distribution’s package manager formats things.

However, I didn’t actually expect that section to be necessary whatsoever, since this isn’t a bug report. About that:

KDE recommends kinfo. inxi is going to provide hardware information, which I’ll very much doubt relates to this.

Per the aforestated:

Operating System: Fedora Linux 41
KDE Plasma Version: 6.3.2
KDE Frameworks Version: 6.11.0
Qt Version: 6.8.2
Kernel Version: 6.13.5-200.fc41.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 7600X 6-Core Processor
Memory: 30.4 GiB of RAM
Graphics Processor 1: AMD Radeon RX 5700
Graphics Processor 2: AMD Radeon Graphics

I’d expected to hear a response talking about some quirk of how Spectacle requests the canvas from the compositor, which would be environment-agnostic.


For you to know, you’d need to have reproduced this problem. Did you use that Libation build that I referenced, or do you see this elsewhere? If the latter, then we’ve probably got an issue with KWin on our hands, too.

i think the simplest answer is that when you screen shot the monitor you get what you see on the screen.

but when you capture the active window you only get what is inside the window (excluding the title bar).

to make it more complicated, when you capture the active window under the cursor you get only the window contents (no title bar), but you also


you get the shadow all around the window as transparent.

if you want full control over what you capture, use rectangular region, or entire desktop and crop the image after the fact.

1 Like

@skyfishgoo, I estimate that Spectacle merely asks KWin to provide screenshots of specific elements (the decoration, which includes window borders and shadow) all at the same size, and then reconstructs the screenshot from that. In which case, how the title bar would differ between the modes isn’t evident.

the window under the cursor result would tend to confirm your suspicion since it seems to be bit of a mix and match.

but the first two make sense to me in terms of what is (and is not) included when taking the different captures.

also of note, when taking an active window capture of a GTK window like gthumb which has the gnome type “title bar” you get the whole window, including decorations, since i guess in terms of kwin the title bar is already suppressed and the decorations have been moved into the window contents.

1 Like

@skyfishgoo, trying another application with this functionality would be a useful test. However, gthumb-3.12.6-4.fc41 doesn’t appear to be a screenshot tool. Rather, solely an image viewer (like Gwenview).

Does anyone know of any alternatives? I ask because flameshot-12.1.0-7.fc41 isn’t much use for this:

correct, gthumb is a viewer that uses the GTK toolkit… i just mention it because when i took a spectacle capture of the gthumb window it included the decorations because the decorations are already part of the window contents, as kwin sees it (there is not title bar).

1 Like

I see what you mean - CSD versus SSD.

Well, there is bugs.kde.org/show_bug.cgi?id=479372#c4, if you’re using ⪅ xorg-x11-server-21.1.16-1.fc41:fearful: That’s obviously exceptional, though.