GNOME Bugzilla – Bug 664409
alternate-tab patch to restore legacy alt-tab behaviour
Last modified: 2011-12-01 16:24:48 UTC
Created attachment 201731 [details] [review] Patch to restore full legacy behaviour to alternate-tab extension This patch restores the legacy alt-tab behaviour of the extension so that alt-tab cycles through all windows within only the current workspace. This behaviour is a huge advantage if like me you use workspaces to segregate individual work flows while multitasking. In addition (as a bonus feature) if alt-tab is used within a workspace that has no windows open the behaviour reverts to cycling through all windows open within all workspaces so avoiding an extra navigation step. The patch includes the 2 fixes mentioned in bug 663064. As far as I can see this is a complete solution that works well and leaves no errors in the xsession-errors log, but as I am a C++ rather the js programmer I may have missed some subtle issues with the coding or formatting.
Your patch seems to be fine, although it replaces current behaviour completely. I would rather instead introduce a third mode to the extension (perhaps using a parameter to AltTabPopup2, if you don't want to duplicate code), to avoid regressing from what's implemented now. Also, bug 663064 is fixed now, so you may want to rebase your patch.
That sounds a good idea. I've added a schema for this extension for 3.0 based on the one in 3.2 with a boolean control for this new behaviour (is there already a schema in 3.0 that has not made it into the Fedora 15 updates yet ?). I've also tightened up the code a bit. I'm still working against the old version of the extension so will submit the patch and schema once I've updated to your latest version.
Created attachment 202169 [details] [review] NULL pointer fix patch (possibly already esisting from bug 663064).
Created attachment 202170 [details] [review] New "just one workspace" mode to optionally restrict window selection to just the current workspace
I've cloned the git repository and checked out branch gnome-3-0 but cannot see your 663064 fixes (sorry - I'm not that familiar with git so may be doing something wrong). So to avoid my change conflicting with yours I've split it into 2 patches, one to apply your NULL pointer fixes and a second to apply my "just one workspace" mode. The new mode is activated with: gsettings set org.gnome.shell.extensions.alternate-tab just-current-workspace true I've simplified the window list capture code to remove the need for 2 passes and left the WindowList._init method as original as the list of windows appears to already be set for that call, so does not need filtering. This all runs without any errors in .xsession-errors
I didn't notice this (and bug 663064) were against gnome 3.0. Patches as they stand are both fine (if you tested them - I don't have gnome-shell 3.0 here), and you can commit them, although I don't expect further release of the gnome-3-0 branch. Also, consider that GSettings in extensions are not supported before 3.3.2, and therefore this patch will make alternate-tab not locally installable. (If you don't have commit rights, tell me and I'll commit)
Hi. I don't think I have any commit rights so if you could commit them that would be really very helpful. Thanks.