mzur / gnome-shell-wsmatrix

GNOME shell extension to arrange workspaces in a two-dimensional grid with workspace thumbnails
GNU General Public License v3.0
464 stars 59 forks source link

FC33/Gnome 3.38: No DnD on activity overview #143

Closed arjenpdevries closed 3 years ago

arjenpdevries commented 3 years ago

After switching to FC33 and upgrading the extension, it seems that DnD for windows from one workspace to another doesn't work anymore (it used to for FC32 and below).

Great extension btw!

mzur commented 3 years ago

Please have a look at #125, could this be related to some of the unresolved tasks? If not, this should be added as another task. You are very welcome to contribute to the pull request to establish full GNOME 3.38 support.

mzur commented 3 years ago

I did a quick test with GNOME 3.38 on Arch and DnD works fine there. Do you have any other extensions installed? If so, please disable all of them except this one and try again. Also have a look if there are any errors in journalctl /usr/bin/gnome-shell.

arjenpdevries commented 3 years ago

Thanks for such a quick response!

I disabled all other extensions but that did not help. The journalctl logs do not shed light either, so I guess we have to await other reports to confirm (and I will let you know if the problem disappears).

ZeChArtiahSaher commented 3 years ago

Can confirm DnD not working fully working for me either. I'm able to DnD windows between workspace previews, but not window tiles to the workspace previews like it used to function before.

arjenpdevries commented 3 years ago

Thanks @ZeChArtiahSaher I never knew you could do that - at least a temporary workaround!

So the bottom line is:

The latter used to work (and I use it a lot for firefox windows :-)). Glad that it is not something weird in my setup.

ZeChArtiahSaher commented 3 years ago

I assume the bug is at least partially within if statement https://github.com/mzur/gnome-shell-wsmatrix/blob/16609ff92e8c512e570fa3ed528357912a911546/wsmatrix%40martin.zurowietz.de/ThumbnailsBoxOverride.js#L292

causing to falsely to DND.DragMotionResult.CONTINUE

I managed to quickly fix functionality by changing to: if ((!source.realWindow && !source.metaWindow) &&

It seems to break dragging between workspaces and introduces render bugs on multi-monitor setup if I drag a window out of the preview while covering another one on the activity, so definitely not used as intended.

My judgement is entirely based on the fact that the hand cursor was not changing while dragging windows onto previews.

So initial erroneous behavior is still unclear: when dragging to previews cursor does not indicate that window can be dragged onto preview, and if mouse is released it sometimes moves the windows but chooses a wrong workspace.

mzur commented 3 years ago

Could you please elaborate what you mean with "if you drag a window from the workspace to a workspace preview". For me this works in the activity overview:

arjenpdevries commented 3 years ago

Interesting, the first works for me but the second does not.

I hope we use the same terminology...

After pressing Super I can move window thumbnails around in the right-hand panel of workspace previews, but I cannot drag a window from the left-hand side (current workspace representation) to the previews on the right. This used to work before upgrading to FC33. It's not related to Wayland vs. X11.

(Adding a screenshot doesn't work unfortunately)

mzur commented 3 years ago

I think we are talking about the same things. This definitely works on my Arch VM that I use to test this extension with GNOME 3.38. Do you maybe have other extensions installed that might interfere here? Which version of this extension do you use?

arjenpdevries commented 3 years ago

I have checked disabling all other extensions and that does not have an effect.

I have version 24 of the extension.

mzur commented 3 years ago

I just started a stock-Fedora 33 live session and only installed this extension. Both kinds of DnD work for me. You mean Fedora when you say FC33, right?

arjenpdevries commented 3 years ago

Yes, I do. Very puzzling - thanks for trying it out, even if I cannot explain why it would work for you and not for me. Will try more later.

gowza commented 3 years ago

I am having the same problem with DnD of a window at the center of the activity overview (a window from the current workspace) to a workspace thumbnail.

I agreed with what @ZeChArtiahSaher mentioned that the source.realWindow check is giving incorrect result. Looking closer at the checking code, it seems that we got this from the gnome-shell's workspaceThumbnail.js file. The current version of that file has moved from checking realWindow to checking metaWindow.

https://github.com/GNOME/gnome-shell/blob/7a57528bd7940e68c404d15d398f88730821cec9/js/ui/workspaceThumbnail.js#L886-L890

Checking the commit history, the change was done in June last year (https://github.com/GNOME/gnome-shell/commit/46600740fedd6da7344d4693fb8b0721ef063d0c). I am not sure what is the different between realWindow and metaWindow. However, to keep consistency with the upstream gnome-shell, should we move to using metaWindow? I did some basic debuggings and it seem that source.realWindow is always undefined.

mzur commented 3 years ago

@gowza Can you please check if the problem is resolved if you use metaWindow instead of realWindow?

gowza commented 3 years ago

@mzur Yes, can confirm that problem is resolved when I use metaWindow instead of realWindow.

mzur commented 3 years ago

Thanks! Can you please send a pull request with the fix?

mzur commented 3 years ago

The fix has been implemented in #147 and a new version submitted to extensions.gnome.org.