From 1b1cc677921187cef6603fd50f21e825eb7f6ed8 Mon Sep 17 00:00:00 2001 From: Kristen McWilliam Date: Thu, 19 Oct 2023 18:18:46 -0400 Subject: [PATCH] inline variables & remove redundant check for decorations --- src/plugins/screenshot/screenshot.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/plugins/screenshot/screenshot.cpp b/src/plugins/screenshot/screenshot.cpp index 0ffbc87afe..66ad071cad 100644 --- a/src/plugins/screenshot/screenshot.cpp +++ b/src/plugins/screenshot/screenshot.cpp @@ -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(); }