paperwm / PaperWM

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

Animations glitch on overview #347

Closed TheMascarade closed 1 year ago

TheMascarade commented 3 years ago

Happening since updating to gnome 3.38. OS: Fedora 33 Using latest release. 2020-10-28-13-03-54

azmeuk commented 3 years ago

I can confirm this too with Archlinux.

hedning commented 3 years ago

Yeah, upstream did a fairly substantial rewrite of the overview layout code in 3.38 which I haven't had the time to monkey patch correctly yet.

ejemba commented 3 years ago

@hedning Do you think you can work on the rewrite because basically now nothin is working properly under Archlinux :'(

Or should I rollback my version of gnome shell ?

hedning commented 3 years ago

@ejemba I'm on 3.38 now, so will hopefully get the time/motivation to fix things.

In the meantime I'd double check that you've turned only-scratch-in-overview. Should look like this in paperwm-preference (if you're on develop): image

hedning commented 3 years ago

OK, pushed 261ae9de8fcdefd86d70d52b72cd6019db4cf8d2, which should hopefully make things usable.

ejemba commented 3 years ago

@hedning I just pull your commit and refresh my gnome-shell I have the same scratch configuration than you. It's strange if I have at least one window that is in fullscreen, the overview screen bugs. If I reduce this same windows by lets say 200pixels then the overview is working again.

ejemba commented 3 years ago

Always got the glitch in function of the disposition of the windows (cf previous message) here are my error messages

.. gnome-shell[1079]: Can't update stage views actor overviewGroup is on because it needs an allocation.
.. gnome-shell[1079]: Can't update stage views actor overview is on because it needs an allocation.
.. gnome-shell[1079]: Can't update stage views actor overviewGroup is on because it needs an allocation.
.. gnome-shell[1079]: Can't update stage views actor overview is on because it needs an allocation.
.. gnome-shell[1079]: Can't update stage views actor overviewGroup is on because it needs an allocation.
.. gnome-shell[1079]: Can't update stage views actor overview is on because it needs an allocation.
.. gnome-shell[1079]: Can't update stage views actor overviewGroup is on because it needs an allocation.
.. gnome-shell[1079]: Can't update stage views actor overview is on because it needs an allocation.
.. gnome-shell[1079]: Can't update stage views actor overviewGroup is on because it needs an allocation.
.. gnome-shell[1079]: Can't update stage views actor overview is on because it needs an allocation.
.. gnome-shell[1079]: Can't update stage views actor overviewGroup is on because it needs an allocation.
.. gnome-shell[1079]: Can't update stage views actor overview is on because it needs an allocation.
.. gnome-shell[1079]: Can't update stage views actor overviewGroup is on because it needs an allocation.
.. gnome-shell[1079]: Can't update stage views actor overview is on because it needs an allocation.
.. gnome-shell[1079]: Can't update stage views actor overviewGroup is on because it needs an allocation.
.. gnome-shell[1079]: Can't update stage views actor overview is on because it needs an allocation.
.. gnome-shell[1079]: Can't update stage views actor overviewGroup is on because it needs an allocation.
.. gnome-shell[1079]: Can't update stage views actor Gjs_ui_workspacesView_WorkspacesView is on because it needs an allocation.
.. gnome-shell[1079]: Can't update stage views actor Gjs_ui_workspace_Workspace is on because it needs an allocation.
.. gnome-shell[1079]: Can't update stage views actor Gjs_ui_windowPreview_WindowPreview is on because it needs an allocation.
.. gnome-shell[1079]: Can't update stage views actor StBin is on because it needs an allocation.
.. gnome-shell[1079]: Can't update stage views actor StIcon is on because it needs an allocation.
.. gnome-shell[1079]: Can't update stage views actor ClutterActor is on because it needs an allocation.
.. gnome-shell[1079]: Can't update stage views actor Gjs_ui_windowPreview_WindowPreview is on because it needs an allocation.
.. gnome-shell[1079]: Can't update stage views actor StBin is on because it needs an allocation.
.. gnome-shell[1079]: Can't update stage views actor StIcon is on because it needs an allocation.
.. gnome-shell[1079]: Can't update stage views actor ClutterActor is on because it needs an allocation.
.. gnome-shell[1079]: Can't update stage views actor Gjs_ui_windowPreview_WindowPreview is on because it needs an allocation.
.. gnome-shell[1079]: Can't update stage views actor StBin is on because it needs an allocation.
.. gnome-shell[1079]: Can't update stage views actor StIcon is on because it needs an allocation.
.. gnome-shell[1079]: Can't update stage views actor ClutterActor is on because it needs an allocation.
.. gnome-shell[1079]: Can't update stage views actor Gjs_ui_windowPreview_WindowPreview is on because it needs an allocation.
.. gnome-shell[1079]: Can't update stage views actor StBin is on because it needs an allocation.
.. gnome-shell[1079]: Can't update stage views actor StIcon is on because it needs an allocation.
.. gnome-shell[1079]: Can't update stage views actor ClutterActor is on because it needs an allocation.
hedning commented 3 years ago

@ejemba Looks like you're hitting the old code, you'll need to restart gnome-shell for changes to extensions to take effect.

hedning commented 3 years ago

Working on overview fixes here: https://github.com/paperwm/PaperWM/tree/3.38-overview-fixes

Some bugs remaining, but it's usable on my machine as far as I can tell.

ejemba commented 3 years ago

@hedning Thank you, because my overview is broken ...

hedning commented 3 years ago

Fixed window sorting in the overview on develop (ie. windows are now sorted in tiling order again). Haven't quite figured out how the animation is now done, so selecting a window not already in the viewport will still result in wonky animation.

ejemba commented 3 years ago

@hedning FYI, updating metadata.json with the good gnome-shell version fix the problem for me

diff --git a/metadata.json b/metadata.json
index 142692d..4074038 100644
--- a/metadata.json
+++ b/metadata.json
@@ -4,6 +4,6 @@
   "description": "Tiling window manager with a twist",
   "url": "https://github.com/paperwm/PaperWM",
   "settings-schema": "org.gnome.Shell.Extensions.PaperWM",
-  "shell-version": [ "3.28", "3.30", "3.32", "3.34", "3.36"],
+  "shell-version": [ "3.28", "3.30", "3.32", "3.34", "3.36", "3.38" ],
   "version": "38.0"
 }

I can not explain why but no problem even if with 4 windows in fullscreen

hedning commented 3 years ago

Pushed fix for the metadata problem. I'm guessing you had an old PaperWM version installed through eg. the arch package, which was then loaded instead of the git version (though a bit weird why it wouldn't prefer the newer extension version...), adding explicit 3.38 support in the metadata then made gnome-shell prefer the newer version.

ejemba commented 3 years ago

I do not understand why you're saying I might have an old version because I'm getting it from github and git pull'ing each time and I am on the develop branch :) I do not use the Arch AUR Package.

hedning commented 3 years ago

Ah, right, it was just a guess based on the fact that changing the metadata info seemed to fix things.

paradajz commented 1 year ago

Any chance of an upcoming fix for this? Not too important but really janky, and as the OP said, it's been happening since 3.38.

jtaala commented 1 year ago

I can't quite tell from the video what glitch this is referring to (was it the pdf viewer in the video?).

I haven't experienced this issue (i.e. I can't reproduce). @paradajz can you let me know what branch you're on (you can just run the gather-system-info.sh script if you're on a recent develop commit), and give me any tips on how to reproduce this.

paradajz commented 1 year ago

@jtaala I've tried your redux fork and this is still happening. The issue is that the animation is glitchy when you select an window in overview which isn't fully shown currently on the screen. So if you have something like this, where each w is a window, and | is an actual screen border:

w1 | w2 w3 w4 | w5

Selecting w2, w3 or w4 in overview results in normal animation. Going to overview and selecting either w1 or w5 will result in somewhat broken animation. I'm attaching the video. Notice that when I select settings window which isn't fully visible on the screen in overview, the animation is somewhat wonky. Like it starts zooming in on the app correctly but then near the end it just jumps in place.

Screencast from 2023-03-29 08-31-26.webm

jtaala commented 1 year ago

@jtaala I've tried your redux fork and this is still happening. The issue is that the animation is glitchy when you select an window in overview which isn't fully shown currently on the screen. So if you have something like this, where each w is a window, and | is an actual screen border:

w1 | w2 w3 w4 | w5

Selecting w2, w3 or w4 in overview results in normal animation. Going to overview and selecting either w1 or w5 will result in somewhat broken animation. I'm attaching the video. Notice that when I select settings window which isn't fully visible on the screen in overview, the animation is somewhat wonky. Like it starts zooming in on the app correctly but then near the end it just jumps in place.

Thanks @paradajz!

I think I understand - tell me, are you using multiple monitors (e.g. the | is an actual monitor?). I think something similar was alluded to here: https://github.com/paperwm/PaperWM/issues/413#issuecomment-1320324268.

I don't usually use multiple monitors (or overview very much for that matter) - anyone that uses / sees this want to have a go at digging into this more? (debugging etc.).

paradajz commented 1 year ago

No, I'm using a single monitor (widescreen if it matters).

e.g. the | is an actual monitor?

Yes.

jtaala commented 1 year ago

Thanks @paradajz I see, I'm not quite seeing (I think) what you're seeing(?). Here's what I see with overview (you're window layout looks quite different than mine - likely the widescreen thing?):

https://user-images.githubusercontent.com/30424662/228481112-ce701eaf-04e1-4e56-82ac-6f627d9448a2.mp4

I do see the snapping though (not smooth moving to after window is selected).

paradajz commented 1 year ago

I do see the snapping though (not smooth moving to after window is selected).

Yeah, that's exactly the issue. :)

jtaala commented 1 year ago

I do see the snapping though (not smooth moving to after window is selected).

Yeah, that's exactly the issue. :)

Ah, gotcha! Sorry, kept seeing some weird (well, what I thought was weird) stuff in the video. Yep, I see the snapping. Thanks for the patience!

Lythenas commented 1 year ago

Maybe to summarize: When selecting a window in the overview that is currently not fully visible in the workspace, the overview will close (with animation) but then the selected window will snap into place instead of smoothly animating.

My guess is that the animation happens, but we don't see it because of the gnome overview close animation.

jtaala commented 1 year ago

My guess is that the animation happens, but we don't see it because of the gnome overview close animation

Good point - although I just set animation_time to something ridiculous like 10.0 (which is crazy slow) and I'd expect to see some type of animation for moving to the select window - but it still just snaps instead... so might be something else going on here. Will try dig into it a bit more.

jtaala commented 1 year ago

@paradajz, finally found the issue. @Lythenas was right (about animation during overview). Turns out focus_handler was being actioned during overview (when you select a window) and executing (or trying to) ensureViewport (which moves the view to the selected window). #502 fixes this.

If you're still on PaperWM-redux, can just do a git pull and restart gnome, otherwise hopefully this PR will be merged soon.

Quick vid of new behaviour:

https://user-images.githubusercontent.com/30424662/229046333-2aa11748-bc12-4f75-99ff-d41b959f1ebf.mp4