Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scratchpad windows vanish while scrolling with Dash to Panel #646

Closed
Thesola10 opened this issue Oct 27, 2023 · 23 comments · Fixed by #651
Closed

Scratchpad windows vanish while scrolling with Dash to Panel #646

Thesola10 opened this issue Oct 27, 2023 · 23 comments · Fixed by #651
Labels
bug Undesirable behavior extension-conflict Issues caused by interaction with other extensions help wanted Don't hesitate to participate!

Comments

@Thesola10
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
Scratchpad windows are a great feature, which is often required for certain apps such as Firefox's Picture-in-Picture. However it is jarring and impractical that they just blink out of view when scrolling through a workspace, when doing so is such a core part of the PaperWM experience

Describe the solution you'd like
Would it be possible to keep scratchpad windows displayed while scrolling through the workspace (and changing workspaces since scratchpad is common to all workspaces by default), maybe with reduced opacity?

@Thesola10 Thesola10 added the enhancement Adds a new feature or extends scope label Oct 27, 2023
@Thesola10
Copy link
Collaborator Author

Likely related to #25

@jtaala
Copy link
Collaborator

jtaala commented Oct 28, 2023

Hey @Thesola10,

Hmm - do you mean scrolling / swiping windows and switching spaces in PaperWM?

It should remain visible:

Kooha-2023-10-28-16-32-11.1.mp4

@Thesola10
Copy link
Collaborator Author

Oh, is that so? Well, on my system, they disappear during touchpad gestures.

For reference my install has #643 applied, but that doesn't affect touchpad scrolling.

Capture.video.du.2023-10-28.11-51-29.webm

@Thesola10
Copy link
Collaborator Author

Thesola10 commented Oct 28, 2023

Oh, it's related to "Show scratch windows in overview" being set to "Only". Setting it to "Never" fixes it once, switching back brings back the issue permanently, even when set to "Never" again. It's very unreliable.

Nevermind, fix worked once and never again.

@Thesola10 Thesola10 changed the title Keep scratchpad windows visible while scrolling Keep scratchpad windows visible while scrolling when set to "only" shown in overview Oct 28, 2023
@jtaala
Copy link
Collaborator

jtaala commented Oct 28, 2023

Hmm - I'm not seeing this at all. Can you please run './gather-system-info.sh'?

I'll need to replicate and reproduce exactly what you're seeing to isolate the issue.

@Lythenas - you ever seen this issue?

@Thesola10
Copy link
Collaborator Author

Thesola10 commented Oct 28, 2023

Distribution: Arch Linux
GNOME Shell 45.0
Display server: Wayland
PaperWM branch/tag: develop
PaperWM commit: 1872c2446b6db0298249c90ccb6431859536fe94
Enabled extensions:
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- quick-settings-tweaks@qwreey
- quick-settings-avatar@d-go
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]

@Thesola10
Copy link
Collaborator Author

Thesola10 commented Oct 28, 2023

Also, I presume you may want a dconf dump as well?

[/]
disable-scratch-in-overview=false
disable-topbar-styling=true
edge-preview-scale=0.0
has-installed-config-template=true
horizontal-margin=20
only-scratch-in-overview=true
override-hot-corner=false
pressure-barrier=true
restore-attach-modal-dialogs='true'
restore-edge-tiling='false'
restore-keybinds='{"cancel-input-capture":{"bind":"[\\"<Super><Shift>Escape\\"]","schema_id":"org.gnome.mutter.keybindings"},"restore-shortcuts":{"bind":"[\\"<Super>Escape\\"]","schema_id":"org.gnome.mutter.wayland.keybindings"},"switch-applications":{"bind":"[\\"<Super>Tab\\",\\"<Alt>Tab\\"]","schema_id":"org.gnome.desktop.wm.keybindings"},"switch-to-workspace-left":{"bind":"[\\"<Super>Page_Up\\"]","schema_id":"org.gnome.desktop.wm.keybindings"},"move-to-monitor-down":{"bind":"[\\"<Super><Shift>Down\\"]","schema_id":"org.gnome.desktop.wm.keybindings"},"switch-applications-backward":{"bind":"[\\"<Shift><Super>Tab\\",\\"<Shift><Alt>Tab\\"]","schema_id":"org.gnome.desktop.wm.keybindings"},"switch-to-workspace-1":{"bind":"[\\"<Super>Home\\"]","schema_id":"org.gnome.desktop.wm.keybindings"},"switch-to-workspace-right":{"bind":"[\\"<Super>Page_Down\\"]","schema_id":"org.gnome.desktop.wm.keybindings"},"switch-to-workspace-last":{"bind":"[\\"<Super>End\\"]","schema_id":"org.gnome.desktop.wm.keybindings"},"switch-group-backward":{"bind":"[\\"<Shift><Super>Above_Tab\\",\\"<Shift><Alt>Above_Tab\\"]","schema_id":"org.gnome.desktop.wm.keybindings"},"move-to-monitor-right":{"bind":"[\\"<Super><Shift>Right\\"]","schema_id":"org.gnome.desktop.wm.keybindings"},"move-to-monitor-left":{"bind":"[\\"<Super><Shift>Left\\"]","schema_id":"org.gnome.desktop.wm.keybindings"},"move-to-monitor-up":{"bind":"[\\"<Super><Shift>Up\\"]","schema_id":"org.gnome.desktop.wm.keybindings"},"switch-group":{"bind":"[\\"<Super>Above_Tab\\",\\"<Alt>Above_Tab\\"]","schema_id":"org.gnome.desktop.wm.keybindings"},"shift-overview-down":{"bind":"[\\"<Super><Alt>Down\\"]","schema_id":"org.gnome.shell.keybindings"},"focus-active-notification":{"bind":"[\\"<Super>n\\"]","schema_id":"org.gnome.shell.keybindings"},"shift-overview-up":{"bind":"[\\"<Super><Alt>Up\\"]","schema_id":"org.gnome.shell.keybindings"}}'
restore-workspaces-only-on-primary='false'
show-window-position-bar=false
show-workspace-indicator=false
swipe-friction=[0.30000000000000004, 0.40000000000000002]
swipe-sensitivity=[3.5000000000000013, 4.0]
topbar-follow-focus=false
use-default-background=true
vertical-margin=34
vertical-margin-bottom=6
window-gap=25
winprops=['{"wm_class":"com.github.rafostar.Clapper","scratch_layer":true}', '{"wm_class":"com.vixalien.sticky","scratch_layer":true}', '{"wm_class":"firefox","title":"Incrustation vidéo","scratch_layer":true}', '{"wm_class":"firefox","title":"Firefox - Indicateur de partage","scratch_layer":true}', '{"wm_class":"gcolor3","scratch_layer":true}', '{"wm_class":"gsconnect","scratch_layer":true}', '{"wm_class":"io.bassi.Amberol","scratch_layer":true}', '{"wm_class":"org.gnome.design.Contrast","scratch_layer":true}', '{"wm_class":"org.kde.kruler","scratch_layer":true}', '{"wm_class":"steam","scratch_layer":true}', '{"wm_class":"Vlc","scratch_layer":true}', '{"wm_class":"zenity","scratch_layer":true}', '{"wm_class":"waydroid.*","scratch_layer":true}']

[keybindings]
close-window=['<Super>q']
switch-down-workspace=['<Super>Page_Down']
switch-up-workspace=['<Super>Page_Up']
toggle-scratch=['<Super>d']

[workspaces]
list=['bc5d8ac8-9430-4482-9070-8f0ad468441d', '78e36ce7-5b4f-4ef4-92d0-5ea8b561e83a', '1ac74b32-e039-4a37-9067-d96c78318bed', '92c64e86-eb1a-404e-bb43-c89a6b17e6a1', 'bfb03386-200d-4021-b9bd-5e251236668e', 'deacc062-6110-484a-a191-6cf27860eca2', '62f1a3c2-7b04-4e74-86d9-0c8734bd9a1d', 'd5312e75-d7e2-44cf-acf6-facabd73d76e']

[workspaces/1ac74b32-e039-4a37-9067-d96c78318bed]
index=2
name='🖵  3'

[workspaces/62f1a3c2-7b04-4e74-86d9-0c8734bd9a1d]
index=6
name='🖵  5'

[workspaces/78e36ce7-5b4f-4ef4-92d0-5ea8b561e83a]
index=1
name='🖵  2'

[workspaces/92c64e86-eb1a-404e-bb43-c89a6b17e6a1]
index=3
name='🖵  4'

[workspaces/bc5d8ac8-9430-4482-9070-8f0ad468441d]
directory='/home/karim'
index=0
name='🖵  1'
show-top-bar=true

[workspaces/bfb03386-200d-4021-b9bd-5e251236668e]
index=5
name='🖵  7'

[workspaces/d5312e75-d7e2-44cf-acf6-facabd73d76e]
index=7
name='🖵  6'

[workspaces/deacc062-6110-484a-a191-6cf27860eca2]
index=4
name='🖵  8'

@Thesola10 Thesola10 changed the title Keep scratchpad windows visible while scrolling when set to "only" shown in overview Keep scratchpad windows visible while scrolling Oct 28, 2023
@Thesola10
Copy link
Collaborator Author

Also of interest, while running journalctl -f /bin/gnome-shell the following message always appears when scratch windows vanish:

clutter_actor_insert_child_below: assertion 'sibling == NULL || (CLUTTER_IS_ACTOR (sibling) && sibling->priv->parent == self)' failed

@jtaala
Copy link
Collaborator

jtaala commented Oct 28, 2023

Very strange. I'll checkout your branch and see if I can reproduce.

In the meantime, can you confirm / test by disabling all other extensions (only have PaperWM enabled) and logout/login?

Just to rule out any weird extension clash.

@jtaala
Copy link
Collaborator

jtaala commented Oct 28, 2023

Hmm - I'm on your branch but can't reproduce. I've set it to different Show scratch windows in overview settings.

I'll put a few tags on this and see if anyone else is seeing this.

@jtaala jtaala added can't reproduce Issue doesn't happen on our end help wanted Don't hesitate to participate! labels Oct 28, 2023
@jtaala
Copy link
Collaborator

jtaala commented Oct 28, 2023

Okay, found the cause - it's dash-to-panel extension. Disabling that stop the window from disappearing.

@jtaala jtaala added the extension-conflict Issues caused by interaction with other extensions label Oct 28, 2023
@Thesola10
Copy link
Collaborator Author

Thesola10 commented Oct 28, 2023

it's always dash-to-panel isn't it does that mean you can remove the can't reproduce badge? Also, switch "enhancement" with "bug"?

@Thesola10 Thesola10 changed the title Keep scratchpad windows visible while scrolling Scratchpad windows vanish while scrolling with Dash to Panel Oct 28, 2023
@jtaala
Copy link
Collaborator

jtaala commented Oct 28, 2023

Hmm - yeah, not sure what dash-to-panel is doing there - maybe it's treating our scratch windows as hidden windows to something?

I was looking for a setting or something in it but couldn't find anything that changed that behaviour.

@jtaala jtaala removed the can't reproduce Issue doesn't happen on our end label Oct 28, 2023
@Thesola10
Copy link
Collaborator Author

Thesola10 commented Oct 28, 2023

On a semi-unrelated note, Dash-to-Panel seems to have its own way of restoring windows -- for instance, there's a bug with osu!lazer + fractional scaling + wayland + GNOME 45 where the window is shifted to the bottom quadrant and the rest of the screen is black, but when restoring the window from Dash-to-Panel the issue doesn't occur.

All this may have something to do with Dash-to-Panel's own window previews or window peeking, when hovering over an open app icon, a la Windows 7+. Or not. Tried disabling it, no dice.

@jtaala
Copy link
Collaborator

jtaala commented Oct 28, 2023

that is so interesting! That semi-related bug you mentioned sounds like something @capsel is seeing in #638.

@jtaala
Copy link
Collaborator

jtaala commented Oct 28, 2023

The semi-related bug - is there a link for anything for a bug report?

@Thesola10
Copy link
Collaborator Author

Thesola10 commented Oct 28, 2023

I don't think it's a ppy/osu issue since it only started with GNOME 45. Full-screen max-ing any window causes it to momentarily flash in the bottom right quadrant before fixing itself, while osu! doesn't.

@jtaala
Copy link
Collaborator

jtaala commented Oct 28, 2023

Anyways, hmm - not sure what to do there then. We don't really have the resources to try address other extension conflict issues (and I don't use dash-to-panel, but have it installed as I check it when others are seeing weird stuff and I can't reproduce).

@jtaala
Copy link
Collaborator

jtaala commented Oct 28, 2023

momentarily flash in the bottom right quadrant

Yeah, I fixed an animation issue in the latest PaperWM release that was seeing the flashing bottom quadrant issue - but still seeing some issues in Gnome 45 re that stuff.

I'll do some digging next week.

@Thesola10
Copy link
Collaborator Author

Thesola10 commented Oct 28, 2023

Oh, that's very interesting:

Main.uiGroup.insert_child_below(w.clone, Main.layoutManager.panelBox);

According to this line, the panel is used as reference for invoking the scratch clone. Guess what component Dash-to-Panel completely replaces?

@Thesola10
Copy link
Collaborator Author

Thesola10 commented Oct 28, 2023

Yeah, seems panelBox just doesn't show up in Main.uiGroup's children under Looking Glass when Dash to Panel is active. Thus, Clutter complains that Main.layoutManager.panelBox isn't a neighbor we can add children below.

Could be fixed by finding a component we know isn't thrown away by Dash to Panel in Main.uiGroup, like the scroll view's own shadow clone? This would make PaperWM much more self-contained.

@jtaala
Copy link
Collaborator

jtaala commented Oct 28, 2023

Nice find! That makes sense. Give it a go and see if it can be worked around.

@Thesola10
Copy link
Collaborator Author

diff --git a/scratch.js b/scratch.js
index 8f7e3f0..547eace 100644
--- a/scratch.js
+++ b/scratch.js
@@ -217,7 +217,7 @@ export function animateWindows() {
     for (let w of ws) {
         let parent = w.clone.get_parent();
         parent && parent.remove_child(w.clone);
-        Main.uiGroup.insert_child_below(w.clone, Main.layoutManager.panelBox);
+        Main.uiGroup.insert_child_above(w.clone, global.window_group);
         let f = w.get_frame_rect();
         w.clone.set_position(f.x, f.y);
         Tiling.animateWindow(w);

this works for me, just placing scratch windows above the global.window_group, taking inspiration from liveAltTab.js

@jtaala jtaala added bug Undesirable behavior and removed enhancement Adds a new feature or extends scope labels Oct 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Undesirable behavior extension-conflict Issues caused by interaction with other extensions help wanted Don't hesitate to participate!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants