paperwm / PaperWM

Tiled scrollable window management for Gnome Shell

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Top bar becomes fully transparent after switching to a workspace

lost-melody opened this issue · comments

Describe the bug
Top bar background becomes fully transparent every time I switch to a workspace, and will be restored if I enter and leave the Overview screen. It only happens with Position Bar disabled and TopBar styling enabled.

To Reproduce
Steps to reproduce the behavior:

  1. Enable TopBar styling in the Advanced preferences tab and disable Window Position Bar in the General tab
  2. Move up or down to another workspace (with keybinding Super+PgUp/PgDn)
  3. When entering the new workspace, top bar becomes fully transparent

Expected behavior
I assume that top bar should keep semi-transparent after workspace switching.

Screenshots
Normal (semi transparent):
topbar-transparent
Unexpected (no background):
topbar-nobackground

System information:

Distribution: Arch Linux
GNOME Shell 45.4
Display server: Wayland
PaperWM branch/tag: develop
PaperWM commit: 76ac88a9a7e77e51a39ddf97d791623a08911b8c
Enabled extensions:
- gsconnect@andyholmes.github.io
- vertical-workspaces@G-dH.github.com
- appindicatorsupport@rgcjonas.gmail.com
- light-dict@tuberry.github.io
- user-theme@gnome-shell-extensions.gcampax.github.com
- unite@hardpixel.eu
- Bluetooth-Battery-Meter@maniacx.github.com
- kimpanel@kde.org
- runcat@kolesnikov.se
- paperwm@paperwm.github.com

Additional context
I found that the problem is related to the codes here in file tiling.js, function animateToSpace:

    if (to.hasTopBar) {
        Topbar.setNoBackgroundStyle();
    }

It works as expected if I replace the call with:

    if (to.hasTopBar) {
        if (Settings.prefs.show_window_position_bar) {
            Topbar.setNoBackgroundStyle();
        } else {
            Topbar.setTransparentStyle();
        }
    }

but I'm not sure if it would break some other things.

Thanks @lost-melody, good pickup. Your change shouldn't cause any issues.

Will test this change a little and add it to the next update. If you're up to it, feel free to create a PR for this change.

Thank you!
I appreciate the opportunity to collaborate, and have created a PR for this.