paperwm / PaperWM

Tiled scrollable window management for Gnome Shell
GNU General Public License v3.0
3.08k stars 129 forks source link

Compatibility with `Dock Unroll` extension: window doesn't take full space after top panel is hidden. #922

Open iitzrohan opened 3 months ago

iitzrohan commented 3 months ago

Describe the bug I am using the dock unroll extension and when the panel hides itself, the window doesn't take full space.

To Reproduce Steps to reproduce the behavior:

  1. Install Dock unroll extension
  2. Hover to top to bring top panel.
  3. Move your mouse anywhere else from top panel.
  4. The window doesn't take full height.

Expected behavior The window should take full screen height but it gets stuck in the same position

Screenshots If applicable, add screenshots to help explain your problem. Screenshot from 2024-08-06 00-00-54 Screenshot from 2024-08-06 00-01-14 Screenshot from 2024-08-06 00-01-32

System information: Please provide system information:

Distribution: Fedora Linux 40 (Workstation Edition)
GNOME Shell: 46.3.1
Display server: Wayland
PaperWM version: 46.15.0
Enabled extensions:
- AlphabeticalAppGrid@stuarthayhurst
- appindicatorsupport@rgcjonas.gmail.com
- clipboard-history@alexsaveau.dev
- cloudflare-warp-toggle@khaled.is-a.dev
- Battery-Health-Charging@maniacx.github.com
- window-thumbnails@G-dH.github.com
- paperwm@paperwm.github.com
- Vitals@CoreCoding.com
- dock-unroll@fthx

Additional context I have also submitted this bug report to dock unroll extension https://github.com/fthx/dock-unroll/issues/1

Lythenas commented 3 months ago

I think we had similar issues with similar extensions that hide or move the topbar in the past. E.g. Fullscreen Avoider #707

Does this fix itself if you e.g. resize the window?

Does changeing the "Enable Window Position Bar" setting change anything about the situation?

Taking a quick look at the code, it uses this to hide the panel:

const HIDDEN_PANEL_HEIGHT = 0.01; // px (> 0 !)
//...
_hidePanel() {
        Main.panel.ease({
            duration: ANIMATION_TIME,
            height: HIDDEN_PANEL_HEIGHT,
            onComplete: () => {
                Main.panel.opacity = 0;
                Main.layoutManager._updateHotCorners();
            },
        });
    }

It might be possible to add compatibility for this.

iitzrohan commented 3 months ago

Yes, the window does fix itself after resizing.

jtaala commented 3 months ago
const HIDDEN_PANEL_HEIGHT = 0.01; // px (> 0 !)

Ah, they're using panel.height instead of something like hide().

Generally we wouldn't address specific extension implementations/overrides given that's a different approach to how Gnome works. But it is a valid approach (and tbh, PaperWM used to use a similar approach for Gnome topbar hiding).

Anyways, a notify signal could be added on the height property of panel that could trigger a layout on that space (which would re-adjust window sizes).