MichaelAquilina / improved-workspace-indicator

gnome-shell extension that provides a workspace indicator similar to i3/sway
42 stars 12 forks source link

Add compatibility option for DING #6

Closed quintinm-dev closed 3 years ago

quintinm-dev commented 3 years ago

Hi Michael, thanks for this extension, it's really nice.

Fixes

This should fix issue https://github.com/MichaelAquilina/improved-workspace-indicator/issues/3 re: in-use workspaces with DING. DING creates a window on each monitor with is_skip_taskbar set to true. I am hopeful that this is a general fix for other apps/extensions, but if not, non-standard windows are also identifiable through their window_type.

It also adds the option to ignore windows outside the non-primary monitor, which is useful if you have org.gnome.mutter workspaces-only-on-primary set to true.

Notes

quintinm-dev commented 3 years ago

Thanks for the feedback and interest! Looking forward to the next release.

quintinm-dev commented 3 years ago

Actually, it seems like there is a bug where all workspaces are sometimes shown on system startup. The workaround is to click on the active workspace but I'm looking into it.

quintinm-dev commented 3 years ago

The issue is with the workspaces-only-on-primary true support. Dragging a window from a secondary to the primary monitor seems to add it to all workspaces. The workaround is to switch to any other workspace.

https://user-images.githubusercontent.com/12143900/130558149-8405d33b-8a9b-4a3d-9432-b42da6b5e335.mp4

I did not dig into whether this is specific to my system state, but it seems to come from 2 potential issues with Mutter: 1) dragging a window from a secondary monitor to a primary triggers the window-removed event on every workspace. 2) following 1), the dragged window is listed on workspace.list_windows() for every workspace

Let me know if you don't want to include this option given the bug. Personally I will still be using it as I don't move windows from secondary to primary that often.

MichaelAquilina commented 3 years ago

The issue is with the workspaces-only-on-primary true support. Dragging a window from a secondary to the primary monitor seems to add it to all workspaces. The workaround is to switch to any other workspace. issue.mp4

I did not dig into whether this is specific to my system state, but it seems to come from 2 potential issues with Mutter:

1. dragging a window from a secondary monitor to a primary triggers the window-removed event on every workspace.

2. following 1), the dragged window is listed on `workspace.list_windows()` for every workspace

Let me know if you don't want to include this option given the bug. Personally I will still be using it as I don't move windows from secondary to primary that often.

My suggestion would be that we split this PR into two - one for the workspaces-only-on-primary and the other for the skip-taskbars option. That way, we can dig into the bug a bit more without delaying the skip-taskbars feature.

From what you explained, the bug seems solvable with some more time and investigation

quintinm-dev commented 3 years ago

Yeah sounds good! Removed the workspaces-only-on-primary stuff to follow-up on in another PR.

MichaelAquilina commented 3 years ago

going to run this locally for about a day or so and then I'll upload a new release :)