inline variables & remove redundant check for decorations

This commit is contained in:
Kristen McWilliam 2023-10-19 18:18:46 -04:00 committed by Noah Davis
parent dd5ec684b7
commit 1b1cc67792

View file

@ -228,12 +228,10 @@ void ScreenShotEffect::takeScreenShot(ScreenShotWindowData *screenshot)
WindowPaintData d;
QRectF geometry = window->expandedGeometry();
qreal devicePixelRatio = 1;
bool includeDecorations = (screenshot->flags & ScreenShotIncludeDecoration);
bool includeShadow = (screenshot->flags & ScreenShotIncludeShadow);
if (window->hasDecoration() && !includeDecorations) {
if (window->hasDecoration() && !(screenshot->flags & ScreenShotIncludeDecoration)) {
geometry = window->clientGeometry();
} else if (window->hasDecoration() && !includeShadow) {
} else if (!(screenshot->flags & ScreenShotIncludeShadow)) {
geometry = window->frameGeometry();
}