After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 618124 - feature to quickly switch to previous workspace
feature to quickly switch to previous workspace
Status: RESOLVED OBSOLETE
Product: mutter
Classification: Core
Component: general
2.29.x
Other Linux
: Normal enhancement
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2010-05-08 17:12 UTC by Eugeni Dodonov
Modified: 2018-01-24 01:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
initial implementation of the workspace quick-switching (5.50 KB, patch)
2010-05-08 17:12 UTC, Eugeni Dodonov
rejected Details | Review

Description Eugeni Dodonov 2010-05-08 17:12:25 UTC
Created attachment 160598 [details] [review]
initial implementation of the workspace quick-switching

This patch adds a possibility to quickly switch to previous workspace via
keybindings. Basically, if you switched from workspace 2 to workspace 1 by
pressing keyboard shortcut for workspace 1, pressing the same shortcut again
while on workspace 1 will switch back to workspace 2.

I initially described it here:

http://dodonov.net/blog/2010/05/06/gnome-hacking/

I did it for metacity originally, but having in mind that mutter is the future of gnome window managers, I adapted it for mutter as well. I know that it is probably a low priority feature, but I thought it would be more appropriate to post it here anyway to get your feedback or suggestions.
Comment 1 Eugeni Dodonov 2010-05-08 17:12:56 UTC
(Note: the original implementation for metacity is in bug #618018).
Comment 2 Owen Taylor 2011-07-09 01:41:23 UTC
A) As much as possible we try to avoid random GConf keys that just tweak one aspect of behavior - if this actually is useful behavior, then Mutter should just do it. If it isn't useful, nobody is going to know to look for a hidden GConf key to find it. There are a lot of GConf keys in Mutter that *seem* to tweak random behavioral things, yes, but conceptually we try to do that to accomodate people with apps they need to use, or different setups.

B) I think as implemented here, this *isn't* the right behavior. With a sample size of 1, when I once used "switch to desktop" keybindings, I'd have a pattern of doing alt-f1/f2/f3/f4 until I found what I was looking for. With that pattern, if you are sitting on the first desktop hit Alt-F1 and it pops you somewhere else, that's just confusing.

C) But you should be able to implement your behavior with a GNOME Shell extension pretty easily - using  meta_keybindings_set_custom_handler()

C) What I think might be a useful "just works behavior" is that if I hit Alt-F1 (whatever the configured shortcut was), then hit F1 again *without* releasing the Alt key, it toggles me back to the last desktop. I'd take a patch that did that.
Comment 3 Owen Taylor 2011-07-09 01:43:30 UTC
Review of attachment 160598 [details] [review]:

As noted in comments, don't want to take this patch like this. BTW, see https://live.gnome.org/GnomeShell/Development/WorkingWithPatches for how to create properly formatted patches for bugzilla bugs.
Comment 4 Eugeni Dodonov 2011-07-09 01:50:27 UTC
Fair enough, this makes perfect sense for me! Thanks for the feedback!

I actually don't know whether this functionality would fit into gnome3 way of working, with ad-hoc workspaces being created when needed. So perhaps this could be closed - it is your call! If this feature would be interested however, I can rework the patch.

Thanks for the tip on using meta_keybindings_set_custom_handler(), I think it will do the job as well, and won't interfere with main mutter features.