diff --git a/toplevel.cpp b/toplevel.cpp index 70f543e00e..94178130e3 100644 --- a/toplevel.cpp +++ b/toplevel.cpp @@ -147,10 +147,11 @@ void Toplevel::disownDataPassedToDeleted() QRect Toplevel::visibleRect() const { + QRect r = decorationRect(); if (hasShadow() && !shadow()->shadowRegion().isEmpty()) { - return shadow()->shadowRegion().boundingRect().translated(geometry().topLeft()); + r |= shadow()->shadowRegion().boundingRect(); } - return geometry(); + return r.translated(geometry().topLeft()); } NET::WindowType Toplevel::windowType(bool direct, int supported_types) const