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

Fix workspace thumbnails box size in overview #177

Open
mzur opened this issue Sep 24, 2021 · 8 comments · May be fixed by #270
Open

Fix workspace thumbnails box size in overview #177

mzur opened this issue Sep 24, 2021 · 8 comments · May be fixed by #270
Labels
gnome-40 help wanted Extra attention is needed

Comments

@mzur
Copy link
Owner

mzur commented Sep 24, 2021

The container box of the workspace thumbnails has the wrong height. This cuts off mouse events for all thumbnails but those in the first row. Effects:

  • You can switch to a workspace in the first row with a click but not in the second row of workspaces.
  • You can drag and drop a window in the first row but not to the second row of workspaces.
@AJCxZ0
Copy link

AJCxZ0 commented Nov 15, 2021

I've observed this in Fedora 35 with GNOME 41.1 on Wayland.

  • In the workspace grid overview, switching to a workspace by double-clicking the empty (part of a) workspace only works for the top row.
    • Clicking on a window in a workspace on other rows correctly switches the that window and workspace.
  • Dragging a window to a workspace only works for the top row, with windows dropped in lower workspaces appearing in the top row workspace above.

While not part of this bug, the workspace grid overview is unexpectedly small and the config offers no opportunity to scale it.

@sanwablo
Copy link

sanwablo commented Jan 11, 2023

Same behaviour as described by @mzur and @AJCxZ0 and in Ubuntu 22.04 with GNOME 42.5 on X11.

mainland added a commit to mainland/gnome-shell-wsmatrix that referenced this issue Oct 31, 2023
The ThumbnailsBox base class only uses the x coordinate to test whether a point
is in a workspace. This is not sufficient when we may have multiple rows of
thumbnails.

The new _withinWorkspace function also uses the y coordinate. This requires
overriding handleDragOver as well so that it passes both the x and y coordinates
to _withinWorkspace.

Fixes mzur#177.
@mainland
Copy link

I believe I have a fix for this issue at mainland/gnome-shell-wsmatrix@62be78e8. Since the fix is for an older version of gnome-shell (42.9), I didn't open a pull request.

mzur added a commit that referenced this issue Nov 4, 2023
This was originally implemented by @mainland.

The ThumbnailsBox base class only uses the x coordinate to test whether a point
is in a workspace. This is not sufficient when we may have multiple rows of
thumbnails.

The new _withinWorkspace function also uses the y coordinate. This requires
overriding handleDragOver as well so that it passes both the x and y coordinates
to _withinWorkspace.

References mainland@62be78e8
References #177
@mzur mzur linked a pull request Nov 4, 2023 that will close this issue
2 tasks
@mzur
Copy link
Owner Author

mzur commented Nov 4, 2023

Thanks @mainland! I've applied your changes in #270 and it works nicely. This issue is also about fixing the behavior when switching workspaces with a click. Would you be willing to look into that, too? I noticed that the switching works if you click on a window in one of the lower workspaces but not if you click on the background.

mainland added a commit to mainland/gnome-shell-wsmatrix that referenced this issue Sep 25, 2024
The ThumbnailsBox base class only uses the x coordinate to test whether a point
is in a workspace. This is not sufficient when we may have multiple rows of
thumbnails.

The new _withinWorkspace function also uses the y coordinate. This requires
overriding handleDragOver as well so that it passes both the x and y coordinates
to _withinWorkspace.

Fixes mzur#177.
mainland added a commit to mainland/gnome-shell-wsmatrix that referenced this issue Sep 25, 2024
This fix adjusts the ThumbnailsBox's allocation in vfunc_allocate. A better fix
would correctly specify the preferred width and height, but I couldn't figure
out how to get that to work.

This patch finally fully fixes mzur#177.
@mainland
Copy link

mainland commented Sep 25, 2024

I believe I have a full fix, updated for Gnome Shell 46, at mainland/gnome-shell-wsmatrix@f63cf909. Drag and drop works on all workspace, and selecting a workspace in any row now works even when clicking on the workspace background.

These fixes only work with version 46, so they may not solve, e.g., #270, which appears to be reporting the same issue but for an older version of Gnome Shell.

@mzur
Copy link
Owner Author

mzur commented Sep 28, 2024

Thanks @mainland! I'll look at it as soon as I can and try to finally merge the PR with the fix. Support for older GNOME versions is not an issue. I'm way behind trying to support only the most recent version...

@mzur
Copy link
Owner Author

mzur commented Sep 28, 2024

Or maybe could you please open a PR against #270 to make this a little easier?

@mainland
Copy link

mainland commented Oct 3, 2024

Since #270 is a pull request, I don't think I can open a pull request against it. I can open a new pull request against #177 if that helps. If there's something different I can do to help, I'm happy to do that instead—please just let me know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gnome-40 help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants