def has_invalid_size(self, win: Rect) -> bool:
        """
        Checks if window would have an invalid size.

        A window that would have negative height or width (after adjusting for margins and borders)
        will return True.
        """
        if isinstance(self.margin, int):
            margin = [self.margin] * 4
        else:
            margin = self.margin

        return any(
            [
                win[2] <= margin[1] + margin[3] + 2 * self.border_width,
                win[3] <= margin[0] + margin[2] + 2 * self.border_width,
            ]
        )

        Checks if window would have an invalid size.

        A window that would have negative height or width (after adjusting for margins and borders)
        will return True.
        
libqtile/layout/spiral.py