sunwxg / gnome-shell-extension-switchworkspace

MIT License
17 stars 3 forks source link

Extension doesn't update most recent workspaces after a workspace switch made without the extension #4

Closed courtyardz closed 3 years ago

courtyardz commented 4 years ago

Gnome version 3.36.6 on X11

The extension works fine if I exclusively use the Switch Workspace Keybinding to switch workspaces.

However, if I switch workspaces using other means (e.g., clicking on a workspace in the gnome overview, or by using keybindings) the Switch Workspace extension doesn't keep track of the visits!

You can observe this by holding the Switch Workspace Keybind, noting the order of workspaces, cycling back to the current workspace so no switch occurs, then switching to a random workspace by clicking on one in the gnome overview, then immediately switch back to the previous workspace via clicking in the gnome overview, and finally holding the Switch Workspace Keybind down again... you will observe that this "normal" workspace switch did not alter the order of the extension's most recent workspace list.

Please consider if it is possible to make the extension detect "normal" workspace switches (ones not made via the extension) in order to keep the extension's most recent list properly updated. I expect many users of your extension intermix "normal" and extension-based workspace switches, and this would be a major improvement to usability :)

Personally, for someone who has set custom keybindings to switch to specific workspaces via , e.g., the terminal command:

gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-7 "['<Super>7']"

it is incredibly jarring to have switched to a number of workspaces, and then to try to use your extension to toggle between my most recent workspaces, only to find it takes me to a stale workspace instead.

Thank you for making this extension!

sunwxg commented 4 years ago

Yes, you are right. If you use other way to switch workspace, the workspace list in my extension doesn't update, then you will meet the issue you said. I think it can be improved in the future.

courtyardz commented 3 years ago

I updated and the fix works perfectly! Much appreciated @sunwxg! Helps my workflow a lot.