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 661281 - alternate-tab workspace & icons mode is not working
alternate-tab workspace & icons mode is not working
Status: RESOLVED OBSOLETE
Product: gnome-shell
Classification: Core
Component: extensions
3.2.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2011-10-08 19:09 UTC by Joachim Bargsten
Modified: 2013-05-24 14:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix the workspace & icons mode of alternate-tab for gnome > 3.2 (6.23 KB, patch)
2011-10-08 19:09 UTC, Joachim Bargsten
committed Details | Review

Description Joachim Bargsten 2011-10-08 19:09:40 UTC
Created attachment 198621 [details] [review]
Fix the workspace & icons mode of alternate-tab for gnome > 3.2

Since the API update to gnome 3.2 the workspace & icons mode is not working correctly. Here is the patch. The other modes I didn't check, they probably suffer from the same problems.
Comment 1 Diego 2011-10-10 15:13:07 UTC
Hi, I tried applying this patch with git apply and now my shell crashes when I try to alt-tab.

Let me know if there's any info that would be helpful
Comment 2 Joachim Bargsten 2011-10-10 20:47:11 UTC
Can you name the exact steps to reproduce the crash?
Did you try to install the shell extensions from git w/o patch applied?
Comment 3 Diego 2011-10-10 23:49:57 UTC
So I just tried installing the extension from git w/o patch and the same thing happened.

The steps to reproduce are:
1. Install extension
2. Alt+f2 'r' enter
3. Open gnome tweak and activate alternate-tab
4. Press alt-tab

The "Oops" screen pops up after the first or second try of alt-tabbing (but I see the shell restart after the first try).  Then i have to deactivate the extension and log in again.
Comment 4 Joachim Bargsten 2011-10-22 22:31:39 UTC
Hmm, I need more (debug) information. Can you walk through following steps:

1. get gnome shell version*
    $ gnome-shell --version
2. check if the gsettings schema is correctly installed*
    $ gsettings list-keys org.gnome.shell.extensions.alternate-tab
    $ gsettings get org.gnome.shell.extensions.alternate-tab behaviour
3. deactivate all other extensions
4. clone the gnome-shell-extensions repo
5. apply the patch
6. install it
7. reload the gnome shell
8. activate the alternate tab extension
9. start gnome shell in a screen session and save the
   gnome shell output to /tmp/gnome-shell-output.txt*
    $ screen
    $ gnome-shell --replace 2>&1 | tee /tmp/gnome-shell-output.txt
10. press alt-tab and crash gnome

* paste the result/output in bugzilla
Comment 5 Diego 2011-10-23 18:01:11 UTC
Hi, this problem seems to be fixed with the latest gnome-shell and extensions updates (3.2.1).  Unfortunately now I have another problem;  The alt tab doesn't seem to wait for alt to release.  As soon as I hit alt tab it just switches to the next window on the list even if I leave alt pressed.  This prevents me from choosing any other through alt tab.  I can file a new bug report for that if needed.
Comment 6 Milan Bouchet-Valat 2011-10-23 18:08:06 UTC
Yes, please do.
Comment 7 Joachim Bargsten 2011-10-23 19:09:29 UTC
Did you apply this patch? Because this behaviour/bug you describe was the reason why I created the patch...
Comment 8 Milan Bouchet-Valat 2011-10-23 20:15:25 UTC
I must confess I didn't understand why you, the reporter, were asking questions to Diego just like you were trying to debug his problem. Sorry for the noise, let's keep this bug open until somebody reviews the patch.
Comment 9 Joachim Bargsten 2011-10-23 20:36:56 UTC
I thought that the patch didn't work, so I asked Diego to give me some clues. I tried to find out if the patch really didn't work or the bug sits elsewhere. Since I wrote the workspace & icons mode of the alternate-tab extension, I'm kind of interested to get it working in 3.2.x.
Comment 10 Diego 2011-10-23 22:36:54 UTC
Ok since this patch is to fix that behaviour I tried reinstalling from a fresh clone after applying the patch.  I installed it with

./autogen.sh --prefix=$HOME/.local --enable-extensions="one two three"
make install

As a user.

diego: ~$ gnome-shell --version
GNOME Shell 3.2.1
diego: ~$ gsettings list-keys org.gnome.shell.extensions.alternate-tab
No such schema 'org.gnome.shell.extensions.alternate-tab'
diego: ~$ gsettings get org.gnome.shell.extensions.alternate-tab behaviour
No such schema 'org.gnome.shell.extensions.alternate-tab'
diego: ~$ cat /tmp/gnome-shell-output.txt 

(gnome-shell:18774): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:58:14: Themeing engine 'unico' not found
      JS LOG: GNOME Shell started at Sun Oct 23 2011 18:28:45 GMT-0400 (EDT)
Window manager warning: Log level 16: STACK_OP_REMOVE: window 0x5c not in stack

(gnome-shell:18774): GLib-GIO-CRITICAL **: Settings schema 'org.gnome.shell.extensions.alternate-tab' is not installed


(gnome-shell:18774): GLib-GIO-CRITICAL **: g_settings_get_key_info: assertion `settings->priv->schema != NULL' failed
Window manager warning: Log level 8: g_variant_get_type: assertion `value != NULL' failed
Window manager warning: Log level 8: g_variant_type_is_subtype_of: assertion `g_variant_type_check (type)' failed
Window manager warning: Log level 8: g_variant_get_boolean: assertion `g_variant_is_of_type (value, G_VARIANT_TYPE_BOOLEAN)' failed
Window manager warning: Log level 8: g_variant_unref: assertion `value != NULL' failed

(gnome-shell:18774): GLib-GIO-CRITICAL **: g_settings_get_key_info: assertion `settings->priv->schema != NULL' failed
Window manager warning: Log level 8: g_variant_get_string: assertion `value != NULL' failed
Window manager warning: Log level 8: g_variant_unref: assertion `value != NULL' failed
gnome-shell-calendar-server[18784]: Got HUP on stdin - exiting

I guess the problem lies in the schemas not being properly installed.  Let me know what else I can do.
Comment 11 Diego 2011-10-23 22:38:05 UTC
oh, I should add that I manually changed the version in the metadata.json file to 3.2.1
Comment 12 Jasper St. Pierre (not reading bugmail) 2011-10-23 23:16:12 UTC
gsettings does not work in your HOME dir. Schemas must be installed system-wide.
Comment 13 Diego 2011-10-24 00:10:26 UTC
ohhh... well that makes sense.  I can't believe I didn't even try to install system wide before.  I've now successfully installed the extension system-wide and it does seem to be working.  Thanks a lot, and if I happen to encounter any other problems I'll report back.
Comment 14 Giovanni Campagna 2011-10-24 14:32:28 UTC
Review of attachment 198621 [details] [review]:

I applied the patch, but it doesn't seem to work right.
In all modes, the switcher pops up briefly and immediately selects the next window/app in the list.
Holding it back for further testing...
Comment 15 Joachim Bargsten 2011-10-30 17:31:29 UTC
I cannot reproduce the error. Currently I'm running gnome-shell 3.2.1 (but the same under 3.2.0).
Comment 16 Giovanni Tirloni 2011-10-31 09:56:40 UTC
I was having the same problem under GNOME Shell 3.2.1 (Fedora 16 Beta) and the patch fixed it. Alt-Tab now waits for me to release Alt so I can select the window. Thank you.

gnome-shell-3.2.1-2.fc16.x86_64

$ cat /usr/share/gnome-shell/extensions/alternate-tab@gnome-shell-extensions.gnome.org/metadata.json 
{
"uuid": "alternate-tab@gnome-shell-extensions.gnome.org",
"name": "AlternateTab",
"description": "A replacement for Alt-Tab, allows to cycle between windows and does not group by application",
"original-authors": [  "jw@bargsten.org", "thomas.bouffon@gmail.com" ],
"shell-version": [ "3.2.0", "3.2" ],
"localedir": "/home/gtirloni/gnome-local/share/locale",
"url": "http://git.gnome.org/gnome-shell-extensions"
}


(I had to add "3.2" to the shell-version so it'd load. IMHO, restricting it too much is bad.)
Comment 17 Giovanni Campagna 2011-11-18 17:33:10 UTC
Comment on attachment 198621 [details] [review]
Fix the workspace & icons mode of alternate-tab for gnome > 3.2

After some more testing, it seems to work fine, so I'm pushing it.
Thanks a lot!
Comment 18 Joaquín Aramendía 2011-11-19 02:56:50 UTC
git cloned just now.
The behavior on "all_thumbnails" and "workspace_icons" is the same as if the extension is not loaded ("native" mode dissapeared). Also I had to change shell version to "3.2" instead of "3.2.0" (running shell 3.2.1)
Comment 19 Giovanni Campagna 2011-11-19 12:44:21 UTC
(In reply to comment #18)
> git cloned just now.
> The behavior on "all_thumbnails" and "workspace_icons" is the same as if the
> extension is not loaded ("native" mode dissapeared). Also I had to change shell
> version to "3.2" instead of "3.2.0" (running shell 3.2.1)

Did you actually enable it?
(To do so, you can use dconf-editor, or gnome-tweak-tool, or extensions.gnome.org if you have access).

As for the versioning issue, I'm pushing the bump right now.
Comment 20 Joaquín Aramendía 2011-11-19 13:37:34 UTC
> Did you actually enable it?

Yes... :S

Used tweak tool to enable/disable it; dconf-editor to change the mode, but works as it where in "native" mode. (Fortunately enough it doesn't crash anymore).

And before you ask: Yes, I restarted the shell every time, before and after any change. Even restarting the session doesn't work.
Comment 21 Giovanni Campagna 2011-11-19 16:25:24 UTC
(In reply to comment #20)
> > Did you actually enable it?
> 
> Yes... :S
> 
> Used tweak tool to enable/disable it; dconf-editor to change the mode, but
> works as it where in "native" mode. (Fortunately enough it doesn't crash
> anymore).

This means that it is throwing an exception inside init() or enable()/disable(). Do you see anything in Looking Glass?(either the errors or the extensions tab)
Comment 22 Joaquín Aramendía 2011-11-21 11:54:16 UTC
errors.log is empty except for some brcmsmac issues. The only JS exception I could find in logs is:

JS ERROR: !!!   WARNING: 'assignment to undeclared variable workViewInjections'
    JS ERROR: !!!   WARNING: file '/usr/share/gnome-shell/extensions/native-window-placement@gnome-shell-extensions.gcampax.github.com/extension.js' line 113 exception 0 number 156

When disabling that extension and all others except the Alternate-tab one i still couldn't get it to work. 

Where does the gnome extensions log their failures? (full log path)
Comment 23 Giovanni Campagna 2011-11-21 12:47:11 UTC
(In reply to comment #22)
> Where does the gnome extensions log their failures? (full log path)

Looking Glass (alt-f2, lg, extensions tab, show errors). They're only visible in gnome-shell master, though.
Comment 24 Joaquín Aramendía 2011-11-21 13:26:03 UTC
Nothing other than "Loaded extension XXX".
Comment 25 J Robinson 2011-12-11 02:25:49 UTC
Just received update gnome-shell-extension-alternate-tab-3.2.1-1.fc16

It still doesn't work (actually, it's never worked for me since I did a fresh install of FC16)

At least the JS errors are gone from ~/.xsession-errors, and it doesn't crash the gnome-shell anymore, but now the behaviour does not change from 'native'. Tried setting it to 'all_thumbnails' (using:
gsettings set org.gnome.shell.extensions.alternate-tab behaviour 'all_thumbnails', then Alt-F2 -> r) but no luck.

It is enabled (it shows up as 'On' in gnome-tweak-tool and also appears as 'Enabled' in the Looking Glass extensions tab.

There are no errors in Looking Glass -> Errors tab, just 'loaded' messages.

Package versions:
gnome-shell-extension-common-3.2.1-1.fc16.noarch
gnome-shell-extension-alternative-status-menu-3.2.1-1.fc16.noarch
gnome-shell-extension-alternate-tab-3.2.1-1.fc16.noarch
gnome-shell-3.2.1-2.fc16.x86_64

I'm struggling to figure out how the alternative-tab package could have been released (4th version I've had in FC16) when it has never worked - perhaps there are flaws in the system testing process, i.e. environment setup, concurrent gnome-shell package versions?
Comment 26 Giovanni Campagna 2011-12-11 14:41:49 UTC
(Ignoring the fact that, due to gsettings usage, alternate-tab is not supported in 3.2)

I found out what was the problem: backporting the fixes from master to gnome-3-2, I left the keybinding names as found in 3.3.2 (migrated to GSettings). This should now be fixed in the gnome-3-2.
I don't expect packages or tarballs, though, as I plan only to release stuff at extensions.gnome.org.

Thanks for your report, and please close if it works for you.
Comment 27 J Robinson 2011-12-11 16:06:05 UTC
Since no alternate-tab update package is coming for gnome 3.2 (if I'm reading your message correctly), I made my own manual edit based on your latest code at http://git.gnome.org

This seems to have finally fixed the alternate-tab extension for me in gnome-shell-3.2


For the benefit of other users who may want to perform this ad-hoc fix:

Pressuming gnome-shell-extension-alternate-tab-3.2.1-1.fc16.noarch is installed, run as root:

cd /usr/share/gnome-shell/extensions/alternate-tab@gnome-shell-extensions.gcampax.github.com/

mv extension.js extension.js.orig

wget -O extension.js http://git.gnome.org/browse/gnome-shell-extensions/plain/extensions/alternate-tab/extension.js?h=gnome-3-2

Press: 'Alt-F2' -> 'r' -> [Enter]

Enable the extension using gnome-tweak tool.
Comment 28 Alex Lancaster 2011-12-14 22:53:42 UTC
Comment #27 definitely fixes this for me.  I'll request that the Fedora maintainer backports the patch from master to fix this in f16: 

https://bugzilla.redhat.com/show_bug.cgi?id=739270#c12
Comment 29 Florian Müllner 2013-05-24 14:04:02 UTC
Fixed according to comment #28 (not to mention that most of the extension code has been moved to core gnome-shell in 3.8)