         // (The window width may change while the subviews are hidden.)
         sizeBeforeHidden = frame.size
 
-        // Now shrink the window, causing this view to shrink and our subviews to be obscured.
-        // Also remove the subviews from the view hierarchy.
-        changeWindowHeight(by: -(originalHeight - hiddenHeight))
-        removeSubviews()
-
-        needsDisplay = true
+        let completion = { [self] in
+            // After the animation, remove our subviews from the view hierarchy.
+            removeSubviews()
+            needsDisplay = true
+        }
+
+        if let window = window, window.styleMask.contains(.fullScreen) {
+            // We're in full screen, so we can't resize the window. Resize ourself and other content views instead.
+            NSAnimationContext.runAnimationGroup { animationContext in
+                animationContext.completionHandler = completion
+                animationContext.allowsImplicitAnimation = true
+                changeSelfHeightAndAdjustOtherContentViews(by: -(originalHeight - hiddenHeight))
+            }
+        }
+        else {
+            // Now shrink the window, causing this view to shrink and our subviews to be obscured.
+            changeWindowHeight(by: -(originalHeight - hiddenHeight))
+            completion()
+        }
     }
 
     private func show() {

        resizeSubviews(withOldSize: sizeBeforeHidden)
        setFrameSize(hiddenSize)

        // Finally resize the window, causing our height to increase.
        changeWindowHeight(by: originalHeight - hiddenHeight)

        if originalNextKeyView != nil {
            // Restore the key loop to its old configuration.
            lastChildKeyView?.nextKeyView = nextKeyView
            nextKeyView = originalNextKeyView
        }

        needsDisplay = true
    }

    private func removeSubviews() {

/*
 Copyright (c) 2002-2022, Kurt Revis.  All rights reserved.

 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

