GNOME Bugzilla – Bug 661281
alternate-tab workspace & icons mode is not working
Last modified: 2013-05-24 14:04:02 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.
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
Can you name the exact steps to reproduce the crash? Did you try to install the shell extensions from git w/o patch applied?
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.
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
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.
Yes, please do.
Did you apply this patch? Because this behaviour/bug you describe was the reason why I created the patch...
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.
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.
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.
oh, I should add that I manually changed the version in the metadata.json file to 3.2.1
gsettings does not work in your HOME dir. Schemas must be installed system-wide.
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.
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...
I cannot reproduce the error. Currently I'm running gnome-shell 3.2.1 (but the same under 3.2.0).
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 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!
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)
(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.
> 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.
(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)
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)
(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.
Nothing other than "Loaded extension XXX".
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?
(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.
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 #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
Fixed according to comment #28 (not to mention that most of the extension code has been moved to core gnome-shell in 3.8)