refactor window geometry checking

master
Kristen McWilliam 11 months ago committed by Noah Davis
parent 5c8b85861e
commit 53a4faf4e6

@ -228,17 +228,21 @@ void ScreenShotEffect::takeScreenShot(ScreenShotWindowData *screenshot)
WindowPaintData d;
QRectF geometry = window->expandedGeometry();
qreal devicePixelRatio = 1;
if (window->hasDecoration() && !(screenshot->flags & ScreenShotIncludeDecoration)) {
bool includeDecorations = (screenshot->flags & ScreenShotIncludeDecoration);
bool includeShadow = (screenshot->flags & ScreenShotIncludeShadow);
if (window->hasDecoration() && !includeDecorations) {
geometry = window->clientGeometry();
}
if (window->hasDecoration() && !(screenshot->flags & ScreenShotIncludeShadow)) {
} else if (window->hasDecoration() && !includeShadow) {
geometry = window->frameGeometry();
}
if (screenshot->flags & ScreenShotNativeResolution) {
if (const EffectScreen *screen = window->screen()) {
devicePixelRatio = screen->devicePixelRatio();
}
}
bool validTarget = true;
std::unique_ptr<GLTexture> offscreenTexture;
std::unique_ptr<GLFramebuffer> target;

Loading…
Cancel
Save